TS-4720 eMMC Backup/restore

From embeddedTS Manuals
Revision as of 09:40, 15 November 2013 by Mark (talk | contribs) (Created page with "{| | 70px|link=ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2 | [ftp://ftp.embeddedarm.co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
MicroSD.png Click to download the latest 4GB SD card image.

Write an Image to eMMC

The onboard eMMC uses the same image as the MicroSD card. To program the eMMC chip you would need to first boot to the MicroSD card. From the stock SD image initramfs you can use dd to write the SD image to the eMMC:

dd if=/dev/nbd0 of=/dev/nbd1 bs=4M conv=fsync
#/dev/nbd0 is the microSD
#/dev/nbd1 is the eMMC
#bs=4M is not required but will speed up the copy
#conv=fsync causes dd to flush all writes to the disk immediately rather than use cache
WARNING: Make sure the SD and eMMC filesystems are mounted read only while writing any images. If dd is used to read or write a disk while a filesystem on it is mounted read/write this can result in a corrupt image.

Alternatively you can use a usb drive with a copy of the eMMC image:

# The first partition of a usb drive would be at /dev/sda1
mkdir /mnt/usb/
mount /dev/sda1 /mnt/usb/
dd if=/mnt/usb/emmcImage.dd of=/dev/nbd1  bs=4M conv=fsync

Create image from eMMC

Since the eMMC and SD images are the same you can use an SD card to backup the eMMC image. This will replace the contents of the MicroSD card with the eMMC image:

dd if=/dev/nbd1 of=/dev/nbd0 bs=4M conv=fsync
#/dev/nbd1 is the eMMC
#/dev/nbd0 is the microSD
#bs=4M is not required but will speed up the copy
#conv=fsync causes dd to flush all writes to the disk immediately rather than use cache
WARNING: Make sure the SD and eMMC filesystems are mounted read only while writing any images. If dd is used to read or write a disk while a filesystem on it is mounted read/write this can result in a corrupt image.

Alternatively you can use a usb drive as the location to store the eMMC image:

# The first partition of a usb drive would be at /dev/sda1
mkdir /mnt/usb/
mount /dev/sda1 /mnt/usb/
dd if=/dev/nbd1 of=/mnt/usb/emmcBackup.dd bs=4M conv=fsync