Walker News

How To Mount And Read CD ISO Image In Linux

You may heard about disk image, particularly CD ISO image. Literally, an ISO disk image is a single binary file that encapsulates the contents of hard disk, a CD-ROM, DVD-ROM, etc.

Normally, computer geeks like to duplicate CD images and share or distribute them electronically for others to copy and burn onto physical CD/DVD-ROMs.
As with most Linux administrators, I learnt to create ISO images of various installation CDs and store them in the Samba file server – for easier access, backup purpose and avoid misplace or tamper the “valuable” master installation CD.

Thanks to the advanced of hard disk technology and the power of Samba, a simple Desktop computer with 300GB SATA hard disk is more than enough for mid-range file sharing purpose.

Except for OS reinstallation, none of us has to get a CD-ROM for software installation, component upgrade, etc. We all use the disk images, especially Linux administrators. Though, it’s a bit troublesome for Windows admin who need a third party CD-ROM drive emulator to load and read the image. For Linux administrators, life is easier!

Linux built-in loopback device feature enable us to mount and read some disk image formats on the fly, without installing additional package. For example,

mount -o loop -t iso9660 /tmp/Fedora-7.iso /mnt/iso

will mount the ISO image file /tmp/Fedora-7.iso to /mnt/iso directory (create iso directory in /mnt if it’s not currently exists).

The -o loop option switch tells Linux mount command to find an unused or free loopback device in the Linux system. Otherwise, you can explicitly specify which loopback device to use, e.g. -o /dev/loop1.

As long as the /etc/mtab is not symbolic link to /proc/mounts, any loopback devices allocated by the Linux mount command will be freed up by umount command (to unload the mounting point)! Of course, the loopback device can also be freed up by losetup -d command option.

Once this Linux command completed successfully, you can access or read the content of Fedora-7 ISO image, as if it’s physically mounted to a CD-ROM drive.

In case the ISO image is hosted at a network share (Samba file sharing or Windows file sharing), like ours, just mount the network share first before mounting the CD ISO image – refers to earlier post on [ How to mount or map a network drive in Linux? ]

If you’ve read the Linux mount command (i.e. man mount), the man page in some Linux distributions has an example of mounting Windows-based floppy disk image via loopback device too, as this:

mount /tmp/fdimg /mnt -t msdos -o loop=/dev/loop3,blocksize=1024

which will explicitly bind the third Linux loopback device, i.e./dev/loop3, to the floppy disk image /tmp/fdimage and then mount it /mnt directory.

Custom Search

  1. How To Reset Windows Vista Account Password – Walker News 26-08-07@21:41

    […] sure you’re downloading TRK ISO image file and validate its MD5 checksum with the published one (to confirm the ISO image is genuine and […]

2018  •  Privacy Policy