Tuesday, August 6, 2013

Raspberry Pi Notes (img Backups)

If you have a good build and dont want to loose it....


Grab the SD card out and stick it in the mac, go to a terminal and type


# diskutil list

/dev/disk0
   #:                       TYPE NAME                                       SIZE            IDENTIFIER
   0:                       GUID_partition_scheme                        *251.0 GB   disk0
   1:                       EFI                                                       209.7 MB   disk0s1
   2:                       Apple_HFS Macintosh HD                     250.1 GB   disk0s2
   3:                       Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                                      SIZE       IDENTIFIER
   0:                       FDisk_partition_scheme                        *2.0 GB     disk1
   1:                       Windows_FAT_32 System                    131.1 MB   disk1s1
   2:                        Linux                                                  805.3 MB   disk1s2

# umount /dev/disk1


# dd bs=1024 if=/dev/disk1 of=20130806-raspberry.img

This last one takes about 1/2 hour but it creates an img on the mac that can be dumped to another SD card at will later with:

# dd bs=1024 of=/dev/disk1 if=20130806-raspberry.img

This is how I keep backups of my good builds. Keep in mind that there is no compression involved and a 16G SD disk will take up 16G of space on the mac.

No comments:

Post a Comment