TS-4710 MicroSD 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/4gbsd-471x-latest.dd.bz2 →‎ https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Warning|While tools exist for writing image from Windows or other operating systems, we do not support their use.  If they are not careful to make sure the OS has not mounted the FS, or existing drivers have ceased any access to the card, they may end up with corruption that is not immediately apparent upon using the card presenting as sublte corruption.  We do not encourage use of any other process other than what is described in this section.}}
{{Warning|While tools exist for writing image from Windows or other operating systems, we do not support their use.  If they are not careful to make sure the OS has not mounted the FS, or existing drivers have ceased any access to the card, they may end up with corruption that is not immediately apparent upon using the card.  This may present as sublte corruption, or a card that does not boot at all.  We do not encourage use of any other process other than what is described in this section.}}


{|  
{|  
| [[File:MicroSD.png|70px|link=ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2]]
| [[File:MicroSD.png|70px|link=https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2]]
| [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2 Click to download the latest 4GB SD card image.]
| [https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2 Click to download the latest 4GB SD card image.]
|}
|}


Line 12: Line 12:
''' Using another Linux workstation '''
''' Using another Linux workstation '''


If you do not have an SD card that can boot to the initramfs, you can download the [ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2 sd card image] and rewrite this from a Linux workstation.  A USB MicroSD adapter can be used to access the card.  First, you must find out which /dev/ device corresponds with your USB reader/writer.   
If you do not have an SD card that can boot to the initramfs, you can download the [https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2 sd card image] and rewrite this from a Linux workstation.  A USB MicroSD adapter can be used to access the card.  First, you must find out which /dev/ device corresponds with your USB reader/writer.   


Step 1 Option 1 (lsblk)
Step 1 Option 1 (lsblk)
Line 51: Line 51:
Once you have the target /dev/ device you can use "dd" to backup/restore the card.  To restore the board to stock, or rewrite to the latest SD image:
Once you have the target /dev/ device you can use "dd" to backup/restore the card.  To restore the board to stock, or rewrite to the latest SD image:
<source lang=bash>
<source lang=bash>
wget ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2
wget https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2
bzip2 -d 4gbsd-471x-latest.dd.bz2
bzip2 -d 4gbsd-471x-latest.dd.bz2



Latest revision as of 16:50, 17 January 2022

WARNING: While tools exist for writing image from Windows or other operating systems, we do not support their use. If they are not careful to make sure the OS has not mounted the FS, or existing drivers have ceased any access to the card, they may end up with corruption that is not immediately apparent upon using the card. This may present as sublte corruption, or a card that does not boot at all. We do not encourage use of any other process other than what is described in this section.
MicroSD.png Click to download the latest 4GB SD card image.

Using onboard web interface

The initramfs contains a #Web interface that can be used to backup/restore the software image. From the main page, you can download a complete backup containing the MBR, Kernel, initramfs, and Debian filesystem by clicking "backup.dd". You can click "Choose File" and browse to a previous backup.dd, or the link above to rewrite the SD card.

Using another Linux workstation

If you do not have an SD card that can boot to the initramfs, you can download the sd card image and rewrite this from a Linux workstation. A USB MicroSD adapter can be used to access the card. First, you must find out which /dev/ device corresponds with your USB reader/writer.

Step 1 Option 1 (lsblk)


Newer distributions include a utility called "lsblk" which allows simple identification of the intended card:

lsblk
 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
 sda      8:0    0   400G  0 disk 
 ├─sda1   8:1    0   398G  0 part /
 ├─sda2   8:2    0     1K  0 part 
 └─sda5   8:5    0     2G  0 part [SWAP]
 sr0     11:0    1  1024M  0 rom  
 sdc      8:32   1   3.9G  0 disk 
 ├─sdc1   8:33   1   7.9M  0 part 
 ├─sdc2   8:34   1     2M  0 part 
 ├─sdc3   8:35   1     2M  0 part 
 └─sdc4   8:36   1   2.8G  0 part  

In this case my SD card is 4GB, so sdc is the target device.

Step 1 Option 2 (dmesg)


After plugging in the device, you can use dmesg to list

 scsi 9:0:0:0: Direct-Access     Generic  Storage Device   0.00 PQ: 0 ANSI: 2
 sd 9:0:0:0: Attached scsi generic sg2 type 0
 sd 9:0:0:0: [sdb] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)

In this case, sdc is shown as a 3.96GB card.

Step 2


Once you have the target /dev/ device you can use "dd" to backup/restore the card. To restore the board to stock, or rewrite to the latest SD image:

wget https://files.embeddedTS.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2
bzip2 -d 4gbsd-471x-latest.dd.bz2

# Specify your block device instead of /dev/sdc
# Note that this does not include a partition, so use /dev/sdc instead of
# using /dev/sdc1
dd if=4gbsd-471x-latest.dd conv=fsync bs=4M of=/dev/sdc

To take a backup of your entire SD card, you can switch the input file and the output file:

dd if=/dev/sdc conv=fsync bs=4M of=backup.dd