Picking an operating system for this endeavor wasn’t too difficult of a task. I’ve spent a lot of time tinkering with Debian on servers and Ubuntu on PCs, so the decision to go with Raspbian over Arch Linux was pretty painless. You can head over here to check out the Raspberry Pi Foundation’s documentation on installing Raspbian, or back up a step in their docs to look at info on installing different operating systems. I’ll be installing from a Macbook Pro, but if you need instructions installing Raspbian from a different operating system, check out the links here.
So, you’ve bought your SD card or grabbed one you had laying around and downloaded the Raspbian image, so now what? First things first, pop the SD card into the machine and open up Disk Utility. You’ll want to start with a fresh, clean slate, so let’s format it.
Once that is done, open up terminal and run the following command:
$ diskutil list
This is going to show us a list of all the disks attached to the machine. Were going to be looking for the SD card you have installed. Be careful, however, if you have any flash drives of the same size that you identify the SD card so that we don’t install to the wrong device! Next, run the following command:
$ diskutil unmountDisk /dev/disk2
where /dev/disk2 is the path to your SD card. This can vary depending on your system and number of hard drives/flash drives/etc that you have installed. Once the SD card is unmounted, run the command:
$ sudo dd bs=1m if=path-to-your-raspbian-img of=/dev/diskN
Of course, change out the “
if=” value for the path of your Rasbian image and change the “
of=” value to the path to your SD card that you found previously.
The process of writing the image to the card can take some time depending on the speed of the card and the size of the image. Usually, it takes long enough for me to get up, grab a cup of coffee, stretch my legs and it’ll be done when I get back. Your mileage may vary.
Once it’s done, you’re set! Pop the SD card into your Raspberry Pi, connect a keyboard and a monitor, power it up and you’re set! In the next post we’ll take a look at the initial configuration and a few tools that will help make the rest of the process easier.