-
-
Save ryanburnette/88e640dec02960e07cceb708a52f8439 to your computer and use it in GitHub Desktop.
macOS create disk image then write it back again
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
# find disk by checking mount | |
diskutil list | |
# unmount disk | |
diskutil unmountDisk /dev/disk2 | |
# create image | |
sudo dd if=/dev/disk2 of=foo.img.dd bs=512 | |
# verify image | |
$ file foo.img.dd | |
# restore | |
sudo dd if=foo.img.dd of=/dev/disk2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment