Monday, November 26, 2012

Create SD card for Raspberry Pi using command 'dd'


This is mostly for my own reference in case I need to create another SD card some time.  All commands are executed in Linux...

sha1sum <image filename.zip>
  • Extract the image file using 
unzip <image filename.zip>
  • Insert the SD card in the reader (or adapter or whatever)
  • In my case, on my Linux virtual machine, I had to pull down the 'devices' menu and choose the USB device to make the device visible in virtual machine
  • To see the device name (it was /dev/sdb1 and /dev/sdb2 in my case) type
df -h
  • Unmount the device using 
umount /dev/sdb1
umount /dev/sdb2
  • The name sdb1 indicates the device name (sdb) and the partition number (1).  In the next step, use only the device name, not the partition so that the image is written to the ENTIRE card.  (I made the mistake of using sdb1 instead of sdb and it burns a card that doesn't boot.)
  • Copy the image to the SD card using 
sudo dd bs=4M if=<image filename.img> of=/dev/sdb
  • Wait about 10 minutes
  • To flush the cache to the card run 
sudo sync
  • Insert the card in your Raspberry Pi and have fun!
Also, see my followup post on how to Clone your Raspberry Pi SD Card


Check out my YouTube channel:  www.youtube.com/KedarWarriner

No comments:

Post a Comment