Using OS X to validate a Raspbian image and write it to an SD card
If you are a Mac user, the process will be a little different from the Windows recipe, but still not too difficult. To do it, we'll leverage OS X's built-in *nix system tools.
Note
Mac OS X used to have a lot of options for easy GUI image writers, but many of them were not updated over time. After Yosemite 10.10.5, the Raspberry Pi community recommends using command-line tools. Fortunately, it is a pretty easy process.
How to do it...
The process for validating and copying a NOOBs installation on OS X is fairly straightforward:
- Open a Terminal window in OS X.
- Next, run
shasum
against the downloaded ZIP file to validate the signature:$ shasum ~/Downloads/2016-05-27-raspbian-jessie.zip 64c7ed611929ea5178fbb69b5a5f29cc9cc7c157 /Users/ed/Downloads/2016-05-27-raspbian-jessie.zip
The Raspbian Jessie download and SHA-1 signature
- If the return value matches the SHA-1 signature provided on the Raspberry Pi downloads page, your file is good and can be unzipped:
Note
As the downloads change, the SHA-1 will change too, so you'll likely be comparing a different number to your shasum output.
$ unzip ~/Downloads/2016-05-27-raspbian-jessie.zip Archive: /Users/ed.snajder/Downloads/2016-05-27- raspbian-jessie.zip inflating: 2016-05-27-raspbian-jessie.img
- Next, look at the filesystem before inserting the SD card:
$ df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 232Gi 216Gi 16Gi 94% 56751574 4163032 93% / devfs 205Ki 205Ki 0Bi 100% 710 0 100% /dev map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home map -fstab 0Bi 0Bi 0Bi 100% 0 0 100% /Network/Servers
- Then, insert the SD card and run the command again:
$ df -h Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 232Gi 216Gi 16Gi 94% 56751576 4163030 93% / devfs 211Ki 211Ki 0Bi 100% 730 0 100% /dev map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home map -fstab 0Bi 0Bi 0Bi 100% 0 0 100% /Network/Servers /dev/disk2s6 63Mi 20Mi 43Mi 32% 512 0 100% /Volumes/boot /dev/disk2s1 1.1Gi 1.0Gi 92Mi 92% 0 0 100% /Volumes/RECOVERY
- As you can see,
/dev/disk2s6
and/dev/disk2s1
were added. This creates two partitions ondisk2
- most SD cards will only have one, but however many there are mounted, you need tounmount
them withdiskutil
:$ sudo diskutil unmount /dev/disk2s1 Password: Volume RECOVERY on disk2s1 unmounted $ sudo diskutil unmount /dev/disk2s6 Volume boot on disk2s6 unmounted
Note
Very important: Running
dd
on the wrong device will be disastrous - use with extreme caution! - There is a critical difference now from typical Linux drives and
dd
use. Let's say you had the aforementioned configuration and see that the SD card disk isdisk2
. For thedd
command, you will change this tordisk2
:$ sudo dd bs=1m if=./2016-05-27-raspbian-jessie.img of=/dev/rdisk2 3833+0 records in 3833+0 records out 4019191808 bytes transferred in 377.097088 secs (10658241 bytes/sec)
Note
The dd command can take a while to run, and doesn't provide any output while it is, so you can get that feeling it might be stuck. Be patient, depending on the speed of your SD Card it could take several minutes to copy. Newer versions of dd (on Ubuntu 16.04 and newer) include the status=progress flag, which will indicate copying progress.
- Finally, eject the disk, and you are ready to go!
$ sudo diskutil eject /dev/rdisk2 Disk /dev/rdisk2 ejected