LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-15-2006, 07:36 AM   #1
fauigerzigerk
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Rep: Reputation: 0
how to disable a kernel module?


Hi all,

I would like to disable USB, firewire and PCMCIA modules and load them manually only when I need them (that is almost never). Is there a config file somewhere that tells the system which modules to load or which modules should be blocked?

If there is no central place where module loading can be configure, my second choice would be to remove the modules after startup. However, I can't seem to find a way to unload the usbcore module. lsmod tells me that there are three dependencies, but it shows me the names of just two of them. The third, nameless one, seems to block unloading. It doesn't even help to remove usbcore.ko from the lib/modules/** directory. It still gets loaded according to dmesg.

Does the Linux module system have any kind of central management interface?

I'm using Ubuntu 6.1.

Any help is much appreciated.
 
Old 12-15-2006, 08:19 AM   #2
LiamFromLeeds
Member
 
Registered: Dec 2006
Distribution: Arch
Posts: 44

Rep: Reputation: 15
In Ubuntu I believe you can "blacklist" module you don't want to be loaded.

I think this doc. might help -> http://doc.gwos.org/index.php/Get_ri...loaded_at_boot
 
Old 12-15-2006, 10:28 AM   #3
fauigerzigerk
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for you reply!

Unfortunately the blacklist thing doesn't seem to work. I blacklisted usbcore, uhci_hcd and ehci_hcd in /etc/modprobe.d/blacklist but after rebooting all of them are loaded and there is nothing unusual about it in dmesg. Is there a way to find out what triggers the loading of a module?
 
Old 12-16-2006, 11:12 AM   #4
edenCC
Member
 
Registered: May 2006
Location: China
Distribution: Debian
Posts: 198
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by fauigerzigerk
Thanks for you reply!
Is there a way to find out what triggers the loading of a module?
in redhat enterprize linux, you can find the modules' dependency in modules.dep:
/lib/modules/`uname -r`/modules.dep
 
Old 12-17-2006, 03:16 AM   #5
fauigerzigerk
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by edenCC
in redhat enterprize linux, you can find the modules' dependency in modules.dep:
/lib/modules/`uname -r`/modules.dep
Thanks for your reply!

I know that file and it cost me a lot of time to sift through it as it lists all dependencies between a huge number of modules, not just the ones that are actually in use. Anyway, none of the other loaded modules apart from uhci_hcd and ehci_hcd are shown to depend on usbcore. What does it mean when lsmod says there are three dependencies but then it only shows two of them?
 
  


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 to disable the evbug module? guysoft Debian 2 08-30-2006 08:28 AM
How to disable a module in coldplug? Nilangshu Linux - Hardware 0 01-30-2006 10:53 AM
What module would I unload to disable pcmcia? elempoimen Linux - Laptop and Netbook 10 12-22-2004 09:51 AM
how to disable old module loading... bit7 Linux - Hardware 2 11-25-2003 02:59 PM
kernel module ignorant newbie looking for any one with kernel module knowledge cpoet Slackware 4 11-24-2003 09:37 PM

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

All times are GMT -5. The time now is 10:45 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