Quote:
Does anyone know a way that I can modify the loop.ko module, replace the loop.ko module, or add these commands to a startup script to make sure that I have access to all 255 loop devices on the next boot?
|
How about getting the kernel src, locating the file kernel/drivers/block/loop.c and changing your value there:
Code:
#include <asm/uaccess.h>
#include <linux/loop.h>
#define MAJOR_NR LOOP_MAJOR
static int max_loop = 8;
static struct loop_device *loop_dev;
static int *loop_sizes;
After recompiling the kernel source, you can replace your module (/lib/modules/2.6.9-11.ELsmp/kernel/drivers/block/loop.ko)
by the newly compiled one.
Or: create a startup skript like (I don't know the exact syntax of the insmod/rmmod cmds in kernel 2.6.x):
Code:
case "$1" in
start)
echo -n "Reloading loopback module"
/sbin/rmmod loop.ko
/sbin/insmod loop.ko max_loop=255
;;
esac
and put it in your /etc/rc.d dir and reference it from an appropriate runlevel dir.
-bruce