Linux Mount ISO
ISO image is an archive file generally used for optical disks. ISO image uses file system ISO 9660 and have extension .iso or .image . ISO images can be written into CD, DVD, Blu-ray . ISO file are very popular way to distribute files, Linux distributions, media files etc.
List ISO Image Content
We may want to list content of ISO image and check if the content we are looking for exist. Libcdio-utils is package that provides tool named iso-info where we will use to list ISO image content. We can install libcdio-utils like below.
$ sudo apt-get install libcdio-utils -y
Syntax of the isoinfo is like below.
isoinfo [OPTIOMS] -i FILENAME
At this stage we will use memtest86+.iso file which is by default provided from Ubuntu, Debian to use boot operations.
$ isoinfo -l -i /usr/lib/memtest86+/memtest86+.iso
isoinfo list files and directories like ls -Rl command. Say we want to get /README.TXT file.
Mount ISO Image
We will mount iso image with mount command . Mount command automatically detects file system of the ISO image and provides related options implicitly. We first install isoinfo like below.We will create new directory to mount our ISO image. We can prefer to use existing directories like /cdrom or /mnt too.
$ mkdir iso
Now we can mount iso file. We need root privileges to mount iso file. And mounted iso file directory will be read only by default because the aim is to read files.
$ sudo mount /usr/lib/memtest86+/memtest86+.iso iso