great for RaspberryPi disk imaging and copying.
insert SD card into computer. to see all volumes mounted to machine:
$ diskutil list
locate your SD card. going forward, change {N}
to your disk number.
unmount (but don't eject) the disk you’re speaking to
$ diskutil unmountDisk /dev/disk{N}
$ sudo dd bs=1m if=/dev/rdisk{N} of=/Users/Desired/Path/To/Image/rpi_image_new.dmg
format the disk to FAT32
$ sudo newfs_msdos -F 32 /dev/disk{N}
execute the dd
utility.
- change the
if
(infile) path to the path of your image. - for the
of
(outfile) make sure you use the disk number with r in front (rawdisk).
$ sudo dd bs=1m if=/Users/Path/To/Existing/Image/rpi_image.dmg of=/dev/rdisk{N}
note: you can check the progress of the by hitting ctrl + t
. be careful to not accidentally quit the process (ctrl + c
) or you will need to execute the command again.
after imaging or writing any external volume, you'll want to safely eject the disk.
$ diskutil eject /dev/disk{N}
credit: chris piuggi