This is the first of a series of articles about RaspberryPi, I’ll start with a few introductory tutorials to get you up and running.
The first thing you’ll want to do once you have a Raspberry Pi is set it up with an operating system. If you’re wondering about the best place to buy a Raspberry Pi, I’ve been happy ordering from Newark Canada. Unlike an Arduino that runs only the small program that you upload into it, RPi boots up with a full operating system (typically some type of Linux distribution) that’s on its SD card. There are several variations of the RPi OS that can be found there at eLinux.org’s distribution list.
For now let’s start by installing the general purpose operating system Raspbian – a version of Debian Linux specifically configured to run on the Raspberry Pi and is recommended by the Raspberry Pi Foundation as the operating system to install.
You’ll be able to download Raspbian for free from the Raspberry Pi website. Look for Raspbian with the subtitle ‘Debian Wheezy’, download either the torrent or direct download.
Once you have the ZIP file downloaded to your computer, unarchive it. Sometimes double-clicking on the Zip file doesn’t expand the archive and you end up with a archive of a Zip file. If that’s the case you’ll need to open the Terminal and type in:
The result will be the disk image (.img file) that you will flash to the Raspberry Pi’s SD card. You will need an SD card with at least 4GB capactity. I suggest you look at the list of SD cards that are compatible with Raspberry Pi. I’ve been using 16GB SanDisk Extreme Class 10 disks, they work well.
Erase then Unmount the SD Card
Macs come with an app in /Utilities called Disk Utility, select the SD Card item in the list on the left. Click the “Erase” tab that appeared on the right hand pane. You’ll see a “Format” option and a “Name” field. Choose “MS-DOS (FAT)” as the format and enter a name. For the FAT-32 format, the name must be uppercase, I suggest something like “RASPBIAN.”
Then select the name of the SD card in the left column again and click “Unmount.” It’s important that the disk be unmounted.
Flash the Disk Image
Go back to the Terminal and type the following command, ensuring you replace the “[FILESYSTEM]” value with the one you noted earlier and the “[DISK IMAGE NAME]” with the proper file name obtained above.
sudo dd bs=1m if=[DISK IMAGE NAME] of=[FILESYSTEM]
For me, the command would look something like this:
sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/rdisk4
Hit enter, and wait until the command to complete. This takes a while and unfortunately it the dd command doesn’t give us any signs of progress. You can hit the CMD T keys to get a bit of data about how much it has copied. Depending on the SD card’s speed this process can take up to 10 minutes. Once dd flashes the disk image, you can remove it from your Mac and plug it into your Raspberry Pi.
If you’d like to do this on something other than a Mac have a look at these comprehensive instructions.