TS-4720 eMMC Backup/restore: Difference between revisions

From embeddedTS Manuals
No edit summary
m (Links auto-updated for 2022 re-branding ( https://files.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gb-emmc-slc-471x-latest.dd.bz2 →‎ https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gb-emmc-slc-471x-latest.dd.bz2))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{|  
{|  
| [[File:eMMC.png|70px|link=ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gb-emmc-slc-471x-latest.dd.bz2]]
| [[File:eMMC.png|70px|link=https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gb-emmc-slc-471x-latest.dd.bz2]]
| [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gb-emmc-slc-471x-latest.dd.bz2 Click to download the latest 2GB SLC eMMC image.]
| [https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gb-emmc-slc-471x-latest.dd.bz2 Click to download the latest 2GB eMMC image.]
|}
|}


{{Warning|Make sure the SD and eMMC filesystems are mounted read only while writing any images.  If dd is used to read or write a disk while a filesystem on it is mounted read/write this will result in a corrupt image.}}
{{Warning|Make sure the SD and eMMC filesystems are mounted read only while writing any images.  If dd is used to read or write a disk while a filesystem on it is mounted read/write this can result in a corrupt image.}}


First boot to the initramfs.  These steps should '''not be run from the full Debian environment''', so to get back to the initramfs, first run:
First boot to the initramfs.  These steps should '''not be run from the full Debian environment''', so to get back to the initramfs, first run:
Line 11: Line 11:
</source>
</source>


First, boot to the SD card.  Once you are in the initramfs, mount a network share or usb drive containing the emmc image.
Once you are in the initramfs, mount a network share or usb drive containing the emmc image.


''' Write an Image to eMMC '''
''' Write an Image to eMMC '''


<source lang=bash>
<source lang=bash>
# Check /mnt/root.  If it shows a file "root.version", you can proceed.
# If it shows nothing, you need to wait for the Debian filesystem
until [ -e /mnt/root/root.version ]; do sleep .1; done
# Plug in a thumbdrive formatted with ext2/3/4 or fat32/ntfs
# Plug in a thumbdrive formatted with ext2/3/4 or fat32/ntfs
mkdir /mnt/usbdev
mkdir /mnt/usbdev
mount -o ro /dev/sda1 /mnt/usbdev
mount -o ro /dev/sda1 /mnt/usbdev
umount -l /mnt/root/
dd if=/mnt/usbdev/emmc-image.dd bs=4M of=/dev/nbd1
 
dd if=/mnt/usbdev/emmcimage.dd bs=4M of=/dev/nbd1
sync
reboot
</source>
</source>


Line 33: Line 25:


<source lang=bash>
<source lang=bash>
# Check /mnt/root.  If it shows a file "root.version", you can proceed.
# Plug in a thumbdrive formatted with ext2/3/4 or fat32/ntfs
# If it shows nothing, you need to wait for the Debian filesystem
until [ -e /mnt/root/root.version ]; do sleep .1; done
 
# Plug in a thumbdrive formatted with ext2/3/4 or fat32
mkdir /mnt/usbdev
mkdir /mnt/usbdev
mount /dev/sda1 /mnt/usbdev
mount -o ro /dev/sda1 /mnt/usbdev
umount -l /mnt/root/
# This can take about 15 minutes
 
dd if=/dev/nbd1 bs=4M of=/mnt/usbdev/emmc-image.dd
dd if=/dev/nbd1 bs=4M of=/mnt/usbdev/emmcimage.dd
umount /mnt/usbdev
umount /mnt/usbdev
sync
sync
</source>
</source>

Latest revision as of 16:51, 17 January 2022

EMMC.png Click to download the latest 2GB eMMC image.
WARNING: Make sure the SD and eMMC filesystems are mounted read only while writing any images. If dd is used to read or write a disk while a filesystem on it is mounted read/write this can result in a corrupt image.

First boot to the initramfs. These steps should not be run from the full Debian environment, so to get back to the initramfs, first run:

tshwctl --removejp 1 && reboot

Once you are in the initramfs, mount a network share or usb drive containing the emmc image.

Write an Image to eMMC

# Plug in a thumbdrive formatted with ext2/3/4 or fat32/ntfs
mkdir /mnt/usbdev
mount -o ro /dev/sda1 /mnt/usbdev
dd if=/mnt/usbdev/emmc-image.dd bs=4M of=/dev/nbd1

Save an image from eMMC

# Plug in a thumbdrive formatted with ext2/3/4 or fat32/ntfs
mkdir /mnt/usbdev
mount -o ro /dev/sda1 /mnt/usbdev
# This can take about 15 minutes
dd if=/dev/nbd1 bs=4M of=/mnt/usbdev/emmc-image.dd
umount /mnt/usbdev
sync