I’ve found dd extremely useful when dealing with older or otherwise inconvenient disk formats. This was particularly handy for Mac OS Standard / HFS media because OS X 10.6 Snow Leopard treated HFS as read-only. I also used it for Raspberry Pi media containing Linux filesystems that OS X did not natively understand: block imaging does not require the Mac to understand the filesystem. Using the raw-device form, rdisk rather than disk, made the copy much quicker in my tests.
I tried Paragon ExtFS around this period, but in my setup it seemed to corrupt disks fairly quickly. That was my experience, not a general finding about every version of the software.
The blocks below preserve my original working notes, including the example disk3, root shell and /test.img path. They mix commands with instructions and are not paste-ready. The wrong dd output device will overwrite the wrong disk. Identify the actual device with diskutil list, unmount its volumes before imaging or restoring, and verify the input and output paths. Do not copy disk3 literally.
Copy original USB device to disk image
Open Terminal
diskutil list (my USB drive was disk3)
sudo -s
Enter password
dd if=/dev/rdisk3 bs=1m of=/test.img
Wait a long time, check Activity Monitor for disk activity.
Copy disk image to new drive
Open Terminal
diskutil list (my USB drive was disk3)
sudo -s
Enter password
dd if=/test.img of=/dev/rdisk3 bs=1m
Wait a long time, check Activity Monitor for disk activity.
Update Oct 2015: Since OS X 10.11 El Capitan was released, I found a great little program called ApplePi-Baker, then at version 1.81. I was unsure whether the commands above still held up under El Capitan, but they had worked well for me in 10.6 Snow Leopard.
Sources
- Apple - File System Programming Guide: File System Details - documents Mac OS Standard / HFS support limitations in later OS X releases.
- Apple Open Source - dd manual - documents the input, output and block-size operands.