Win Unix Mac

Articles,How Tos,Tips n more

  • Increase font size
  • Default font size
  • Decrease font size

Mounting cd and dvd images in Mac OSX

E-mail Print PDF

If you are looking for a way to mount a CD or DVD image in Mac OSX similar to the loop method in Linux like


mount -o loop /path/to/image.iso /mnt/dvd


In Mac OSX there is a similar command from BSD called hdiutil

The use is similar to the mount -o loop method shown above but lacks the control of where the image is mounted, the result is identical to OSX's mounting an image and will produce a disk image icon on the desktop which can be ejected (unmounted) as needed

hdiutil attach -readonly /path/to/image.iso


A real world example including the output is show below, note the device name it gets mounted under in your system and use this to unmount after. Note in the example below I am mounting a .dmg file which is the Macintosh equivelant of an .iso filesystem in some ways but it is not identical.

bigmac:~ neil$ hdiutil attach -readonly Desktop/Mac\ OS\ X\ Install\ DVD.dmg

Checksumming whole disk (Apple_HFS : 0)…

...............................................................................

whole disk (Apple_HFS : 0): verified   CRC32 $39CE04B6

verified   CRC32 $713800C0

/dev/disk4                                                 /Volumes/Mac OS X Install DVD


hdiutil
can also be called to eject the image as discussed above and show below

bigmac:~ neil$ hdiutil eject /dev/disk4

"disk4" unmounted.

"disk4" ejected.

Last Updated on Sunday, 30 August 2009 02:12  

Add your comment

Your name:
Subject:
Comment: