TS-4100 eMMC Backup/restore: Difference between revisions
From embeddedTS Manuals
No edit summary |
(Reworded and added ext4 notice) |
||
Line 1: | Line 1: | ||
The simplest way to backup/restore the eMMC is through | The simplest way to backup/restore the eMMC is through U-Boot. Boot to [[#U-Boot|U-Boot]] and run the following command: | ||
<source lang=bash> | <source lang=bash> | ||
ums 0 mmc 1 | ums 0 mmc 1 | ||
</source> | </source> | ||
This will make the | 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: | ||
<source lang=bash> | <source lang=bash> | ||
dmesg | tail -n 30 | dmesg | tail -n 30 | ||
Line 17: | Line 17: | ||
sync | sync | ||
</source> | </source> | ||
To write a new filesystem to the TS-4100: | To write a new filesystem to the TS-4100: | ||
Line 32: | Line 33: | ||
sync | sync | ||
</source> | </source> | ||
{{:U-Boot ext4 warning}} |
Revision as of 17:24, 23 May 2017
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. |