Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Mount CD-ROMs as a Windows user would see them UNIX
Have you ever had a CD-ROM that showed different files on different OSes? Such as a Maple12 install CD-ROM for Windows that doesn't show any files in MacOS. There are several different ways this can happen. A common way is to make a hybrid CD-ROM with multiple filesystems using the same data. Another way is with a multi-session CD-ROM. Sometimes in MacOS you need to see what the Windows user sees. The following method deals with the hybrid case.

Optical disks, and images of optical disks, have various backwards-compatible file systems. The basic file system is ISO9660, and there are several revisions of it. All revisions are generically known as ISO9660. There are also extensions to ISO9660 for specific operating systems. MacOS uses an HFS filesystem extension, Windows uses an extension known as Joliet, and Unix uses an extension known as RockRidge. MacOS understands all these and more, but prefers its native HFS. If a CD-ROM has an HFS extension, the Mac will automatically use it. The problem is that the file listing in HFS may be different than the file listing in Joliet. So how do you force MacOS to use Joliet (or anything else) instead of HFS?

In this example, the CD-ROM is named MAPLE12. Mount the CD-ROM as normal. It should appear on the desktop. Now open Terminal, and type cd /Volumes (and press Return), which is the directory where the Finder mounts volumes. Next, type ls /Volumes (and Return) to show a directory list. You will see MAPLE12 in the list.

Next, type mount and press Return. The mount command with no options will show a list of all mounted filesystems. The one I'm interested is MAPLE12:

/dev/disk1s0 on /Volumes/MAPLE12 (hfs, local, nodev, nosuid, read-only, noowners)

The device name is /dev/disk1s0, and it's mounted at node /Volumes/MAPLE12, and it's using the hfs option.

Now type sudo umount MAPLE12 and provide your password when asked. umount unmounts the CD from the file system, but doesn't eject it. To verify this, type ls and verify that MAPLE12 disappeared from the desktop and /Volumes.

Type mkdir /Volumes/MAPLE12.win, which creates a mount point in /Volumes. I suggest you name it differently, but I could have created /Volumes/MAPLE12 again.

Now type mount_cd9660 -er /dev/disk1s0 /Volumes/MAPLE12.win. mount_cd9660 mounts CD-ROMs, but not HFS CD-ROMs. It can mount plain 9660, Joliet, and Rock Ridge CD-ROMs. -e asks mount to use any extended attributes, -r tells mount not to use Rock Ridge. That leaves only Joliet, the Windows extension, as the available extension. /dev/disk1s0 is the device name you got earlier with mount. /Volumes/MAPLE12.win is the folder created in the previous step.

Verify the CD-ROM visible on the desktop, and you'll notice that you can now see the CD as it would appear to a Windows user. If you want, you can change the options in the final mount step:
  • -j: do not use Joliet. This leaves only Rock Ridge.
  • -jr: do not use either Joliet or Rock Ridge. Just use pure 9660.
The procedure for an ISO image file is identical. Let Finder mount the image as a drive on the desktop. Then umount it and mount it with the options you need.
    •    
  • Currently 3.00 / 5
  You rated: 5 / 5 (9 votes cast)
 
[29,808 views]  

Mount CD-ROMs as a Windows user would see them | 12 comments | Create New Account
Click here to return to the 'Mount CD-ROMs as a Windows user would see them' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mount CD-ROMs as a Windows user would see them
Authored by: ctierney on Jul 10, '08 07:57:09AM

What a great tip! I make lots of hybrid cds with windows files excluded from the shared partition. Now I don't have to fire up a pc to see those files when I need to. Many thanks.



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: Pedro Estarque on Jul 10, '08 08:59:09AM

Great tip indeed! Thanks.



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: neuralstatic on Jul 10, '08 08:59:50AM

seems i used to do this with toast somehow? ring a bell anyone?



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: alextm on Jul 10, '08 09:14:45AM

I think Toast Image Mounter ("Mount It" in the right click menu) mounts all of the formats in an iso image.

And for anyone who cares, the OS9 way is to hold down CMD+OPT while inserting the disk. (Yes I still remember this)



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: jerryobrecht on Jul 10, '08 11:30:04AM

Great hint. This may be related to "why I have a DVD-R (DVD ROM) that mounts as an empty folder?"

So, after final mounting, if I eject (unmount) the disc, do I need to repeat the unmount/mount sequence each time I wish to see files on the disc?

Would I use the same commands for a DVD, or would I replace "CD" with "DVD"?

Jerry



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: houplagrundle on Jul 11, '08 04:07:44PM

"cd /Volumes" means change directory to the /Volumes directory
and "man mount_cd9660" seems to be saying it's for more than just CDs



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: Jonas Lundberg on Jul 14, '08 05:31:18AM

If you eject the disk you have to do this again.
There is no need to change any commands becuase it's a DVD.



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: hamarkus on Aug 13, '08 09:16:00AM

How do I do the opposite, see the Mac partition on a PC? The CD-drive on my MBP is broken and installation CDs only show the PC version when inserted in my PC, I'd like to access the Mac partition and copy it to my Mac.



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: Rakko on Nov 28, '09 07:22:33PM
I just tried this under 10.6.2. I had to change /dev/disk1s1s2 (the actual device the mount command showed) to /dev/disk1s1. I'm assuming the additional -s2 denoted session 2; there also existed /dev/disk1s1s1, but I was unable to use mount_cd9660 on it directly either.
Edited on Nov 28, '09 07:23:24PM by Rakko


[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: ktappe on Feb 03, '10 08:29:15AM

I get a "mount_cd9660: Invalid argument" error when I attempt this under 10.5.8. It seems to be unhappy with the /Volumes/MyDirectory argument. The "usage" tip for mount_cd9660 seems to be asking for "special" and "node" as arguments, the former (according to the man page) being the "global filesystem namespace" and the latter being a location. I've opened up permissions on my /Volumes/MyDirectory and even tried just /Volumes, but the command simply won't accept anything I give it for "node".



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: ktappe on Feb 03, '10 12:19:41PM

Tried it Rakko's way with just /dev/disk1s1. Now I get a "mount_cd9660: Resource busy" error (whether I've umount'ed /dev/disk1s1s2 or not).



[ Reply to This | # ]
Mount CD-ROMs as a Windows user would see them
Authored by: kvn on Jan 11, '13 10:53:38AM

It worked on 10.7.5 with this command (note the device name change):

/sbin/mount_cd9660 -er /dev/disk1s1 /Volumes/XXX

where "XXX" is whatever you named your directory (MAPLE.win or whatever).



[ Reply to This | # ]