ISO files are whole disk images. They are a single image file that are used for burning to CD-ROM. In order to access the files inside the iso file, you need to mount it as a ‘Loop Device’. A loop device, vnd (vnode disk), or lofi (loopback file interface) is a pseudo-device that makes a file accessible as a Block device.
We can mount ISO files in the same way that we mount physical disks using loopback mounting.
Creating directory to mount ISO
we need an empty directory for the iso to be mounted at. Once iso is mounted onto the directory the contents of ISO can be accessed by the OS users.
1. switch as root user.
2. Create a directory to mount iso image on :
# mkdir /iso_image
Mounting ISO as loopback
1. Change directory to the location of the iso image.
# cd /path/to/iso/dvd.iso
2. Mount the image with mount command :
# mount -o loop dvd.iso /iso_image
Here, “-o loopback” mounts the ISO image as loop device on the directory you specified.
Verify
1. Once you have mounted the ISO, verify the content of the directory :
# cd /iso_image # ls /iso_image
2. You can also view the mount point in the “mount” command.
# mount /path/to/iso/dvd.iso on /iso_image type iso9660 (ro)
The iso image mounted here will be read-only, so you can not edit any of the files inside the mount point /iso_image.
Umounting ISO image
To umount an iso image, use the “umount” command as shown below :
# umount /mnt