Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-27-2006, 02:03 AM   #1
LQ Newbie
Registered: Jul 2006
Posts: 1

Rep: Reputation: 0
Can't get more than 8 loop devices going

Hi folks,

I'm scratching my head a bit here, 'cos I've tried everything with my Ubuntu 5.10 distro to enable 64 loop devices to be available each time I boot.

I've tried adding options max_loop=64 in the /etc/modules file, but that doesn't make any difference, nor does it when I made the following change to the Kernel line in grub's menu.lst:

/boot/vmlinuz-2.6.12-9-386 root=/dev/hda1 ro max_loop=64 quiet splash

I also made the change in /dev/MAKEDEV so that it reads:

for part in `seq 0 63`
makedev loop$part b 7 $part b 7 $part $disk

Then I ran "MAKEDEV loop", which populated the /dev/loop directory with my 64 devices.

The problem is that when I reboot, I only have 8 devices again.

I've looked at this from a couple of different angles, but I can't figure it out - I thought my (relatively) new kernal should have supported loop devices as loadable modules, but even when I try to change the kernel as per above it still doesn't stick.

Any help would be greatly appreciated.


Old 07-27-2006, 09:42 PM   #2
Senior Member
Registered: Oct 2003
Posts: 2,606

Rep: Reputation: 225Reputation: 225Reputation: 225
I don't know any distro that creatges 64 loop devices but if you need them, why don't you put your "MAKEDEV loop" command in one of your init scripts, preferably the last one to run, and hopefully your 64 loop devices will be recreated every time you boot up. Now in most non-debian distros you would just stick the command in /etc/rc.d/rc.local but I know debian doesn't have an rc.local.
You need to put it in one of the last init scripts to run since something earlier in the init process is obviously interfering/overiding your MAKEDEV edit. Once the earlier init scripts are through running, you apparently can create the extra loop devices by running "MAKEDEV loop". I'm not really a debian guy so I can't tell which init script to edit by putting in MAKEDEV loop so it runs late in the boot process but I think my analysis is correct.
Old 07-27-2006, 09:58 PM   #3
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
try to open /usr/src/linux/drivers/block/loop.c and change
static int max_loop = 8;
static int max_loop = 64;
also you might as well just try a lesser number maybe 64's not supported.

Edit: here you must recompile the kernel of course.

Last edited by konsolebox; 07-27-2006 at 09:59 PM.
Old 07-27-2006, 09:59 PM   #4
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
Try passing 'max_loop=64' to your kernel parameters, on 2.6 kernels.
Old 07-27-2006, 10:17 PM   #5
Senior Member
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
hmmm.. i'm not sure if i can really remember but i guess i tried doing max_loop=x too. i did it to be able to mount manier squashfs images. but it seems that loop won't accept values higher than what was specified in 'static int max_loop'. i tried it in 2.6.12 btw.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Maximum mounted loop devices? dplazz Linux - General 6 07-21-2005 05:52 PM
fstab and loop devices MBH Linux - Hardware 3 10-21-2004 08:58 AM
un/mounting loop devices box_l Linux - Software 4 08-05-2004 09:03 AM
compiling kernel, initrd can't make image, 'loop devices busy' infamous41md Linux - Newbie 2 06-02-2004 11:59 AM
new kernel installation & loop back devices? fbarre Linux - Newbie 5 10-21-2003 01:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration