Creating and Burning Iso-Images on OS X and Linux

After having my Mac Book for a year now, it happened: I needed to burn an iso image. So after checking the web, I found out that there are a bunch of on-board possibilities to do so.

Of course, there’s a graphical way to do so. If you insert a cd-/dvd-r(w), OS X will probably pop up some window asking you what to do with it. Besides opening it in the Finder or iTunes you’d have the possibility to use the Disk Utility application. In there you’ll find a button labeled “Burn” in the Finders toolbar. For me it seems to be always active, but for some other people this toolbar seems to be only active if no device in the left sidebar is choosen. If that is the case for you as well, just click somewhere in the whitespace in that panel.

Click on the “Burn” button, choose your image and off you go.

Still, there’s a even more elegant way, replacing all those GUI tools out there with an equally powerful CLI tool (well you know, beneathe all that Aqua-Look beauty, OS X is a plain, simple and yet powerful Unix!).

In the console just try using hdiutil(1) to burn your image. This is how:

pygospa@laurelin ~ $ hdiutil burn /path/to/cd_or_dvd-image.iso

Pretty neat, huh? A look at the man page of that utility will show you the real power of that tool, having features like integrated checksum checker, the possibility of encrypting the disk, the possibility to create images, etc.

Only wiping a rewritable clean is (as far as I can see) not possible with that tool (correct me, if I’m wrong!). But for that purpose you could use diskutil(8), like this:

pygospa@laurelin ~ $ diskutil eraseOptical quick

As said before, Mac OS X is a Unix, and therefore there’s a bunch of Unix tools available on Mac OS X. Still, hdiutil seems to be an Apple product – at least I couldn’t find any proof of it being an Linux/Unix/BSD tool. So, it seems only fair, to also mention the Linux way of doing it 😉

In Linux I’d use cdrecord. In Gentoo it’s part of the package app-cdr/cdrtools, so you’d have to call emerge -av app-cdr/cdrtools to install those tools on your system (it’s important to tell emerge the fully-qualified ebuild name, as there’s another package virtual/cdrtools, which is not the one we want).

telperion ~ # cdrecord -v dev=/dev/hda /path/to/cd_or_dvd-image.iso

Of course instead of dev=/dev/hda, here you’ll add YOUR CD/DVD burning device, wzich could be something else…

If you’d want to just burn some files, you can use mkisofs(8) to create an iso image out of a directory that contains the files you’d want to burn. This tool’s also part of the cdrtools package, so you’d already have it, if you’d installed it for the cdrecord tool. Just use it like this:

telperion ~ # mkisofs -t -J -o /here/is/the/iso/to_come/image.iso /path/to/filestoburn

On the Mac on the other hand I haven’t found a CLI tool (yet). But you could use Disk Utility to create one. Click on the New Image button at the toolbar, and the tool will create a new .dmg file. You can then drag all the files you want to burn and afterwards (again using the Disk Utility) use the Convert… button to create a .cdr file (in the menu it’s called DVD/CD Master in the image format field).

The .cdr file is similar to the .iso file, so just rename it afterwards, and there you go.

This at least is the only way I know of. I believe there’s a more elegant way, using the CLI. If I find out (or if you know one) I’ll update this (or you could write me a comment ;-)).


2 thoughts on “Creating and Burning Iso-Images on OS X and Linux

Please comment. I really enjoy your thoughts!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s