
Imaging and Cloning Volumes Using ASR
You can use Apple Software Restore (ASR) to copy a disk image onto a volume or prepare existing disk images with checksum information for faster copies. ASR can perform file copies, in which individual files are restored to a volume unless an identical file is already there, and block copies, which restore entire disk images. The asr utility doesn’t create the disk images. You can use hdiutil to create disk images from volumes or folders.
You must run ASR as the root user or with sudo root permissions. You cannot use ASR on read/write disk images.
To image a boot volume:
1Install and configure Mac OS X on the volume as you want it.
2Restart from a different volume.
3Make sure the volume you’re imaging has permissions enabled.
4Use hditutil to make a
5Mount the disk image.
6Remove cache files,
7Unmount the volume and convert the
hdiutil convert -format UDZO pathtoimage -o compressedimage
8Prepare the image for duplication by adding checksum information:
sudo asr -imagescan compressedimage
To restore a volume from an image:
$ sudo asr
See the asr man page for command syntax, limitations, and image preparation instructions.
52
Chapter 6 Working With Disks and Volumes