TS-7180 eMMC Backup/restore: Difference between revisions
From embeddedTS Manuals
(-h (--dereference) flag and make explicit the decompressor) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The simplest way to backup/restore the eMMC is | The simplest way to backup/restore the eMMC is by booting to the SD card and then writing the eMMC image to removable media such as a USB stick. | ||
<source lang=bash> | <source lang=bash> | ||
sudo mkdir /mnt/emmc/ | sudo mkdir /mnt/emmc/ | ||
sudo mount /dev/mmcblk1p1 /mnt/emmc/ | sudo mount /dev/mmcblk1p1 /mnt/emmc/ | ||
cd /mnt/emmc/ | cd /mnt/emmc/ | ||
tar - | tar -c . | bzip2 > /path/to/ts7180-backup-image.tar.bz2 | ||
cd ../ | cd ../ | ||
umount /mnt/emmc/ | umount /mnt/emmc/ | ||
Line 18: | Line 11: | ||
</source> | </source> | ||
To write a new filesystem to the TS-7180: | To write a new filesystem to the TS-7180, first boot to an SD card or USB stick. Then re-image the eMMC: | ||
<source lang=bash> | <source lang=bash> | ||
# The eMMC is /dev/mmcblk1. | |||
# | # | ||
# | # Ensure the media has an MBR (not GPT) partition table with exactly one partition. | ||
# Re-partition the device with fdisk or gparted if it isn't already partitioned correctly. | |||
sudo mkdir /mnt/emmc/ | sudo mkdir /mnt/emmc/ | ||
sudo mkfs.ext4 /dev/mmcblk1p1 | |||
# If the above command fails, | sudo mkfs.ext4 -O ^metadata_csum,^64bit /dev/mmcblk1p1 | ||
# | # If the above command fails, complaining of an invalid filesystem option, it is fine to omit that flag: | ||
# An older mkfs.ext4 that doesn’t understand it also can’t create a backwards compatibility issue. | |||
sudo mount /dev/mmcblk1p1 /mnt/emmc/ | sudo mount /dev/mmcblk1p1 /mnt/emmc/ | ||
bzcat /path/to/ts7180-new-image.tar.bz2 | tar -xhf -C /mnt/emmc | |||
umount /mnt/emmc/ | umount /mnt/emmc/ | ||
sync | sync | ||
</source> | </source> |
Latest revision as of 13:50, 26 April 2024
The simplest way to backup/restore the eMMC is by booting to the SD card and then writing the eMMC image to removable media such as a USB stick.
sudo mkdir /mnt/emmc/
sudo mount /dev/mmcblk1p1 /mnt/emmc/
cd /mnt/emmc/
tar -c . | bzip2 > /path/to/ts7180-backup-image.tar.bz2
cd ../
umount /mnt/emmc/
sync
To write a new filesystem to the TS-7180, first boot to an SD card or USB stick. Then re-image the eMMC:
# The eMMC is /dev/mmcblk1.
#
# Ensure the media has an MBR (not GPT) partition table with exactly one partition.
# Re-partition the device with fdisk or gparted if it isn't already partitioned correctly.
sudo mkdir /mnt/emmc/
sudo mkfs.ext4 -O ^metadata_csum,^64bit /dev/mmcblk1p1
# If the above command fails, complaining of an invalid filesystem option, it is fine to omit that flag:
# An older mkfs.ext4 that doesn’t understand it also can’t create a backwards compatibility issue.
sudo mount /dev/mmcblk1p1 /mnt/emmc/
bzcat /path/to/ts7180-new-image.tar.bz2 | tar -xhf -C /mnt/emmc
umount /mnt/emmc/
sync