Writing disk images to sd-card on Mac OS X

Writing images to raw disk

In this short tutorial we will write a Raspbian image for a Raspberry Pi to a micro sd-card.

First find out where our target disk is. Insert an (micro) sd-card into the card reader and issue the following command inside the terminal application:

diskutil list

Output should read something like below:

I use a 32Gb card so my card should be /dev/disk1. Your card may have a different name. Note that overwriting the wrong disk may mean you need to reinstall OS X!

Now unmount the sd-card:

diskutil unmountDisk /dev/disk1

It should say now that all volumes on that disk are unmounted successfully. Then it is time to write the image to disk:

sudo dd if=2015-01-31-raspbian.img of=/dev/disk1

You have to use sudo here, because normally mere mortals don't have write access to raw disks. Writing the image takes a few minutes and dd is very uninformative regarding progress so it may seem after a while something is wrong, but you just need patience.

This article is my 5th oldest. It is 168 words long, and it’s got 0 comments for now.