MacOS – How to Create Images with Yosemite

disk-utilitymacos

I have a Mac Mini configured just the way I like it with 10.10.2 installed. I need to deploy that to a bunch of other computers around campus. The usual process for me in the past has been to use an external USB drive, with OS X installed, to boot the target Mac and capture an image. That really doesn't seem to be working in Yosemite. I can boot to my 10.10.2 USB drive and run Disk Utility, but odd things happen when I try to create an image. When I try to image the partition, OS X doesn't dismount the target partition/disk. In past versions of OS X, the target partition was immediately dismounted after I entered my password. Lastly, I cannot "scan the image to restore", that part fails even though I can successfully create the image file. The error message is: Unable to scan "image.dmg" (internal error). Has anyone else seen this? I've tried making several images already.

Thanks

Best Answer

If you are able to mount the drive, you can use Copy Copy Cloner or even better (IMO) SuperDuper! from Shirt Pocket. SuperDuper! will not copy caches and unnecessary files that are re-created upon boot, saving space. These both give you clones of the drive, but not images. If you can restore the clone, then this might work.

If you're savvy with a Terminal, you can use the basic diskutil and dd commands to get a disk image - this is what Disk Utility is likely doing under the hood. Just be careful with the input/output parameters of the command, to ensure you don't overwrite something you're not supposed to.

For example, you can find a disk and the partition you want with:

diskutil list

Then, to unmount the disk:

diskutil unmountDisk /dev/disk<n>

where the "<n>" is the disk number of the drive you want to image. Finally, create an image using some form of:

sudo dd if=/dev/disk<n>s<p> of=/path/to/image.img bs=1m

where the "<n>" is the disk number and "<p>" is the partition number you found above. Do not type any of the brackets (<>) as part of the command. There are other options you can add, and you can adjust the block size (bs) accordingly.

I just found more information at another post here: What is the best way to clone a disk between two Macs?