One step ISO creation from folders in OS X

· Read Later

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 Utility.app
  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 \ 
    image.dmg
% 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!


Feedback and support

For comments and questions, tweet out to @Rubenerd_Blog, or email me at weblog at ruben schade dot com. Let me know if you don't want your comment posted.

Instead of running banner ads or tracking you with JavaScript, I also accept the following donations or referrals if you found something useful or fun. Thank you :).