how do I disable a LKM?

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
I need to be able to tell the kernel to not load a module (broadcom wireless driver, speficially). I want to use ndiswrapper (I know Linksys' driver works). Getting completely rid of the module would be fine, too.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
You can remove the module after it's loaded by doing a rmmod <modulename>. To keep it from being loaded in the first place kind of depends on which distro you use and how they set up their infrastructure for modules. The cheap and dirty way is to find the module file in /lib/modules/2.6.x-y-z/kernel/drivers/net (that location is a guess, but it's in the neighborhood...) and rename it so it doesn't have the "ko" on the end of it. So something like...

mv /lib/modules/2.6.x-y-z/kernel/driver/net/broadcom.ko{,.bak}

Again, substitute appropriately for your path and module name.

The "right" way to do this would probably be to add a "null" alias for the module in /etc/modutils.d/aliases, but different distros may overwrite that file, or not use it, or do other odd things.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
I borked something...I was able to get ndiswrapper to try to work at least, and it sees the network, but I thinking rebooting and tinkering may be in order. Thanks, though, you've helped me get that much farther. Only Ralink and Realtek are in my future, though!