Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
2015: NOOBS makes all this nice and simple. – Thorbjørn Ravn Andersen Jul 1 '15 at 11:18
up vote 21 down vote accepted

Easy Install & Resize the SD Card on the Raspberry Pi on Ubuntu.

  1. First, open a terminal and install the ImageWriter and GParted utilities with apt-get:

    sudo apt-get install usb-imagewriter gparted
  2. Assuming you are starting with a fresh install, download the newest release from the Raspberry Pi download site.

  3. Extract the downloaded archive, and then open ImageWriter by typping in a console:

    sudo imagewriter
  4. Select the desired .img file and target device, in this case, debian6-19-04-2012.img, and /dev/mmcblk0

    enter image description here

  5. Once the image write has completed, the next task is to repartition the SD card. Note: this process can be done at any later as well, it is not limited to only during initial setup!

For 13.04 you can find packages here.

If you're interested on resizing your SD CARD, check the source of this answer


share|improve this answer
I had trouble with this, eventually found that I needed sudo imagewriter in order to get it to write to my SD. – Eric Wilson Jan 25 '13 at 13:22
Sadly, usb-imagewriter is no longer available for Ubuntu 13.04 or higher because some fool decided it was "too slow" and took it out of the package repository. I've been trying other solutions, the dd tool is kind of scary but should work. – Milimetric Apr 6 '14 at 22:03
@Milimetric You can find packages for 13.04 here: – LnxSlck Apr 7 '14 at 9:15
Thanks for the link LnxSlck, I kind of gave up on that route though. I tried downloading from launchpad and Ubuntu Software Center says "dependency can not be satisfied: hal". I would go down the rabbit hole but I've learned my lesson with Linux: stop at the first error. Otherwise you regret it 10 errors in :) – Milimetric Apr 7 '14 at 12:27
@Milimetric Remember that the fun in Linux is learning, even if you learn by mistake – LnxSlck Apr 7 '14 at 21:44

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

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.

share|improve this answer
I prefer recognizing the drive name with the help of sudo fdisk -l. – Rafał Cieślak Jun 4 '13 at 18:47
Adding bs=4M to the dd can significantly improve performance. – Boris Brodski Apr 16 '14 at 19:36
This looks like a canonical answer. Can you add the bit with "sudo fdisk -l"? (if it makes sense) – Peter Mortensen Jan 3 '15 at 3:14
I typically use df -h once I see the name of the drive on the right you can tell if it's sda, b c on the left. – onaclov2000 Dec 28 '15 at 20:33

On Ubuntu 14.04 right click on the installer image and choose Open with disk images writer. Select your SD card unit and press Start.

Or open Brasero from dash and select Write Image.

share|improve this answer
the first of these should be the marked answer. With dd the potential to destroy some partition or disk is imo greater than with that GUI tool – erikb Nov 24 '14 at 12:25
It is not possible with brasero it dosen't know .img extension. – Creator Aug 21 '15 at 12:08
By far, the simplest solution on Ubuntu. – brunofitas Mar 29 at 0:01
This method has the advantage of working on 15.10 also, but the drawback that it won't work for the NOOBS installer that many users will be interested in as NOOBS does not use a .img file. – TenLeftFingers May 11 at 20:26

On 13.10 I couldn't get usb-imagewriter to install E: Unable to locate package usb-imagewriter.

I found that plain old gnome-disks command Disks from desktop worked. You can select the usb drive and have the option to Restore disk image.

share|improve this answer
Using xubuntu 14.04. This worked for me. – clyde Jan 16 at 22:31

use Startup Disk Creator . it should be installed on Ubuntu by default. worked for my very well. Have Fun!

share|improve this answer

I have found a simple but powerfull way to solve it.. its in Hope it helps

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – guntbert Aug 3 '13 at 21:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.