Swap SD <> eMMC Installs?
#1
Is there a practical method to exchange the default Debian install on the eMMC with the Manjaro Plasma install I'm currently running from the SD card? I have invested a non-trivial amount of time and effort into installing the packages I need and customizing the environment of both -- I'd really like to not have to re-do all of that.

Could it be as simple as:

1. use Gparted to shrink the partitions of each to just larger than the actual space being used

2. use dd to copy the offline partitions to image files on a fresh install of Debian on a large SD

3. use dd to copy the Manjaro image to /dev/mmcblk2 (after verifying that's the right device)

4. boot into the newly-restored Manjaro and use dd to copy the Debian image to a SD card

5. use Gparted to resize the partitions of both filesystems to use all the space available on the drives?

I have not been able to boot to a USB flash drive, which would allow to manipulate both the eMMC and SD filesystems offline in the same session.
#2
Your best/easiest/fastest method would utilize the emmc reader if you have one. Use if to make a backup of the emmc on another computer, then write the contents of your SD to the eMMC and finally write Debian to the SD.

If you don't have the adapter, you can do it using a ext or thumb drive, a USB SD adapter/reader, and another SD running a Linux. Using the second Linux SD, make backups of the emmc and SD onto the ext/thumb drive. Then write each image to its new media. You shouldn't (and may not be able to) do this from within one of your installs.
#3
No eMMC reader here, just a USB card-reader that I can use to access another SD card while I'm booted from the built-in SD card.

I just realized that I don't understand the process of using dd to create an image file and write a bootable filesystem back to the drive. Can I copy from the first sector on the drive to the end (do I need to provide an offset or skip copying any portions of either drive, either during the backup or the restore)? Are there blocksize or other parameters to dd that are necessary (other than the obvious if= and of=)?
#4
No, dd the whole drive(s). Any offsets will carry over during the dd. Backup and restore the drives in their entirety to help maintain proper booting.
#5
I still don't understand the boot process, and made the mistake of trying to copy just the Debian partition rather than the entire drive. That didn't work.

Here's what worked:
  1. Prepare an empty SD card (formatted as ext4, labelled "XFER") to hold the backup copies. (I had a USB card reader that mounted as /dev/sda1)

  2. Use Gparted to shrink the partitions of each OS to just larger than the actual space being used

  3. Use dd to copy the offline partitions to image files on the fresh SD card (named XFER)
    Code:
    sudo dd if=/dev/mmcblk2 of=/run/media/jdcard/XFER/pbpDebian.img
    sudo dd if=/dev/mmcblk1 of=/run/media/jdcard/XFER/pbpManjaro.img


  4. Use dd to copy the Manjaro image to /dev/mmcblk2 (after verifying that's the right device)
    Code:
    sudo dd if=/run/media/jdcard/XFER/pbpManjaro.img of=/dev/mmcblk2 status=progress


  5. Boot into the newly-restored Manjaro and use dd to copy the Debian image to another SD card
    Code:
    sudo dd if=/run/media/jdcard/XFER/Debian.img of=/dev/mmcblk1 status=progress


  6. Use Gparted to resize the partitions of both filesystems to use all the space available on the drives

Thanks for the help.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... Paulie420 42 69,141 11-20-2023, 06:22 PM
Last Post: wdt
  I'm booting from NVME but I want to switch back to eMMC acruhl 4 2,306 04-23-2023, 06:58 AM
Last Post: acruhl
  Doesn’t power on after flashing emmc badguru 3 1,887 02-25-2023, 09:00 PM
Last Post: badguru
  eMMC problem with Tow-Boot/u-boot on SPI repa 3 2,406 02-21-2023, 01:49 AM
Last Post: repa
  Partial boot after installing Manjaro on emmc regivanx 11 4,848 02-06-2023, 09:11 AM
Last Post: wdt
  Unable to Boot anything (emmc or SDcard) line72 5 2,971 01-17-2023, 12:07 PM
Last Post: nfms
  What OS have you recently flashed onto PBP eMMC? jcun4128 6 3,377 11-26-2022, 09:39 AM
Last Post: KC9UDX
  Unable to boot from emmc after flashing it rfm83 3 2,456 11-08-2022, 10:59 PM
Last Post: rfm83
  Pinebook picky about which EMMC will boot flatulent_piney 8 4,380 11-05-2022, 06:03 PM
Last Post: ajtravis
  After Flashing eMMC, Will Not Boot Mossbot 5 3,321 09-28-2022, 06:22 PM
Last Post: wdt

Forum Jump:


Users browsing this thread: 1 Guest(s)