Preparing Raspian SD Card

You can use the Raspberry Pi for all sorts of different things—some of which may require their own special operating systems—but to start out, it’s a good idea to get acquainted with the Pi by installing Raspbian, a Raspberry Pi-focused version of Linux. Here’s what you need to do.

Step One: Prepare Your SD Card

First things first, we need to prepare your SD card for the Raspberry Pi. This involves formatting it properly and putting Raspbian, the standard Raspberry Pi operating system, on it. The steps vary depending on whether or not you’re on a Mac, Linux, or Windows PC, I’ve included the instructions for a Mac below.

  1. Download the lastest version of Raspbian and unzip the .img file inside. (It’s almost 500MB so it may take a little while to download.)
  2. Download RPi-sd card builder (be sure to pick the appropriate version for your installed version of OS X) and unzip the application.
  3. Insert your SD card into your Mac using a card reader.
  4. Open RPi-sd card builder. You’ll immediately be asked to choose a Raspbian image. Choose the .img file you downloaded earlier.
  5. You’ll be asked if your SD card is connected. Since we inserted it earlier, it is, so go ahead and click Continue. You’ll be presented with SD card options. If you only have one inserted, you won’t see anything else in the list and it’ll be checked. If not, just check only the card you want to use and click OK.
  6. Enter your administrator password and click OK.
  7. You’ll be asked if the SD card was ejected. This is supposed to happen, as the application needs to unmount it so it can perform a direct copy. Double-check that your SD card is no longer available in the Finder. DO NOTremove it from your USB port. When you’re sure, click Continue.
  8. RPi-sd card builder finishes prepping your SD card, safely eject it and insert it into your Raspberry Pi unit.

RPi-sd card builder isn’t an app so much as it’s an Automator action that acts like one. Some people have reported issues using it, so if you run into problems just open up the Terminal app (Your Hard Drive → Applications → Utilities → Terminal) and follow the instructions for Linux.

Linux

  1. Download the lastest version of Raspbian and unzip the .img file inside. (It’s almost 500MB so it may take a little while to download.)
  2. Open up your Linux terminal emulator of choice. If you don’t have one, try our favorite.
  3. Insert your SD card. If it mounts automatically, unmount it but make note of its location (e.g. /dev/disk2s1). Even though the card is unmounted, do not remove it from the reader
  4. In the command line, you’re going to need to type a single line to copy the contents of the Raspbian .img file to your SD card. It’ll look like this:sudo dd if=PATH_TO_IMG_FILE of=PATH_TO_SD_CARD_MOUNT_POINT bs=1m

    You’ll need to replace PATH_TO_IMG_FILE with the path to the .img file and PATH_TO_SD_CARD_MOUNT_POINT with the path to the SD card mount point. (The bs=1m just specifies the byte size and you don’t need to mess with it.) When you’re done, the command should look something like this:

    sudo dd if=/Users/adachis/Downloads/2012-12-16-wheezy-raspbian.img of=/dev/disk2s1 bs=1m

    It’s very important that you do not get this information wrong or you could end up writing Raspbian to the wrong disk and cause serious data loss. Be careful! When you’re sure you’ve got everything right, press enter.

  5. You will be prompted for the root password (or your administrator password for those of you on OS X who are using this method). Type it and press enter.
  6. It’ll take some time for the dd command to copy everything over to your SD card. While that happens, it’ll probably look like the Terminal froze up. Don’t worry, it’s still working and will likely take longer than an average 2GB copy to an SD card (so be patient). When it finishes, the command prompt will return and your SD card will be ready. Eject it safely and stick it in your Raspberry Pi.

Posted

in

by

Tags:

Comments

One response to “Preparing Raspian SD Card”

  1. […] Check out the following articles on setting up Raspberry Pi: 1. Preparing Raspian SD Card […]

Leave a Reply

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