TS-4100 eMMC Backup/restore: Difference between revisions
(Reworded and added ext4 notice) |
(Changed to be generic instructions for the 4100 when booted from SD to write image to eMMC) |
||
Line 1: | Line 1: | ||
These instructions assume the TS-4100 is booted from SD card all the way to Linux. They also assume that the eMMC is unmodified, with a single partition. If the partition table has been modified, a utility such as 'gparted' or 'fdisk' may be needed to remove the existing partition table and recreate it with a single partition. Note that the partition table must be "MBR" or "msdos", the "GPT" partition table format is not supported by U-Boot. | |||
<source lang=bash> | <source lang=bash> | ||
# Verify nothing else has the partition mounted | |||
umount /dev/mmcblk1p1 | |||
mkfs.ext3 /dev/mmcblk1p1 | |||
mount /dev/mmcblk1p1 /mnt/emmc | |||
wget http://ftp.embeddedarm.com/ftp/ts-socket-macrocontrollers/ts-4100-linux/distributions/debian/ts4100-armhf-stretch-latest.tar.xz | |||
tar -xf ts4100-armhf-stretch-latest.tar.xz -C /mnt/emmc | |||
umount /mnt/emmc | |||
sync | |||
</source> | </source> | ||
{{:U-Boot ext4 warning}} | |||
Once written, the files on disk can be verified to ensure they are the same as the source files in the archive. To do so, run the following commands: | |||
<source lang=bash> | <source lang=bash> | ||
mount /dev/mmcblk1p1 /mnt/emmc | |||
cd /mnt/emmc/ | cd /mnt/emmc/ | ||
md5sum --quiet -c md5sums.txt | |||
cd | cd - | ||
umount /mnt/emmc | umount /mnt/emmc | ||
sync | sync | ||
</source> | </source> | ||
The 'md5sum' command will report any differences between files and their checksums. Any differences are an indication of failure to write data or a damaged disk. | |||
Revision as of 16:53, 10 July 2019
These instructions assume the TS-4100 is booted from SD card all the way to Linux. They also assume that the eMMC is unmodified, with a single partition. If the partition table has been modified, a utility such as 'gparted' or 'fdisk' may be needed to remove the existing partition table and recreate it with a single partition. Note that the partition table must be "MBR" or "msdos", the "GPT" partition table format is not supported by U-Boot.
# Verify nothing else has the partition mounted
umount /dev/mmcblk1p1
mkfs.ext3 /dev/mmcblk1p1
mount /dev/mmcblk1p1 /mnt/emmc
wget http://ftp.embeddedarm.com/ftp/ts-socket-macrocontrollers/ts-4100-linux/distributions/debian/ts4100-armhf-stretch-latest.tar.xz
tar -xf ts4100-armhf-stretch-latest.tar.xz -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. |
Once written, the files on disk can be verified to ensure they are the same as the source files in the archive. To do so, run the following commands:
mount /dev/mmcblk1p1 /mnt/emmc
cd /mnt/emmc/
md5sum --quiet -c md5sums.txt
cd -
umount /mnt/emmc
sync
The 'md5sum' command will report any differences between files and their checksums. Any differences are an indication of failure to write data or a damaged disk.