LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-08-2003, 08:36 PM   #1
asc3ndant
LQ Newbie
 
Registered: Mar 2003
Posts: 28

Rep: Reputation: 15
kernel boot errors, can't load some modules, help!


i just configured and compiled a new kernel (2.4.21) to optimize my newly installed redhat 9.0 system, and i compiled all hardware drivers as a part of the kernel, and not as modules. the system is fine, but the kernel tries to modprobe the usb hid interface that i included in the new kernel... the modprobes obviously fail but usb works fine since i included the proper things when i built the kernel. anyways, the modprobes are part of the standard rh9 boot sequence, and it is specified in /etc/rc.sysinit... executed only on boot. how do i disable the modprobes without commenting them out the /etc/rc.sysinit? there should be some boot parameter that will stop the init sequence from trying to load unnecessary modules...
any ideas?


thanks

Last edited by asc3ndant; 07-08-2003 at 09:26 PM.
 
Old 07-10-2003, 07:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i stop a kernel module loading? The_JinJ Linux - Newbie 1 03-13-2005 03:33 PM
module not loading at startup kysen Debian 3 04-17-2004 08:04 PM
Gentoo--Loading b44 module at startup? deadjoebob Linux - Newbie 1 02-24-2004 09:07 AM
Sound module i810_audio not loading on startup MadCactus Linux - General 3 12-22-2003 02:22 AM
kernel 2.5.65 and module loading m0rl0ck Linux - Software 4 03-21-2003 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:39 PM.

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