Linux
Apache
MySQL
PHP

CSS
XHTML1.1
XML/RSS

Creative Commons

2009-03-11 10:24:30

Create an ISO from a CD on a Mac

Sometimes Macs are too user friendly. Sure, as soon as you put in a CD it automounts, puts an icon on your desktop, and you can immediately start accessing the files contained on the CD. But what if that's not what you want to do? Do you have any other options? At a first glance, it appears not.
On linux, at least when I configure the host, CDs don't automount. All I have to do is pop in a CD and run the `dd` command to make my ISO. On a Mac, it's slightly harder. You can't use `dd` right off the bat because the CD has already been mounted, thus the device is busy. You can't use `umount` to unmount the CD because OSX uses it's own smarter (so they think) automounter. After about 30 seconds of being frustrated I tweeted for help. @matzie replied with this article that gave me the key piece of info I needed to make this all work.
The steps are easy: unmount the CD, make the ISO with `dd`, profit! But that's too many steps. I wrote a tiny shell script to do them for me. After adding the x bit and placing it somewhere in your PATH, all you have to do is execute `makeiso filename.iso` and it'll make you a nice little (or not so little) ISO file in your current directory. Here is the code for the script:
#!/bin/sh /usr/sbin/diskutil unmountDisk /dev/disk1 echo "\nCreating ISO $1\n" dd if=/dev/disk1 of=$1 echo "\nISO $1 Created\n" /usr/sbin/diskutil eject /dev/disk1


Back


Post a comment!

Name:
Comment: