1 (edited by pete_c 2011-02-19 06:01:01)

Topic: What is the proper way to Image, Restore and Expand MicroSD

I currently have a "sort of" working backed up from the original image.  Initially I was just doing a byte copy of the original microSD (via XP) then writing the image to a second microSD.

What is the proper way to back up and restore your image?

So far I have no issues with removing microSD card; plugging it into my Linux Laptop.  I also plugged in a spare formatted USB memory dongle (4Gb).  Is the following correct?

I check first what is what using "FDisk -l".  Mount the USB memory stick

1 - mkdir /tmp/dongle
2 - mount /dev/sdc /tmp/dongle
3 - CD /tmp/dongle
4 - dd if=/dev/sdb of=infocast_disk.img
5 - put away my original image
6 - insert a new microSD card (I chose a 16Gb - too big though?) 
7 - dd if=infocast_disk.img of=/dev/sdd

Now this is where it gets a bit confusing for me.  I utilize GParted and see what appears to be 4 partitions.  The first partition I cannot see any data.  The second and third partition appear to be mirror images of each other.  The fourth partition appears to be the "storage" partition.  I have read that the 4th partition is really an Extended partition with two partitions in it.  Is this just the Chumby or is it the same on the Infocast?

So I take the 2nd and 3rd partitions and resize them equally with Gparted.  I do the same with the Extended partition.

The MicroSD card boots up in the Infocast but I've noticed that if I run the GCC tools install; it quits about 3/4 of the way thru.  I then try to update with an image on a USB dongle (IE by pressing on the screen when booting).  It only goes about 25-40% and quits (is this just a junk memory stick?).  BTW - I have GCC loaded and running on original 2Gb microSD card.

I also see that partitions 2,3,4 & 5 are all Ext3 type partitions.

Is this the correct way to image and expand original microSD? 
Am I have problems with my GCC install because of a junk microSD card?

I have noticed that the Infocast is resilent somewhat.

Re: What is the proper way to Image, Restore and Expand MicroSD

You only need to make a byte-for-byte backup of the first partition, though it can be recreated using the tools within the rootfs if you know what you are doing.
The next partitions (Rescue & System) just need to be tarballed, and can be made larger on your new card if you want. The last partition you just need to create and write "reformat me" to, it will be formatted on the first boot.

Re: What is the proper way to Image, Restore and Expand MicroSD

Thanks GA.

So we have only 4 partitions on the 2Gb Infocast 8" device.

1st partition is the only one of concern. 

I am curious what type of FS is on it as I cannot see it when I take the microsd card out of the Infocast.

Re: What is the proper way to Image, Restore and Expand MicroSD

Partition 1 (/dev/mmcblk0p1) is a "Chumby Config" partition.
It is 9.2MB, starting on sector 4 and ending on sector 18439 in both of the systems I have.
There are 3 files, u-bt, krnA, krnB.
U-Boot commands starting with cconfig let you list files present, and load them into memory.

source code for u-boot is available on the source code page: http://files.chumby.com/source/
I am not sure if the tools for generating and writing to the cconfig partition are available in source form, but check the other silvermoon packages.

The simplest way to move from a smaller sd to a larger one is to dd the entire drive from the 2GB to the larger, then use gparted to resize the storage fs.  Recreating the partitions from scratch isn't always easy.

Re: What is the proper way to Image, Restore and Expand MicroSD

GrizzlyAdams wrote:

The simplest way to move from a smaller sd to a larger one is to dd the entire drive from the 2GB to the larger, then use gparted to resize the storage fs.  Recreating the partitions from scratch isn't always easy.

Is it possible to do this on a windows machine, or does one need a linux box?
Thanks!

Re: What is the proper way to Image, Restore and Expand MicroSD

Best to do it on linux. There is a gparted live cd you can use for just such use.