Skip to content

Instantly share code, notes, and snippets.

@vasilisvg
Last active November 8, 2019 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vasilisvg/057eafdaafeb36ab88216fd816ffb221 to your computer and use it in GitHub Desktop.
Save vasilisvg/057eafdaafeb36ab88216fd816ffb221 to your computer and use it in GitHub Desktop.

How to backup a bootable Pi image to your Mac

Mount your disk on your Mac.

#returns a list of disks, find yours, could be something like /dev/disk2
diskutil list 

# Unmount disk, weird but true.
diskutil unmountDisk /dev/disk2

#takes a while. CONTROL + T shows progress. And indeed, it’s rdisk, not disk
sudo dd if=/dev/rdisk2 of=/location/on/your/mac/pi20191107.img bs=1m 

How to restore a bootable Pi image from your Mac

Mount your disk on your Mac. If needed, make it FAT with Disk Utility

#returns a list of disks, find yours, could be something like /dev/disk2
diskutil list 

# Unmount disk, weird but true
diskutil unmountDisk /dev/disk2 

#takes a while. CONTROL + T shows progress. And indeed, it’s rdisk, not disk
sudo dd if=/location/on/your/mac/pi20191107.img of=/dev/rdisk2 bs=1m 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment