It is a common practice to mount any iso files to file system and make it available in your network environment for usage like remote installation. You may modify /etc/fstab to make these iso files mounted during system startup.
Mounting iso files consume loop devices (e.g.: /etc/loop*). Linux kernel limits the number of loop devices to 8 by default. If you have more than 8 iso files to mount, you will encounter an error: “mount: could not find any free loop device”.
Loop devices may be deployed as a module or built with Linux kernel. It depends various Linux Distro releases. You may use the following command to check if the loop devices are deploy with module, if not it should have built with kernel:
-bash-3.2$ /sbin/lsmod |grep -i loop loop 16581 0
If lsmod able to list out loop module, the loop device are deployed as module. You may then using module configuration to increase the number of loop devices. Or else you should use append kernel parameters to increase the number of loop devices.
Solution: loop device is a module
- Un-mount all files mounted to loop device
- Add a line in /etc/modprobe.conf to increase number of loop devices:
options loop max_loop=64
# /sbin/rmmod loop
to remove the loop devices module
# /sbin/modprobe loop
to re-insert the loop devices
# ls /dev/loop*
to verify loop devices has increased
# mount –a
to re-mount static file system information in /etc/fstab
Solution: loop device built into kernel
The following shows an example of change the kernel parameter in grub boot file to increase the number of loop devices:
[root@dolphin mnt]# cat /boot/grub/menu.lst # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/mapper/vg_dolphin-root # initrd /initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=0 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Fedora (18.104.22.168-85.fc13.x86_64) root (hd0,0) kernel /vmlinuz-22.214.171.124-85.fc13.x86_64 ro root=/dev/mapper/vg_dolphin-root \
rd_LVM_LV=vg_dolphin/root rd_LVM_LV=vg_dolphin/swap \
rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 \
SYSFONT=latarcyrheb-sun16 KEYTABLE=us \
rhgb quiet max_loop=64 initrd /initramfs-126.96.36.199-85.fc13.x86_64.img
A “max_loop=64” is appended into kernel parameter to increase the number of loop devices to 64. You should reboot the Linux OS to make the changes take effects.