Linux Voodoo Corporation
About Us 866.309.4617 Tracking Shopping Cart Checkout
  You are here: » Main » Howto's Log In  | Financing  
Swartz Creek, Michigan: Linux Voodoo offers Linux consulting (and support) services (both free and commercial), Linux compatible hardware and software reviews and sales, Linux servers and desktop, the Voodoo Linux distribution and hardening systems, Linux driver development, Linux news,chat, message boards, Linux embedded jobs, security advisories, Linux howto's and newbie information. linux download red hat directpc direct pc linux linux software linux driver linux tutorial linux mandrake mandrake linux linux command netapp linux mount windows source decss linux game linux hp suse linux linux downloads linux firewall linux server linux programming linux red hat wine linux linux ppt linux operating system embedded linux linux distribution corel linux free linux free linux download linux help force 10baset linux linux laptop reset linux scsi d kill tape /proc linux router linux pda linux wallpaper red hat linux download linux kernel linux router project linux iso linux howto linux how to linux os linux application linux certification linux web hosting linux hosting linux modem peanut linux nokia rs 232 linux modem setting linux for window linux free download linux documentation project linux sms1 linux call back linux problem reading directory linux boot disk linux theme linux cluster linux closing port linux security dialogic linux linux emulator linux training linux startup dual boot window 2000 linux linux magazine linux auto rpm realtek rtl8019 linux driver download robomon linux linux estrutura de diretorios 3c589d config linux timeservice linux linux samba linux dvd player linux .ppt mplayer near download and linux red hat linux 7.2 linux mail server free linux software linux hardwarelinux anti virus redmond linux linux modem driver linux vpn pic microcontroller linux programmer aol for linux linux review linux wireless
contact us: abuse@flonetwork.com webmaster@flonetwork.com info@webmaster@flonetwork.com spampoision@lnxvoodoo.com noc@sprint.net webmaster@lnxvoodoo.com wlad@lnxvoodoo.com michelle@lnxvoodoo.com ryan@lnxvoodoo.com bryan@lnxvoodo.com rambo@lnxvoodoo.com senioreditor@lnxvoodoo.com editor@lnxvoodoo.com
WOW on Linux, yes our gaming systems do include World of Warcraft for Linux! Linux Voodoo Gaming systems include one copy of World of Warcraft, 1 year paid subscription to Transgaming.com so you can play over 200 popular Windows games on our linux systems. Too good to be true? Try it out for yourself.
  Start shopping
Notebooks
notebooks 

 

Desktops
desktops 

 

Servers
servers 

 

Appliances
appliances 

 

Accessories
accessories 

 

Software
software 
Howto's  
Adding Support for More Loop Devices

3. Adding Support for More Loop Devices

Newer Linux kernels (2.4) allow you to add more loop devices easily by editing /etc/modules.conf or through the use of a boot parameter.

Older kernels (2.2 ?) only had support for 8 loop devices compiled into the kernel. In short, you were only able to share 8 CD's on a network with this default value. In order to support more than that default, you needed to modify the kernel source and recompile a new kernel.

Use the following methods to determine which version of the kernel you are running.


bash# uname -a

or


bash# cat /proc/version

3.1. Adding the Loop Module Option

Current kernels allow you to set the number of loop devices supported without recompiling the kernel. One of these methods is to add an options line to /etc/modules.conf. This method will only work if your loop support has been configured as a loadable kernel module (which is how most major Linux distributions come preconfigured now).

Edit /etc/modules.conf and add the following line.


options loop max_loop=64

After making the above change, simply reboot. Or you can try to use rmmod and insmod to make the change on the fly - but this will not work if you currently have any loop devices mounted (you'll get an error saying loop: Device or resource busy).

Note

If you do not have an /etc/modules.conf file, your module configuration file may be called /etc/conf.modules (this name is now deprecated).

Continue with Section 3.4.

Thanks to Paul A. Sand for pointing out the /etc/modules.conf option.

3.2. Appending to the Boot Prompt

If your loop support has been compiled directly into the kernel (in other words, it is not loaded as a module), you can append the number of loop devices you would like to support at the linux boot prompt.


boot:  linux max_loop=64

Or, if you are using LILO, you can edit your linux boot stanza in /etc/lilo.conf and add/modify the append= line. Here is an example stanza showing append= (note: only add or modify the append line, don't change your whole stanza to look like this one or your system may not boot). For more information about LILO, consult the LILO mini-HOWTO at http://www.linuxdoc.org/HOWTO/mini/LILO.html.


image=/boot/vmlinuz
        label=linux
        root=/dev/hdb5
        initrd=/boot/initrd.img

	append=" max_loop=64"

        vga=788
        read-only

After changing /etc/lilo.conf, you need to run the lilo command for your changes to take effect.


bash# lilo


Added linux *
Added linux-nonfb
Added failsafe
Added windows
Added floppy

Next restart your system. After your system restarts, you can check your boot command line by typing the following:


bash# cat /proc/cmdline

Note

I am not sure if the loop module (compiled as a module) reads /proc/cmdline when the module is loaded, and therefore may not need an options line /etc/modules.conf. It's possible that it can (and if it doesn't, it should). To summarize: I have not tested this.

Continue with Section 3.4.

Thanks to Tony Melia for the boot prompt info.

3.3. Tweaking the Kernel

If you have an older kernel (v. 2.2) or if you are completely comfortable recompiling the kernel, you can increase the number of loop devices supported by editing the /usr/src/linux/drivers/block/loop.c file.

Note

If you find that the kernel sources are not installed on your machine, you'll need to consult your Linux Distribution's documentation on how to install them (the Kernel Sources come with all distributions - it's part of the GNU GPL licensing).

Change the number in the following line to however many loop devices you'll need.


#define MAX_LOOP 16

Compile the new kernel or module as the case may be. If you need some help getting started with this, read /usr/src/linux/README or consult The Linux Kernel HOWTO.

Continue with Section 3.4.

3.4. Creating the Loop Devices in /dev

You should check how many /dev entries you have for loop devices.


bash# ls -l /dev/loop*

The mknod command creates the devices in the /dev directory. The loop devices have a major number of "7", and the minor numbers begin at "0". If your MAX_LOOP was defined as "8" in /usr/src/linux/drivers/block/loop.c, you should have /dev/loop0 through /dev/loop7. To create the /dev/loop8 device, use the following command (subsitute the appropriate number you need for both the "8's" in the example below).


bash# mknod -m660 /dev/loop8 b 7 8

Check Owner/Group & Permissions on the new file (using ls -l). You can change the owner and group with the following command:


bash# chown root.disk /dev/loop8

You can change the permissions using the following command:


bash# chmod 666 /dev/loop8

Continue
 



P
System Builder

Now Shipping from: California - Florida - Georgia - Massachusetts - Michigan - New Jersey - Pennsylvania - Tennessee - Texas
We only ship within the USA and APO's.
We do not ship on national US holidays or on weekends.
Linux Voodoo RSS Store Feed
About Us  |  Contact Us  |  Conditions of Use  |  Privacy Notice  |  Warranty & Returns  |  Employment |  PHP HTML Form Builder

Copyright © 2003, Linux Voodoo Corporation All rights reserved. Linux is a trademark of Linus Torvalds.
email-addresses
Asterisk Debian Linux, WOW on Linux, yes our gaming systems do include World of Warcraft for Linux! Linux Voodoo Gaming systems include one copy of World of Warcraft, 1 year paid subscription to Transgaming.com so you can play over 200 popular Windows games on our linux systems. Too good to be true? Try it out for yourself.