Hdiutil

From Director Online Wiki
Jump to: navigation, search

Hdiutil is a commandline program for MacOSX that creates, manages, and burns disk images. Different functionality is achieved by supplying different verbs. Making hybrid CDs with hdiutil is basically a two step process (requires MacOS 10.3 or greater):

  • First step is to create a hybrid image.
  • Second step is to burn the resulting image.

The simplest way to create a hybrid CD is to create the image using a directory as the source. All data is shared by default:

   hdiutil makehybrid -o yourimage-hybrid.iso yourfolder

Then to burn the image:

   hdiutil burn yourimage-hybrid.iso -speed 8
(Speed is optional. But the default seems to be fast as possible, so I like to specify it.) Insert a disk when requested and that's it.

NOTE: To have more control over the disk layout, you can use a writable UDIF image (.dmg) for the source of the hybrid image. Just make sure it's not mounted when you create the image. To setup the disk layout for OS9 you need the last beta of Disk Copy (6.5b13 or b11). It was never officially released, so Apple doesn't have it on their site (I'm working on that, but not holding my breath!). It can be found on the net, though.

There are many other options for makehybrid. Excluding files from other file systems, what path the finder opens when the disk inserted, etc. Check out man hdiutil for details. The command can be arbitrarily long, so you may want to put it in a shell script with line continuation characters. Or better, read options from a plist via stdin and the -plistin option. Just watch out for illegal xml characters: & ' " < >

--[[User:Cole|CBT]] 15:04, 3 Apr 2007 (MDT)