How To Mount An ISO image

Mounting an ISO image of a CD/DVD before burning it is one of the basic steps to verifying you’re going to get exactly the desired result. It’s also a neat trick to access files from a CD/DVD image when you only need a file or two and not a whole CD. Why burn it at all when you can access files much quicker and easier by simply mounting the ISO image?

Every Unix OS has a way to access ISO filesystem, and today I’ll only give you examples for Linux and Solaris. In both cases, the two things you need for the example to work are the ISO image itself and an available mount point (basically, an empty directory) on your filesystem to mount it under.

Here’s how to mount an ISO in Linux:

# mount -o loop /net/server/linux-bootcd.iso /mnt

Here’s how to mount an ISO in Solaris:

First, you need to associate your ISO image with a virtual device:

# lofiadm -a /net/server/linux-bootcd.iso

lofiadm approach allows you to have virtual devices associated with as many ISO images as you like, and you can view the list of current associations at any moment:

# lofiadm
Block Device File
/dev/lofi/1 /net/server/linux-bootcd.iso

To mount a virtual device, you use the following command:

# mount -F hsfs /dev/lofi/1 /mnt

See Also