Mounting iso images is a bit tricky one step procedure to access image file content. There are hardware files called loop devices which are located in /dev/. These loop hardware files are used to mount already formated files such as ISO, IMG, NRG files for local access. They range from loop0 to loop7. So in other words we can mount total 8 iso/img files in Linux at a time. We can not mount more than these number. Below is the command to mount a iso image file
My ISO file location and the filename: /var/ftp/rhel.iso
My mount point: /mnt/mymount
Step1: Become root, as mount command should be executed by only root user
Step2: Make a directory /mnt/mymount
Step3: Now mount iso file on to the mount point.
mount -o loop /var/ftp/rhel.iso /mnt/mymount
If you get an error stating that "
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog – try
dmesg | tail or so.
" then the issue is either you have to specify iso format or the ISO which you are mounting is currepted.
Try to mount with filesystem type as mention in above error and see if that works.
mount -o loop /var/ftp/rhel.iso /mnt/mymount -t iso9660
If you still see the error then the iso is either currept or of different standerd.
mount -o loop /var/ftp/rhel.img /mnt/mymount
Latest posts by Surendra Anne (see all)
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018
- Online training on Linux Bash shell scripting - February 8, 2018