TS-4100 eMMC Backup/restore: Difference between revisions
From embeddedTS Manuals
(Created page with "The simplest way to backup/restore the eMMC is through u-boot. If you boot up and stop in u-boot you can run this command: <source lang=bash> ums 0 mmc 1 </source> This will...") |
No edit summary |
||
Line 10: | Line 10: | ||
# size of around 3.78GiB. On my system, this is /dev/sdd. | # size of around 3.78GiB. On my system, this is /dev/sdd. | ||
sudo mkdir /mnt/emmc/ | sudo mkdir /mnt/emmc/ | ||
sudo mount /dev/ | sudo mount /dev/mmcblk1p1 /mnt/emmc/ | ||
cd /mnt/emmc/ | cd /mnt/emmc/ | ||
tar -cjf /path/to/ts4100-backup-image.tar.bz2 | tar -cjf /path/to/ts4100-backup-image.tar.bz2 | ||
Line 24: | Line 24: | ||
# size of around 3.78GiB. On my system, this is /dev/sdd. | # size of around 3.78GiB. On my system, this is /dev/sdd. | ||
sudo mkdir /mnt/emmc/ | sudo mkdir /mnt/emmc/ | ||
sudo mkfs.ext4 /dev/ | sudo mkfs.ext4 /dev/mmcblk1p1 | ||
# If the above command fails, use fdisk or gparted to repartition the emmc | # If the above command fails, use fdisk or gparted to repartition the emmc | ||
# to have one large partition. | # to have one large partition. | ||
sudo mount /dev/ | sudo mount /dev/mmcblk1p1 /mnt/emmc/ | ||
tar -xjf /path/to/ts4100-new-image.tar.bz2 -C /mnt/emmc | tar -xjf /path/to/ts4100-new-image.tar.bz2 -C /mnt/emmc | ||
umount /mnt/emmc/ | umount /mnt/emmc/ | ||
sync | sync | ||
</source> | </source> |
Revision as of 17:20, 8 June 2016
The simplest way to backup/restore the eMMC is through u-boot. If you boot up and stop in u-boot you can run this command:
ums 0 mmc 1
This will make the board 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