Hidden Linux : Fun with ISO images

ISO image files (*.iso) are useful things. They were originally developed as a standard for storing data on CD-ROM, and hold not just files but also all their associated data structures as well -- things like directories, file attributes and boot code - which geeks call 'metadata'.
ISO files are often used for backups, though people are more familiar with them as being an intermediary stage when duplicating DVDs. And most people think that to get at their contents you need to 'upack' them somewhere -- onto a hard drive or optical disc. But under Linux you can simply mount them on your operating system.
Suppose I have an ISO image called bachups.iso from which I want to extract a single file. To look at it, I first need to create a mount point on my system:
| sudo mkdir /mnt/test |
This creates a new directory under /mnt called /test.
(Non-Ubuntu/Debian users may not need the sudo command.)
Then I mount the image using the -o (options) and -t (filesystem type) switches:
| sudo mount -o loop -t iso9660 backups.iso /mnt/test |
And that's it. I can now access the image with any of my normal tools simply by pointing to /mnt/test. Finding that single file in an enormous backup set becomes a piece of cake.
But it goes further than that. 'Normal tools' includes DVD players. That means if backups.iso was one of those intermediary DVD files, it can even be played! All you need do in VLC or Kaffeine, for example, is choose File / Open Directory, point to /mnt/test and click Play.
On really large backups -- or with operating systems like Windows that max out at a file size of 1 GB -- you'll find ISOs get split into a series of suffixes such as backups.i00, backups.i01, backups.i02 ... To use these, simply mount the .i00 file and the system will handle the rest.
<--Previous Hidden Linux Next Hidden Linux -->

PC World is New Zealand’s top selling computing and technology magazine.
Comments
This is most definitely not a critism or complaint. I appreciate the information. What I want to add is that when I want to look in an ISO file or when I want to extract a file from an ISO file I open Midnight Commander. This is the Q&D way.
I see that the info above informs me how to mount the ISO and access it from other apps. I do appreciate the info.
Posted by: kenholmz | March 28, 2008 6:53 AM
How to change content, replace files inside ISO image?
Posted by: Mike | March 13, 2008 4:10 AM
If you're calling your archives bachups.iso, then remember not to Bach up the wrong tree.
Posted by: Tim McKenzie | March 12, 2008 4:03 PM