Specifications
Chapter 11 Working with NetBoot Service and System Images 183
Using hdiutil with System Images
To manipulate disk images, use the hdiutil tool. You can use this tool to perform many
functions, such as creating, compressing, mounting, unmounting, and resizing images.
You can also display image information and burn images onto CDs. For information
about how to manipulate disk images, see the hdiutil man page.
The following examples provide basic hdiutil tool functions:
To verify an image by comparing it to its internal checksum:
$ hdiutil verify myimage.img
To split an image into three segments:
$ hdiutil segment -segmentSize 10m -o /tmp/aseg 30m.dmg
This creates three separate files: aseg.dmg, aseg.002.dmgpart, and aseg.003.dmgpart.
To convert an image to a CD export image with a .toast extension:
$ hdiutil convert master.dmg -format UDTO -o master
To burn an image onto the CD:
$ hdiutil burn myImage.dmg
To create an image from a folder:
$ hdiutil create -srcfolder mydir mydir.dmg
Using asr to Clone a Volume or to Restore System Images
Use the asr tool to restore a system image onto a volume or to clone volumes.
To clone a volume:
$ sudo asr -source /Volumes/Classic -target /Volumes/install
To restore a system image onto a volume:
$ sudo asr -source
compressedimage
-target <targetvol> -erase
Note: The target drive is erased.