Problems backing up the SD Card. 2GB card = 1GB

Spent a good bit of time wasting there attempting to create a bootable SD with Linux for the SBC.
First I wanted to create a backup of the current SD card so I can put it aside in case anything goes wrong. This proved a little awkward.

I am using VMWare so I have to use a external USB card reader since VMWare doesn’t have access to my internal one. I opened up a terminal window and went to the /dev folder in search of what my USB card reader name is. After bit of investigation it was clearly under /dev/sdd. To create an image of the card I placed my card in the card reader and done a dd -if /dev/sdd -of ~/sdimage.img. This took a bit of time and it finally stopped without errors with a 1GB result. This looked kind of strange to me since it was a 2GB card. I didn’t take anymore notice of it and just tried it out. The SBC screen stayed black and every 10 seconds would attempt a reboot. Clearly it wasn’t booting from SD properly (even though I assumed it would at least boot from NAND Flash). I opened the card in my VMWare machine again and done a fdisk /dev/sdd. Using the p option to print the partition details it gave a few errors about partitions ending on incorrect cylinders. With more investigation I worked out fdisk was reporting my card as 1GB. I tried the original card and I got exactly the same result.
I couldn’t use my internal card reader since not accessible to VMware and I didn’t want to try any windows copying utilities since I’d eventually have to get it working in VMWare anyways. So I rebooted and booted into Kubuntu’s Live CD and done fdisk in there. The card was reporting correctly at 2GB. I done a new copy of the image (storying to my mounted C Drive) and then wrote it back out to the new SD Card and all is well!

I was actually given a USB Card reader in the development kit and I haven’t tried it yet but I’m sure it will work so I will be able to use VMWare and create a new image for the SD card with better partition sizes as currently there’s no hope of storing anything on with the partition being 90% full.

So tomorrow I am going to re size the FS partition and copy over the QT/E binaries and have a go getting that working. I am guessing it won’t go smoothly though especially with tslib and all but nothing really goes smoothly in this project. Learning a lot though so that counts.

Monday, January 26th, 2009 Embedded Linux, Single Board Computer

Leave a Reply

You must be logged in to post a comment.