LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-25-2003, 10:33 AM   #1
CodeWarrior
Member
 
Registered: Mar 2003
Location: US
Distribution: Kubuntu 6.06
Posts: 173

Rep: Reputation: 30
Exclamation Removing modules permenantly


I am trying to remove some modules from my running kernel using the command rmmod as root. I was able to do that sucessfully, but when I rebooted all the ones I removed, came back. I have read the rc.modules is the file that loads modules at boot time, but most of the lines in this file are commented out. I don't think it is comming from this file. What am I doing wrong, where are they comming back from?
 
Old 08-25-2003, 11:24 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
The only places they'll be coming from (on a standard setup) would be /etc/rc.d/rc.modules AND/OR /etc/modules.conf

rc.modules is commented nearly all the way, but you'll wanna actually make sure that the module(s) you don't want loaded are also commented, could be just 1 or 2 lines out of that amazingly large file, so you'll wanna look closely.

Cool
 
Old 08-25-2003, 11:39 AM   #3
tipaul
Member
 
Registered: Apr 2003
Location: Laval, Quebec, Canada
Distribution: Ubuntu
Posts: 121

Rep: Reputation: 15
Exclamation loaded modules

modules aren't only loaded by rc.modules...

They are also loaded upon the kernel KMOD during boot... or hotplug...

If it's hotplug modules you want to remove, just edit the file:
/etc/hotplug/blacklist (or something like that...)

..and insert your modules name in it...

Else, I think that kernel configuration and compiling would be needed... I've just learned how to make my kernel having ONLY the drivers I need for my machine and it works great!... No more SCSI controller check at boot (don't have any SCSI device!) and many other thing...

It's not difficult, but it takes time to get used to it... (couples of hours, since compiling take some time... ~40mins on my PIII-1Ghz)

Regards,
Ti-Paul.
 
Old 08-26-2003, 08:11 PM   #4
CodeWarrior
Member
 
Registered: Mar 2003
Location: US
Distribution: Kubuntu 6.06
Posts: 173

Original Poster
Rep: Reputation: 30
Well first off my modules.conf is completely empty. Second I looked in the rc.modules file and upon closer inspection I found some modules I could comment out(mainly related to my network card, which is giving me errors).
I am despirately(sp?) trying to get sound on my box, so in one of my attempts I compiled and inserted the ALSA modules into the kernel. It did not work, so I am trying to remove these modules and try with a different method. SO mainly, I am trying to remove these modules(mostly begin with snd...). Also I found that hotplug file. i think it also is being read upon boot up. From a quick look it looks like it is loading modules needed for PCI devices. I am scared to try to comment this stuff out, since I think that major problems will arise. I don't think this file mentions modules by name, but instead loops through and finds modules that exist. Maybe I can go to the /lib... directory and just erase the *.o files that begin with snd ?? What do you think I should do?
 
Old 08-27-2003, 12:08 PM   #5
LinFreak!
Member
 
Registered: Jul 2003
Location: England
Distribution: slack9.1
Posts: 209

Rep: Reputation: 30
I cured my network detection problem by adding the line:

#damn 8139cp!
8139cp

in /etc/hotplug/blacklist (as mentioned above).
 
Old 08-27-2003, 07:09 PM   #6
GOBY
Member
 
Registered: Feb 2003
Location: Austin TX
Distribution: ArchLinux
Posts: 67

Rep: Reputation: 15
Quote:
Originally posted by CodeWarrior
Maybe I can go to the /lib... directory and just erase the *.o files that begin with snd ?? What do you think I should do?
I would not go deleting libraries that begin with snd or look like they should not be there. I think your modules are overwritten anyway when you do: make modules_install unless you are compiling a different version kernel. A kernel version 2.4.20 should look in /lib/modules/2.4.20 for its modules. If you have a 2.4.18 directory or something, move or rename it. Update your system map and all that other stuff they tell you to do when recompiling.

I'm not sure how you are configging your kernel, make menuconfig offers a nice description of most options by hitting the question mark. These descriptions also include the exact name.o of the module you want to compile. Your best bet is to look up that name.o for your particular sound card, compile that as a module, then uncomment the appropriate line in rc.modules.

I have never found any other module-loading files than what Master C mentions.. of coarse you can do a grep -r somename /etc to find all mentions of somename in your startup files.

Also, make sure you don't have sound already and don't know it I had to add a couple lines in rc.local so that all users could get sound and control the volume:
chmod 666 /dev/dsp
chmod 666 /dev/mixer

Hope that helps..
 
Old 08-28-2003, 12:00 AM   #7
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
thanks LinFreak! i've had these annoying messages at bootup since i installed slack 9, but since they didn't affect anything i figured i'd just leave it til i knew more about the kernel etc. that simple addition to blacklist sent them straight to hell!

three cheers!
 
Old 08-28-2003, 07:17 PM   #8
BigBadPenguin
Member
 
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256

Rep: Reputation: 30
i just noticed today that rc.inet2 is modprobing my network card... as a result it gets loaded several times... not hard to solve, but isn't this somehow working against the simplicity of slackware?
EDIT: just checked, and i must have been hallucinating or something, cos i can't find the line now.

Last edited by BigBadPenguin; 08-28-2003 at 07:26 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing 2.4 kernel modules Proud Linux - General 1 08-12-2004 06:32 AM
Removing modules. naijin Slackware 6 03-22-2004 04:08 PM
Inserting and removing modules mwu Linux - Software 4 03-13-2004 12:31 AM
removing modules zigmund555 Debian 2 09-25-2003 01:01 PM
Modules: Inserting, removing etc.. tarballed Linux - General 12 06-02-2003 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:19 AM.

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