Mounting ISO Files

ISO images are files containing the data of a CD (almost bit per bit). They can be mounted, using the loopback device. ISO images can only be mounted read-only (use mkisofs to create images).

Kernel Requirements

To mount ISO images you need the following in your kernel(as module or builtin):

  • loop-back filesystem support (under Device Drivers – Block devices in kernel 2.6)
  • ISO 9660 CDROM file system support (under File systems – CD-ROM/DVD Filesystems in kernel 2.6)

You also might want this for mounting non-linux ISO images:

  • Microsoft Joliet CDROM extensions (under File systems – CD-ROM/DVD Filesystems in kernel 2.6)

Linux Kernel Configuration: Joliet CDROM Extensions(2.6)

File Fystems –> CD-ROM/DVD Filesystems
< *> ISO 9660 CDROM file system support
[*] Microsoft Joliet CDROM extensions

Mounting

To mount the ISO images, you’ll need to have root access. Login as root or use sudo, and execute:

mount -t iso9660 -o loop,user image.iso /wheretomount

Drop ,user if you don’t want users to access the ISO files.

Note: If this fails with an error concerning /dev/loop then as root issue the command:

# modprobe loop

Alternatively you may want to add loop to the list of modules that you autoload at boot:

# nano -w /etc/modules.autoload.d/kernel-2.6

and add loop to the bottom of your list of modules.

Hint 1: You can use cdemu to mount BIN images (It’s in portage). You can also use bin2iso to convert them to ISO (also in Portage).

Hint 2: You can use mdf2iso to convert MDF/MDS files to ISO (It’s in portage). Or you can mount a .mdf file with:

mount image.mdf /wheretomount -o loop=/dev/loop0


Hint 3:
You can use nrg2iso to convert Nero’s .nrg files to ISO (It’s in portage). Or you can mount a .nrg file with:

mount -o loop,offset=307200 image.nrg /wheretomount

Hint 4: You can use ccd2iso to convert Clone CD’s .img files to ISO (It’s in portage).

SVCD and VCDs

SVCD and VCD ISO files can be played directly using mplayer or converted using mencoder.