Ubuntu – How to burn a Raspberry Pi image to SD card from Ubuntu

cd-imageraspberrypisd card

I'm sure this must be fairly simple but can't find it here.

How does one go from having a blank SD card to having an SD card that boots a Raspi?

Best Answer

You can do it from the command line as well. No need to install anything.

  1. Find the name of the device of the plugged in SD-card. For instance I typed ls -la /dev/sd* before and after plugging in the sd-card. I saw the date of /dev/sdc change and thus decided that that was the one.

  2. Find the place of the unzipped image, which was /home/username/Downloads/2012-10-28-wheezy-raspbian.img for me.

Type the following (mutatis mutandis):

sudo dd if=/home/username/Downloads/2012-10-28-wheezy-raspbian.img of=/dev/sdc

or with improvements suggested by other users:

sudo dd if=/home/username/Downloads/2012-10-28-wheezy-raspbian.img of=/dev/sdc status=progress bs=4M

and wait for the command to return. It may be quite a while, especially over usb2.

Resizing can be done from the Pi itself in the raspi-config program that starts automatically the first time you boot.

Be careful. Make absolutely sure the device name is that of the SD-card. If you replace it with the device name of your hard drive, your hard drive will be overwritten.

Related Question