How to create a hybrid HFS/ISO disc

If you create the disc (or disc image) with Roxio Toast, it'll put a few extra files in there no matter what you do (namely the files "Desktop DB" and "Desktop DF"). However there's a better way which will put in the filesystem(s) only the files you want it to. Use the hdiutil command in a terminal! Smiling

Eg.:
hdiutil makehybrid -default-volume-name "My DVD Volume" -hfs -iso -joliet -o my_image_file ~/Source_Directory

This will create an image file with the name "my_image_file.iso" from the contents of the folder ~/Source_Directory and it'll put a hybrid of an ISO+Joliet and a HFS+ filesystem in the image, and no extra hidden files! You can write the resulting image file to a CD/DVD using any burning utility (Disk Utility, Toast or hdiutil itself).

If you already have a hybrid CD/DVD (or an image) and jut want to add a few more files (or remove a few), then copy the contents of the disc/image to your hard drive using the command line:
cp -pR "/Volume/Some Disc/*" "/Volume/Some Disc/.*" ~/Source_Directory

The -pR switches will copy all files (hidden ones too) recursively preserving file permissions and symbolic links.

PS: the manpage of hdiutil states that in case you do not specify the filesystems for the makehybrid command, it'll put all four (ISO, Joliet, HFS and UDF) in the resulting image. However in my case the image contained only HFS and UDF filesystems. Specifying all filesystem types on the commandline ended up with the same image (containing only HFS and UDF filesystems). However leaving out UDF resulted in what I was aiming for: an image with an ISO/Joliet and a HFS filesystem.

Syndicate content