backing up and restoring the eMMC

1.6k views Asked by At

What would be the procedure to backup the onboard eMMC from the SD card image of the google coral dev board? Similarly, what procedure should we follow to restore the image to the emmc drive onboard?

1

There are 1 answers

10
Nam Vu On

backup the onboard eMMC from the SD card image

The Mendel OS image isn't installed on the sdcard so do you mean just backing up the emmc so that you can put it on another board? If so, here is the proceedure:

In order to backup emmc, you'll first need to mount your dev board as a USB device on your linux host machine. You do this, by connecting to your board via serial console and put it in u-boot mode (just boot the board up and press any keys within the first 3 seconds), make sure the USB-C cable is also connected. In u-boot prompt, enters:

U-Boot# ums 0 mmc 0

This will mount the dev board on your host machine as a USB device. Locate that device using the "fdisk -l" command. Then you can dd the bytes from that disk into an img file:

$ sudo dd if=/dev/path-to-dev-board of=./backup.img bs=4M status=progress

Be very careful that you are copying from the correct path, or else you'll copy from the wrong device. Next you can dd this backup image to any other board by first mounting a new board on your host machine and then locate the board with fdisk (same steps as above). Then you can dd the backup image to your board by reversing the dd command:

$ sudo dd if=./backup.img of=/dev/path-to-dev-board bs=4M status=progress

Be very careful with the out file path this time, because you can replace the wrong drive with the bytes from backup.img (that would be irreversible).