Protecting your Software Investment
I recently picked up a software program for my kids. The software,
instead of installing itself on your computer, it runs off the CD and
demands that the CD be mounted on the system.
That's a recipe for trouble as grimy little fingers are *help
themselves* by inserting and removing the CD. Yeah, go open your
DVD cases of your movies, and you'll see the results of kid lick in
one of its many forms.
Here is a solution that often works and doesn't require any additional
software… just the stuff that already comes with your Mac.
Sorry that it is all command line, but don't worry about it, you'll
feel like a true geek when you're done.
Step 1. Figure out the Filesystem
Before we can do the work, we need to know the filesystem
device. Open up the
Terminal program (under
Applications/Utilities) and type
Filesystem 512-blocks Used Avail Capacity Mounted on
/dev/disk2 976101312 678451320 297137992 70% /
devfs 239 239 0 100% /dev
fdesc 2 2 0 100% /dev
/dev/disk3s2 976101344 629263616 346837728 64% /Volumes/Time Machine Backups
map -hosts 0 0 0 100% /net
map auto_home 0 0 0 100% /home
/dev/disk4s1s2 849392 849392 0 100% /Volumes/Some Software
Note: In all my examples, the character, "$" is the prompt. You
will most likely have some other text in front of this character (like
the name of your machine and your account name). I've simplified my
prompt for these examples. You will type everything after the
Find the name of the CD that you've inserted into your computer. In
this case, it is Some Software. Look at the beginning of the
line where it starts with
/dev: that is what we are looking for.
Step 2. Unmount, but Don't Eject
We need to have the computer forget about the CD, but we can't just
eject it. We need to
umount (un-mount) the CD. Type the following:
$ sudo umount /dev/disk4s1s2
Notice I used the file system device we figured out in step 1. Also,
we need to do this as "root", so we use the
sudo command. Just type
in your password, and you should be good. (Of course, that is assuming
you are using your system as a user who has administrative privs… if
you aren't… well, that would another entry in this series).
Step 3. Create the ISO Image
We are going to use the
dd command in order to create a file that
contains the contents of your disk. We are going use the *file system
device* that we've used before.Type:
$ sudo dd if=/dev/disk4s1s2 of=SomeSoftware.iso
849410+0 records in
849410+0 records out
434897920 bytes transferred in 145.167758 secs (2995830 bytes/sec)
Step 4. Mount the ISO Image
The last step is to have that ISO image available to be
mounted. Usually, you can just double-click it from the Finder, and
pretend that it is the actual CD from that point.
Often, I get a warning, but you can ignore the warnings.
You can use the
hdiutil command to mount the ISO image as part of a script.
$ hdiutil attach /path/to/SomeSoftware.iso
Are you sure you want to open this disk image? (Y/N) Y
Or better yet, get rid of the warning, via:
$ hdiutil attach -noautofsck /path/to/SomeSoftware.iso
Optional. Automatically Mount
I figured it would be easier for my kids if the CDs I've backed up
were automatically mounted. We can pass our step 4 to
order to have it automatically mounted.
$ sudo launchd -d -- hdiutil attach -noautofsck /path/to/SomeSoftware.iso
Tell others about this article: