Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

4 Answers

up vote 13 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

Source

share|improve this answer
1  
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 at 22:03
1  
@Milimetric You can find packages for 13.04 here: launchpad.net/ubuntu/raring/+package/usb-imagewriter –  LnxSlck Apr 7 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 :) xkcd.com/349 –  Milimetric Apr 7 at 12:27
    
@Milimetric Remember that the fun in Linux is learning, even if you learn by mistake –  LnxSlck Apr 7 at 21:44
add comment

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
2  
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 2 days ago
add comment

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
add comment

I have found a simple but powerfull way to solve it.. its in http://lawrencematthew.wordpress.com/2013/08/04/installing-raspbian-os-using-ubuntu-pc/ Hope it helps

share|improve this answer
1  
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
add comment

Your Answer

 
discard

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.