How to mount the Windows partition of a hybrid DVD

A client of mine has an older Lenovo laptop with a defective DVD drive. He’s saving for a MacBook Air rather than spend money fixing it! I downloaded the installer for his new Fujitsu ScanSnap so he could get up and running right away. But the DVD has goodies that you can not download, so I offered to bring it back home and copy the installers to a USB stick. When I put the DVD in I only get the Mac partition. So here’s how I worked around it:

You need to have a mount point for the Windows partition, on the Mac one gets created in /Volumes when you mount something, we need to make one, so pop open your Terminal and do:

mkdir /Volumes/windows

This creates a directory named “windows”. You can name it whatever you want.

Now you need to find the device name of the DVD:

diskutil list

and, since the DVD is in the drive, you’ll see it come up as a device, and some partitions. In my case it was:

/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *3.3 GB disk1
1: Apple_partition_map 17.9 KB disk1s1
2: Apple_HFS ScanSnap 943.7 MB disk1s2

To mount the Windows side of the CD:

sudo mount -t cd9660 -r /dev/disk1 /Volumes/windows

sudo to prove we are an admin (SuperUser DO), and the mount command with options to mount 9660 format, the device and the path to mount it at.

It showed up as expected, and then I copied the installers I needed. You can try dismounting it in the Finder, but that will not work, you need to unmount it like this:

sudo umount /Volumes/windows

Note that it is umount not un-mount.

Then go and delete the directory, in the Finder or on the command line:

rmdir /Volumes/windows

After that, you can eject the CD normally, or if you tried from the Finder and can no longer see it, do it from the command line:

diskutil eject /dev/disk1

No I did not figure this all out on my own, I used an article from the codeweavers support wiki. Thanks!

Controlling iTunes from the command line

I had a little fun the other day, making a script that would pause iTunes, from the command line. In the end I made ones to pause, play, and go forward a track.

All of them use a slightly modified version of a line of Applescript:

tell application “iTunes” to play

You can also tell it “to next track, to pause, to stop, to previous track”, which all work as expected.

To get it to work on the command line you’ll need to turn it into a script, which is a plain text file with some command line options in it. To get Applescript to work on the command line we need to use osascript, with the “-e” option.

Here’s what you should have in your file:

#!/bin/bash
osascript -e “Tell application “iTunes” to pause”

Note the the quotes and slashes? You need to wrap the Applescript command in quotes, and since you have quotes in the middle of it, you need to escape them using the slashes so the whole applescript is parsed.

Next step is to save the script to somewhere useful. In my case I have set my command line environment to check for scripts in ~/bin/ , so I saved it there as ‘pause’. After that you will need to make it an executable, so pop into the terminal and do “chmod +x ~/path-to-your-file/pause”, at which point you run it.

Go play something in iTunes, and then go over to the Terminal and type “pause” and hit enter. If your script is in your environment path then iTunes just paused…

Here are the other scripts I used, just to make your life easier 😉

#!/bin/bash
osascript -e “Tell application “iTunes” to play”

#!/bin/bash
osascript -e “Tell application “iTunes” to next track”

Feedback is appreciated!