TS-4100 eMMC Backup/restore

From embeddedTS Manuals
Revision as of 17:24, 23 May 2017 by Kris (talk | contribs) (Reworded and added ext4 notice)

The simplest way to backup/restore the eMMC is through U-Boot. Boot to U-Boot and run the following command:

ums 0 mmc 1

This will make the device act as a USB mass storage device with direct access to the emmc disk. On a linux workstation, to backup the image:

dmesg | tail -n 30
# Look for the last /dev/sd* device connected.  This should also match the eMMC
# size of around 3.78GiB.  On my system, this is /dev/sdd.
sudo mkdir /mnt/emmc/
sudo mount /dev/mmcblk1p1 /mnt/emmc/
cd /mnt/emmc/
tar -cjf /path/to/ts4100-backup-image.tar.bz2
cd ../
umount /mnt/emmc/
sync


To write a new filesystem to the TS-4100:

dmesg | tail -n 30
# Look for the last /dev/sd* device connected.  This should also match the eMMC
# size of around 3.78GiB.  On my system, this is /dev/sdd.
sudo mkdir /mnt/emmc/
sudo mkfs.ext4 /dev/mmcblk1p1
# If the above command fails, use fdisk or gparted to repartition the emmc
# to have one large partition.
sudo mount /dev/mmcblk1p1 /mnt/emmc/
tar -xjf /path/to/ts4100-new-image.tar.bz2 -C /mnt/emmc
umount /mnt/emmc/
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.