User Tools

Site Tools


backing_up_sd_card_using_a_macintosh_computer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
backing_up_sd_card_using_a_macintosh_computer [2013/07/02 16:45] – created k9dcbacking_up_sd_card_using_a_macintosh_computer [2014/01/26 16:57] (current) k9dc
Line 1: Line 1:
 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. 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 deactivated by default on new Macs. But it can be activated. See  http://support.apple.com/kb/PH11331 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 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  http://support.apple.com/kb/PH11331 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.  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. 
Line 9: Line 9:
 We need to determine what the SD card is called by the OS. Use the command below... We need to determine what the SD card is called by the OS. Use the command below...
  
-   [If you only have a single hard drive in your Mac (disk0), it will probably  +<code>diskutil list</code>
-   be disk1.  If the SD card is something else, use that number in all the  +
-   examples 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@DGingrich-MBPr:~$ diskutil list+<code>dave@MBPr:~$ diskutil list
 /dev/disk0 /dev/disk0
    #:                       TYPE NAME                    SIZE       IDENTIFIER    #:                       TYPE NAME                    SIZE       IDENTIFIER
Line 26: Line 28:
    0:     FDisk_partition_scheme                        *3.9 GB     disk1    0:     FDisk_partition_scheme                        *3.9 GB     disk1
    1:             Windows_FAT_32                         58.7 MB    disk1s1    1:             Windows_FAT_32                         58.7 MB    disk1s1
-   2:                      Linux                         3.8 GB     disk1s2+   2:                      Linux                         3.8 GB     disk1s2</code>
  
  
 In the sample output above, disk0 is the main hard drive. The SD card is called "disk1” on my Macintosh. 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 local hard drive.+ 
 +==== Part 1 - Making a local copy of the SD card on your hard drive. ==== 
 + 
  
 The partitions must be unmounted. Use the command... The partitions must be unmounted. Use the command...
  
-diskutil unmountDisk disk1 +<code>diskutil unmountDisk disk1</code> 
  
 To make a copy of the SD card to your local drive... To make a copy of the SD card to your local drive...
-   [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+---- 
 +Note: In the example below, replace <user_dir> with whatever your home directory is called, usually your short user name. 
 +---- 
 + 
 + 
 +<code>dd if=/dev/disk1 of=/Users/<user_dir>/pirlp.img</code>
  
 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.   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.+==== Part 2 - Copying the local disk image to a new SD card. ==== 
  
 Replace the SD card with a new one.  Replace the SD card with a new one. 
Line 51: Line 60:
 The partitions must be unmounted. Use the command... The partitions must be unmounted. Use the command...
  
-diskutil unmountDisk disk1 +<code>diskutil unmountDisk disk1</code> 
  
 The command to copy the file to a new SD... The command to copy the file to a new SD...
  
-dd if=/Users/<user_dir>/pirlp.img of=/dev/disk1+<code>dd if=/Users/<user_dir>/pirlp.img of=/dev/disk1</code>
  
 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. 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.
backing_up_sd_card_using_a_macintosh_computer.1372783529.txt.gz · Last modified: 2013/07/02 16:45 by k9dc