Apr 14, '09 07:30:00AM • Contributed by: Anonymous
Luckily for us all, this task is possible! I hope to spare you much of the suffering I experienced with this hint. For this occasional task, the hdid utility is your friend. You must use Terminal, as Disk Utility does not support this use.
First, mount the .dmg file as a block device only:
hdid -nomount "/Volumes/Diotallevi/Clean Checkpoints/WDC Image.dmg"
Second, determine the block device of the image and destination:
diskutil list
Third, use dd with an appropriate buffer size to copy over the whole block image, including partition table and boot sector. Note that it is extremely important on some hardware to use a large block size; you can expect a 20x speedup over the case without blocksize parameter.
dd if=/dev/disk3 of=/dev/disk2 bs=131072
Fourth, unmount everything and enjoy your copied disk. I get around two terabytes a day of transfer rate; I know of no way to skip sparse areas of the disk image, but could approximate it by dding the first few megabytes of the image, then using Apple System Restore to copy each volume individually.
Expect large speedups for sparse disks with this method. (This hint originally appeared on my site.)
