Raspberry Pi with little SD cards

If you have an old SD card that’s less than the 2gb needed to run the blessed Raspbian (Debian Wheezy) Linux distro made for the RPi, or like me, you had a 4gb SD card but a bad spot turned it into an 870mb SD card, fear not. If you’ve got a thumb drive you can trivially carry on. Here’s how.

First thing is to copy the image file to both devices with commands like this, after:

1) BEING SURE you substitute your /dev/paths and

2) Unmounting the card and/or thumb drive before copying images over the top of them

sudo dd if=2012-07-15-wheezy-raspbian.img of=/dev/sdk ; **>>MY<<** thumb drive

sudo dd if=2012-07-15-wheezy-raspbian.img of=/dev/sdi ; **>>MY<<**SD card

If the SD card was 64mb or better, then you should have an intact copy of the FAT filesystem on the front of your card, and if you have a current Linux system it automagically mounted . If not, mount it with something like mount -t vfat /dev/sdi1 /somepath and then cd into /somepath (or the actual filesystem typically under /media).

Edit cmdline.txt to look like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait

Then cd out of this filesystem and umount it, put the card into your Raspberry Pi and the thumb drive into one of it’s USB sockets (or a hub socket) and power it up. The command line above will tell the system on the SD card to mount the root filesystem on the thumbdrive instead of trying to use the (uncopied or corrupt/incomplete) 2nd partition of the SD card.

 

Leave a Reply

Your email address will not be published. Required fields are marked *