If it's error messages you're worrying about, just disregard them, there is no bootparam I know that stops from loading modules.
If you don't want to load *any* module there's three things you can do, but both involve editing /etc/rc.d/rc.s*
1. Echoing "/bin/true" to /proc/sys/kernel/modprobe will replace /sbin/modprobe, so the kernel's module mounter doesn't know where it is, or
2. use "lcap" to take away Linux' capabilities. CAP_MOD is what you're looking for then, top of my head it's capability #16.
3. Transmogrify the USB module detection part anyway. IMHO the easiest option. Example? Ok, so you could have a kernel that requires loading USB modules. To enable loading it we'll make a little change to /etc/rc.d/rc/sysinit, on an empty line before the USB part. Add these lines:
# Load USB when /proc/cmdline contains the string "loadusb"
# Take care /proc has been mounted
/bin/mount | grep -qe "/proc"
if [ "$?" = "0" ]; then grep /proc/cmdline -qe "loadusb"
if [ "$?" = "0" ]; then
Now under the USN module part just add these lines:
# End Load USB when /proc/cmdline contains the string "loadusb"
fi; fi
Done. Now if you are on the LILO bootprompt, and you add "loadusb" as argument after you choose the kernel, or add it to LILO's "append" line for some kernel, then USB modules will load, else it'll just pass by the part w/o generating errors.
I use this a lot to mod any boot behaviour.
Sky's the limit, really.
|