Raspberry Pi – an idiots guide to installing Raspbian on a Mac

So, once again I need to admit my ignorance…

A few weeks ago, my friend borrowed my SD card ‘to take an image’ and somehow corrupted it – I don’t know how and neither does he, but he did managed to back up all my files. So, I’ve not used my home Pi for a while because when I tried to follow the instructions to reinstall Raspbian, I got very confused and had a few failure methods on the way so I figured it was time I wrote a real, back to basics, idiots guide to installing Raspbian (by idiots, I mean me by the way).

So to start off, there are various different operating systems you can install on a Raspberry Pi – the most basic one is Noobs, which is the recommended OS for the Pi, however, I’d recommend going straight for Raspbian since it’s unlikely, as a beginner, that you’d want to use linux etc.

Download Raspbian from the Rapberry Pi website here. There are some instructions on this page for installing Raspbian, but I got in a bit of a muddle so let’s go even simpler. I’m a user of torrents so I used this method to download, but as long as you know where the file has gone, you’ll be fine (hopefully it has gone to your Downloads folder).

I’m currently using OSX Yosemite (10.10.3) so here’s how I managed to install Raspbian:

Firstly, I plugged my SD card into the reader on my MBA – You need to find the identity of the disk and you can do that through disk utility or through ‘about this mac’ – here’s a picture guide to this method:

Screen Shot 2015-05-29 at 10.41.23First, click on ‘about this mac’, then ‘system report’:

Screen Shot 2015-05-29 at 10.41.48Finally, select ‘card reader’ to get information about the disk – you will see that mine says “BSD name: disk3” so, very simply, my SD card is disk3.

Screen Shot 2015-05-29 at 10.42.08The next step is to open disk utility which can be found in utilites (accessed by typing in shift +⌘ + u):

Screen Shot 2015-05-29 at 11.02.31

Select your SD card – and choose the ‘Erase’ tab – *Warning* *Warning* *Warning* make sure you have selected the right disk to erase – double and triple check that you have your SD card.

Screen Shot 2015-05-29 at 11.03.17

Screen Shot 2015-05-29 at 11.12.17

Make sure you select Format: MS-DOS (FAT)

Screen Shot 2015-05-29 at 11.03.29

Screen Shot 2015-05-29 at 11.03.43

Screen Shot 2015-05-29 at 11.03.50

Finally, select your SD card and unmount it (not eject!):

Screen Shot 2015-05-29 at 11.04.16

Screen Shot 2015-05-29 at 11.04.23

You’re now ready for a bit of terminal!

When I opened up terminal (in utilities again), I was instantly placed into ‘my’ folder meaning the home directory for my user account (myname) – shown in this picture with a little house symbol.

Screen Shot 2015-05-29 at 11.19.53So terminal has automatically opened the ‘myname’ home directory.

Screen Shot 2015-05-29 at 11.21.31This is where I hit on a real problem – the Raspberry Pi site suggests typing this into terminal:

  • From the terminal run:
    sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn

    Remember to replace n with the number that you noted before!

But, I didn’t know the path of my image! I knew it was in my Downloads folder, but I wasn’t sure how to access it – after an awful lot of trial and error I figured it out!

I was already at the home directory, so I needed to drop into downloads by typing cd Downloads into terminal then I could easily run the code – you’ll notice I changed the ‘diskn’ at the end to ‘disk3’ based on the BSD name I found right at the beginning.

Screen Shot 2015-05-29 at 09.44.04So, my final code looked like this:

Catherines-MacBook-Air:~ catherinelamin$ cd Downloads
Catherines-MacBook-Air:Downloads catherinelamin$ sudo dd bs=1m if=2015-05-05-raspbian-wheezy.img of=/dev/disk3

I was prompted to input my password and then terminal started writing my disk – until terminal finishes the task, I can’t do anything.

Screen Shot 2015-05-29 at 11.31.01

So when it’s all done and the terminal looks like this:

Screen Shot 2015-05-29 at 12.15.05

You can eject your SD card and plug it into the Pi.

Not long after I finished this, I was told by the lovely James of Raspberry Jam Berlin that you can write the image even quicker by using “rdisk3” instead of just “disk3” at the end of the code which should speed things up.

Advertisements