Linux: mount iso images

A normal situation for every Linux user: you've downloaded an ISO image of your favourite distribution and you'd like to copy say just one little file. Burning that image on CD only to get that particular file would be pure non sense. The easy and quick solution is to mount that image on your harddisk and access all files contained in the ISO file. Unlike under Windows where you would have to use third party applications like Daemon Tools, all this functionality is included in every standard linux kernel.

Step 1: Setup the kernel

First of all, you'll have to check whether certain options are included in your kernel. If you're using a standard kernel from one of the major distributions, it's pretty likely that everything necessary is already included so you might want to skip this step. If you have a self-compiled kernel - and I recommend everyone to compile the kernel oneself - you'll have to enable the following options in your kernel:

in Device Drivers > Block Devices     Loopback device support    in File Systems > CD-ROM/DVD Filesystems    ISO 9660 CDROM file system support    [*]   Microsoft Joliet CDROM extensions    [*]   Transparent decompression extension 

Of course you can also compile the features into the kernel but I always advise to compile everything as module as long as it is not crucial to run the kernel - like file systems. Btw. you don't need the extra options of ISO 9660 but it's never a mistake to have them switched on.

Mount the ISO!

Now as you're kernel is setup, we can start to mount ISO images:

~# mount -o loop -t iso9660 debian-sid.iso /mnt/isoimage/ 

You'll now be able to access all files in that iso via the /mnt/isoimage/ folder. That's easy right?

虹光大成就-密教灌頂(一)