Skip to content

Instantly share code, notes, and snippets.

@kapusta
Last active December 13, 2020 22:59
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 kapusta/4b324435c652444bb88cbbee841ecb51 to your computer and use it in GitHub Desktop.
Save kapusta/4b324435c652444bb88cbbee841ecb51 to your computer and use it in GitHub Desktop.
Backup a #pizero Disk

Backup a #pizero to Disk

This guide assumes you're using a Mac, an SD card and the disk mounts at /dev/disk2

List disks

Find the disk...

diskutil list

Look for the disk that matches the size of the SD card you put into the card slot. Again, we're going to assume it landed at /dev/disk2

Now unmount it...

diskutil unmountDisk /dev/disk2

Copy from SD to your machine

sudo dd bs=1m if=/dev/rdisk2 of=rpi-w.img

Copy from your machine to SD

sudo dd bs=1m if=rpi-w.img of=/dev/rdisk2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment