Saturday, June 22

Embedded Linux Made Easy - restore gnublin image to SD card

Messing up the SD card is part of the game when playing with the Embedded Linux board from Elektor.

Elektor's official way of restoring the image to the SD card is by use of the Ubuntu system you are meant to work on when following the tutorial.

you can find the SD image file zipped at the Elektor website

as explained in the README file within the zip archive, to transfer the gnublin.img to the SD card, you have to issue the following command from Ubuntu:

sudo dd if=PATH_TO_SD_CARD_IMG_FILE of=/dev/SD_CARD_ID

for me it was:

sudo dd if=gnublin.img of=/dev/sdb (note it is sdb not sdb1 or sdb2, the image is for the whole card to but written bit by bit)

My Ubuntu is a VM, I use Oracle Virtual Box and there is no problem connecting the SD card reader to it. I have noticed though that it takes a really, really, really long time before the image is transferred to the card.

dd if=gnublin.img of=/dev/sdb
3854336+0 records in
3854336+0 records out
1973420032 bytes (2.0 GB) copied, 4999.44 s, 395 kB/s

this is 1.38 hours!!! I admit there is something quite wrong here which I mean to investigate further. It would seem that all of the three USB 2 SD card readers are seen as USB 1.1 by the VM.

In the meantime though if you want to do this very quickly you can use the same tool that it is used with the Raspberry Pi images. You can easily find it at the official site or here. (Note: remember to run the tools with administrative right otherwise it might not be able to write on your card)



It is slightly cheating on the "Linux purism" that Elektor tries to impose but ...

No comments: