ts-7000
[Top] [All Lists]

[ts-7000] Re: TS-8390-4700 - Backing-up micro-SD card and replacing with

To:
Subject: [ts-7000] Re: TS-8390-4700 - Backing-up micro-SD card and replacing with a TS image
From: "jeffs7283" <>
Date: Tue, 03 Apr 2012 12:45:03 -0000

--- In  "drex459" <> wrote:
>
> I'm pretty new to working in UNIX, and have to do some development on the 
> TS-8390-4700 board. Before I get started I have to use an image provided by 
> TS. I need some help backing-up an existing micro SD card, and "dropping" an 
> imagine onto the same micro-SD card.
> 
> Here is a summary of what I have to do:
> 1. Back-up the existing micro-SD card (that came with the  TS-8390-4700 
> board). 
> 2. "Drop" a downloaded image onto the micro-SD card.
> 3. If necessary, how to revert the micro-SD card to the backed-up image.
> 
> Here's where I am, and what I still have to do:
> 1. Using the "sudo fdisk -l" command, I was able to see that the micro-SD 
> card had a few partitions on it (/dev/sdb1, /dev/sdb2, /dev/sdb3, /dev/sdb4). 
> I then used the command "sudo dd if=/dev/sdb of=sd.iso", which returned the 
> following result:
> 3862528+0 records in
> 3862528+0 records out
> 1977614336 bytes (2.0 GB) copied, 505.756 s, 3.9 MB/s
> which looks like it got backed-up successfully to the .iso file. Is this the 
> best way to back-up/image the micro-SD card, so that I can revert ALL files 
> and partitions to the way it was?
> 
> 2. The image I require is: 
> "ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4800-linux/binaries/ts-images/2gbsd-latest.dd.gz";
>  Once downloaded, how can I extract this image and "drop" it on the micro-SD 
> card? Can I use the 'dd' utility to do this? Or some other utility? Do I have 
> to format the micro-SD card first?
> 
> 3. If I want to revert the micro-SD card back to the way it was before I 
> "dropped" the image onto it, how do I do that using the .iso type (or any 
> file type) using the 'dd' utility? 
> 
> These questions may seem basic, but any help would be greatly appreciated! 
> Thanks in advance!
>

So far I think you've got it.  'dd' is the right utility for doing straight 
binary copy from one file/device to another.  Since your card is showing up on 
/dev/sdb, after step 1 above you now have the original card image backed up in 
the sd.iso file.  This includes the MBR on the card and can be used to restore 
the card image by using dd again in exactly the same way: "dd if=sd.iso 
of=/dev/sdb bs=32k"   Setting the block size to 32k is a performance enhancer 
when writing to the card.

For (2), writing a downloaded image to the card, you must first gunzip the 
downloaded file.  Also note that you need to match the SD card size to the 
image.  Don't try to put an 8Gb image on a 2 gig card and vice versa.  Then 
it's just "dd if=<downloaded unzipped image> of=/dev/sdb bs=32k"  to load it on 
the card.  Note that it takes a loooooong time to write to an SD card this way, 
so be patient.  Since you are writing a complete filesystem image to the card 
including the MBR there is no formatting necessary.  Just plug in a card and go.

For (3) see step one above, just write your original sd.iso image back onto the 
card with dd.

Things to remember:

dd is a very low level operation, no formatting or partitioning of a card is 
necessary to use it.

Use the block size (bs=32k) parameter to improve performance when writing to sd 
cards.  Leave this off when saving image from the card to disk.

Match downloaded binary image size to card size.  Note that the downloaded 
binary image is usually about 10% smaller than the size of the card in order to 
allow for the size of the card to shrink slightly over time due to sectors 
wearing out.

Be sure to unzip downloaded images prior to writing to SD card.

-Jeff



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU