One step ISO creation from folders in OS X


Icons from the Tango Desktop Project

Here’s a great little trick I discovered this afternoon. Previously, if I wanted to create an ISO image to either burn or mount in a VM, I’d do this:

  1. Create “CD/DVD master” from a folder using hdiutil or Disk
  2. Convert to a “hybrid image”
  3. Rename the file from *cdr to *iso

I’m not sure how long we’ve been able to do this, but you can specify it with just one command now, using the “UNIV” flag. For example:

% hdiutil create \
    -volname MSDOS6 \
    -srcfolder EN_MSDOS60 \
    -ov -format UNIV \
% mv image.dmg image.iso

Okay I cheated, there are two commands there. Still, now I have a way to create an ISO image I can mount in virtual machines (or burn) without a conversion step.

If you’ve found that useful, feel free to bankroll me an upgrade to the latest VMware Fusion on the Buy me a Coffee page. Hey, one can dream, right? ^_^

The rather retro set of icons above are from the Tango Desktop Project, originally assembled for this FreeBSD post in 2009.

Update: The other way

I had a few people ask me what I meant by “convert to a hybrid image” in my original procedure above. In a nutshell, if you’re created a “CD/DVD master image” and have a something.cdr file, you can convert it by doing this:

% hdiutil makehybrid -iso -joliet -o image.iso image.cdr

Creating a hybrid image from the start negates this step, though perhaps there are circumstances where this approach may be preferable. Happy imaging!

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.