Create ISO Images from the Command Line

Mar 16, 2012 - 3 Comments

ISO You can create ISO images from any source disk or data by using the command line in Mac OS X. This isn’t too different than burning them through Terminal, and you can use either the hdiutil tool or dd command.

While the command line is generally reserved for advanced users, using it to create ISO’s isn’t too complicated and will save you the hassle of having to download any third party apps. If you’re new to the Terminal, remember that dragging & dropping files into the Terminal window will print their full path, making it easy to point to source files and preventing any navigation through the command line.

How to Create an ISO with hdiutil

The most reliable method is uses hdiutil, here is the syntax:

hdiutil makehybrid -iso -joliet -o image.iso /path/to/source

Here’s an example, creating an iso from a Windows 7 installer disc, with the end result showing up on the desktop:

hdiutil makehybrid -iso -joliet -o ~/Desktop/Windows7.iso /Volumes/Windows\ 7\ Install

The -joliet flag is necessary to make the iso fully compatible with Windows and other OS’s, though if your only requirement is to use the iso on a Mac you can leave it off.

Making an ISO with dd

Another approach is by switching around a previously discussed dd command, which makes it go from burning an image to creating an image. This may not be as reliable and it requires additional steps, so use dd only if you have a good reason not to use the primary hdiutil method.

Use the ‘diskutil list’ command to discover the disks identifier that you will need to make an ISO with dd from.

dd if=/dev/dvd of=/destination/path/dvd.iso

dd is often faster than hdiutil, but it’s definitely for more advanced users.

Converting Other Disk Image Formats to ISO

You can also convert other disk images like cdr, dmg, and nero images to ISO, read more about that here if interested.

For some quick terminology, making an image from a disc like this is often called ‘ripping’, whereas turning a disk image into a disc is often called ‘burning’, they are essentially the opposite of one another.

.

Related articles:

Posted by: William Pearson in Command Line, Mac OS, Tips & Tricks

3 Comments

» Comments RSS Feed

  1. asdf12 says:

    you dont need 3rd party apps for a GUI, since Disk Utility is provided by apple and is a front end to running binaries like dd. all macs have disk utility app

  2. Ben Mordecai says:

    For some reason I got an insufficient permissions, so I just added sudo and it worked great.

  3. Theo Vosse says:

    Pretty handy.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site