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

From Technologic Systems Manuals
Line 10: Line 10:
 
''' 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/2gbsd-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 [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.   
  
 
Step 1 Option 1 (lsblk)
 
Step 1 Option 1 (lsblk)
Line 25: Line 25:
 
   └─sda5  8:5    0    2G  0 part [SWAP]
 
   └─sda5  8:5    0    2G  0 part [SWAP]
 
   sr0    11:0    1  1024M  0 rom   
 
   sr0    11:0    1  1024M  0 rom   
   sdc      8:32  1  1.9G  0 disk  
+
   sdc      8:32  1  3.9G  0 disk  
 
   ├─sdc1  8:33  1  7.9M  0 part  
 
   ├─sdc1  8:33  1  7.9M  0 part  
 
   ├─sdc2  8:34  1    2M  0 part  
 
   ├─sdc2  8:34  1    2M  0 part  
 
   ├─sdc3  8:35  1    2M  0 part  
 
   ├─sdc3  8:35  1    2M  0 part  
   └─sdc4  8:36  1  1.8G  0 part   
+
   └─sdc4  8:36  1  2.8G  0 part   
  
In this case my SD card is 2GB, so sdc is the target device.   
+
In this case my SD card is 4GB, so sdc is the target device.   
  
 
Step 1 Option 2 (dmesg)
 
Step 1 Option 2 (dmesg)
Line 38: Line 38:
 
After plugging in the device, you can use dmesg to list  
 
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
+
   scsi 9: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 9: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)
+
   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 1.97GB card.
+
In this case, sdc is shown as a 3.96GB card.
  
 
Step 2
 
Step 2
Line 49: Line 49:
 
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/2gbsd-471x-latest.dd.bz2
+
wget ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4710-linux/binaries/ts-images/4gbsd-471x-latest.dd.bz2
bzip2 -d 2gbsd-471x-latest.dd.bz2
+
bzip2 -d 4gbsd-471x-latest.dd.bz2
  
 
# Specify your block device instead of /dev/sdc
 
# Specify your block device instead of /dev/sdc
 
# Note that this does not include a partition, so use /dev/sdc instead of
 
# Note that this does not include a partition, so use /dev/sdc instead of
 
# using /dev/sdc1
 
# using /dev/sdc1
dd if=2gbsd-471x-latest.dd conv=fsync bs=4M of=/dev/sdc
+
dd if=4gbsd-471x-latest.dd conv=fsync bs=4M of=/dev/sdc
 
</source>
 
</source>
  

Revision as of 08:07, 15 November 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:

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 ftp://ftp.embeddedarm.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