User Tools

Site Tools


It is easy to make a backup of your SD card on a Macintosh. All the programs and utilities you need to do it, are included with OS X. You will need to use the terminal, which works very much like the bash shell on the node itself. Terminal is found in the Applications/Utilities folder on the Mac.

The instructions below assume you have become root on the Mac. The root account is not activated by default on new Macs. But it can be activated. See for information on how to do that. Once activated, you can become root with 'su -' (just like on the node). Without the root account active, you will have to precede all the commands below with a 'sudo'. Be VERY CAREFUL with the root account, or even sudo. You can very easily destroy your Mac OS X installation with a single keystroke.

The process described below is a two step maneuver. The first part creates an image file copy of the SD drive, on your local hard disk. The second part copies that image file to a new SD card in the slot. If you need to make more than one copy, simply perform the second part more than once.

Insert your original SD card into the memory slot (all recent Macs have an SD slot).

We need to determine what the SD card is called by the OS. Use the command below…

diskutil list

Note: If you only have a single hard drive in your Mac (disk0), the SD card will probably be disk1. If the SD card is something else, use that number in all the examples below.

dave@MBPr:~$ diskutil list
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *751.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            749.1 GB   disk0s2
   3:                 Apple_Boot Recovery HD             1.8 GB     disk0s3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *3.9 GB     disk1
   1:             Windows_FAT_32                         58.7 MB    disk1s1
   2:                      Linux                         3.8 GB     disk1s2

In the sample output above, disk0 is the main hard drive. The SD card is called “disk1” on my Macintosh.

Part 1 - Making a local copy of the SD card on your hard drive.

The partitions must be unmounted. Use the command…

diskutil unmountDisk disk1

To make a copy of the SD card to your local drive…

Note: In the example below, replace <user_dir> with whatever your home directory is called, usually your short user name.

dd if=/dev/disk1 of=/Users/<user_dir>/pirlp.img

The command above (dd) reads the input file (the SD card) and makes a file copy of it in your user home directory on the MAC.

Part 2 - Copying the local disk image to a new SD card.

Replace the SD card with a new one.

The partitions must be unmounted. Use the command…

diskutil unmountDisk disk1

The command to copy the file to a new SD…

dd if=/Users/<user_dir>/pirlp.img of=/dev/disk1

It can take some time for the copy to complete, like 60-80 minutes. The speed is on the order of 1 MB/sec, regardless of the rated speed of the card. You do the math.

Pop the backup SD in your Pi, and power it up. Plus, you now also have a copy in your Mac home directory should you need it again.


backing_up_sd_card_using_a_macintosh_computer.txt · Last modified: 2014/01/26 08:57 by k9dc