Difference between revisions of "TS-4710 MicroSD Backup/restore"

From Technologic Systems Manuals
Line 1: Line 1:
| [[File:MicroSD.png|70px|link=ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gbsd-471x-latest.dd.bz2]]
| [[File:MicroSD.png|70px|link=ftp://ftp.embeddedarm.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/2gbsd-471x-latest.dd.bz2 Click to download the latest 2GB SD card image.]
| [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.]

Revision as of 16:59, 23 August 2013

MicroSD.png Click to download the latest 4GB SD card image.

Using onboard web interface (recommended)

The TS-4710 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:

 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   1.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   1.8G  0 part  

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

Step 1 Option 2 (dmesg)

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

 scsi 54:0:0:0: Direct-Access     Generic  Storage Device   0.00 PQ: 0 ANSI: 2
 sd 54:0:0:0: Attached scsi generic sg2 type 0
 sd 54:0:0:0: [sdc] 3862528 512-byte logical blocks: (1.97 GB/1.84 GiB)

In this case, sdc is shown as a 1.97GB 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 ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/2gbsd-471x-latest.dd.bz2
bzip2 -d 2gbsd-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=2gbsd-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