TS-7180 MicroSD Backup/restore: Difference between revisions
(Created page with "These instructions assume you have an SD card with one partition. Most SD cards ship this way by default, but if you have modified the partitions you may need to use a utilit...") |
("j" is wrong for xz, and "h" (--dereference) flag is (or will soon be) needed.) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
These instructions assume you have an SD card with one partition. Most SD cards ship this way by default, but if you have modified the partitions you may need to use a utility such as gparted or fdisk to | These instructions describe how to create a bootable SD card image. They assume you have an SD card with one partition. Most SD cards ship this way by default, but if you have modified the partitions, you may need to use a utility such as <code>gparted</code> or <code>fdisk</code> to recreate the table with one partition. | ||
These instructions assume your SD interface is <code>/dev/sdc</code>, but plug the SD card into your USB reader and check <code>dmesg</code> to confirm. | |||
These instructions assume your SD interface is /dev/sdc, but check dmesg | On the TS-7180, its on-board SD card reader is <code>/dev/mmcblk1p1</code>. | ||
Running these commands will reflash the SD card to our default latest image. | Running these commands will reflash the SD card to our default latest image. | ||
Line 10: | Line 10: | ||
sudo umount /dev/sdc1 | sudo umount /dev/sdc1 | ||
sudo mkfs.ext4 /dev/sdc1 | sudo mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdc1 | ||
sudo mkdir /mnt/sd | sudo mkdir /mnt/sd | ||
sudo mount /dev/sdc1 /mnt/sd/ | sudo mount /dev/sdc1 /mnt/sd/ | ||
wget | wget https://ftp.embeddedTS.com/ts-arm-sbc/ts-7180-linux/distributions/debian/ts7180-debian-buster-latest.tar.xz | ||
xzcat ts7180-debian-buster-latest.tar.xz | sudo tar -xhf -C /mnt/sd | |||
sudo umount /mnt/sd | sudo umount /mnt/sd | ||
sync | sync | ||
Line 24: | Line 23: | ||
mount /dev/sdc1 /mnt/sd | mount /dev/sdc1 /mnt/sd | ||
cd /mnt/sd/ | cd /mnt/sd/ | ||
sudo | sudo md5sum -c md5sums.txt | ||
umount /mnt/sd | umount /mnt/sd | ||
sync | sync | ||
</source> | </source> | ||
The md5sums command will report what differences there are, if any, and return if it passed or failed. | The <code>md5sums</code> command will report what differences there are, if any, and return if it passed or failed. |
Latest revision as of 13:41, 26 April 2024
These instructions describe how to create a bootable SD card image. They assume you have an SD card with one partition. Most SD cards ship this way by default, but if you have modified the partitions, you may need to use a utility such as gparted
or fdisk
to recreate the table with one partition.
These instructions assume your SD interface is /dev/sdc
, but plug the SD card into your USB reader and check dmesg
to confirm.
On the TS-7180, its on-board SD card reader is /dev/mmcblk1p1
.
Running these commands will reflash the SD card to our default latest image.
# Verify nothing else has this mounted
sudo umount /dev/sdc1
sudo mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdc1
sudo mkdir /mnt/sd
sudo mount /dev/sdc1 /mnt/sd/
wget https://ftp.embeddedTS.com/ts-arm-sbc/ts-7180-linux/distributions/debian/ts7180-debian-buster-latest.tar.xz
xzcat ts7180-debian-buster-latest.tar.xz | sudo tar -xhf -C /mnt/sd
sudo umount /mnt/sd
sync
After it is written you can verify the data was written correctly. Reinsert the disk to verify any block cache is gone, then run these:
mount /dev/sdc1 /mnt/sd
cd /mnt/sd/
sudo md5sum -c md5sums.txt
umount /mnt/sd
sync
The md5sums
command will report what differences there are, if any, and return if it passed or failed.