Disk image files commonly come in three types; .dmg, .img, and .smi (essentially, .smi is a self-mounting image). When a user double-clicks these files, they mount as virtual disks under the /Volumes/ directory, along with the boot volume and other mounted volumes. Prior to Mac OS X (specifically, Mac OS 9), disk image files were created using New Disk Image Format (NDIF), a file fork/data fork format. Disk Utility now uses Universal Disk Image Format (UDIF), which permits administrators to created bootable DVD/CDs from disk images. The following table shows what formats can be obtained via the two file types: Supported Disk Image Format Options
While Disk Utility can read all three types of images, it can only create .dmg files. The command-line utility hdiutil can also be used to manage disk images. It maintains a wealth of flags and is very useful when scripting disk image manipulation. Using hdiutil, you can script disk creating, verifying, mounting (both in the Finder and not visible in the Finder), burning, converting, segmenting, hybrid creation, resizing, and other functions. Particularly useful to administrators is the ability to use hdiutil to create disk images that do not mount at the root of the file system, but wherever the administrator chooses (along with the flag -nobrowse which hides them from the Finder). This permits images to be mounted at user loginimages that appear to be part of the file system but in fact are read-only disk images. This script would appear as sregan$ hdiutil mount /Users/sregan/Desktop/ard_admin_2.2.dmg -mountroot /Users/Shared/publicmountpoint -nobrowse The command-line tool drutil can also be used when dealing with CD/DVD burners and drives. |