-
-
Save piuggi/9364f88f2da67d86873a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#rPi IMAGE COPY AND RESTORE | |
#see all volumes mounted to machine | |
$ diskutil list | |
#locate your SD card | |
#change {N} your disk number | |
#unmount the disk you’re speaking to | |
$ diskutil unmountDisk /dev/disk{N} | |
#------------------------------------- | |
#>>> NEW SD CARD FORMAT AND FLASH EXISTING IMAGE <<< | |
#format the disk to fat 32 | |
$ sudo newfs_msdos -F 32 /dev/disk{N} | |
#make sure you use the disk number with r in front (rawdisk) | |
#change the if path to the path of your image | |
$ sudo dd bs=1m if=/Users/Path/To/Existing/Image/rpi_image.dmg of=/dev/rdisk{N} | |
#------------------------------------- | |
#------------------------------------- | |
#>>> CREATING IMAGE OF EXISTING SD CARD <<< | |
$ sudo dd bs=1m if=/dev/rdisk{N} of=/Users/Desired/Path/To/Image/rpi_image_new.dmg | |
#------------------------------------- | |
#eject the disk | |
$ diskutil eject /dev/disk{N} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment