LinuxQuestions.org
Register a domain and help support LQ
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 02-27-2007, 03:17 PM   #1
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
2.6: Disable loading modules at boot


Hello,

I am using the 2.6.18 kernel with Slackware 11. On boot, some modules load for hardware that I have but don't currently use (for example, a printer port or an extra network card). Is there a way to disable loading of certain modules or probing of hardware? I tried adding "nohotplug" at boot but that didn't work.
 
Old 02-27-2007, 03:36 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I believe you will want to add the names of the modules you want to stop loading to:

/etc/modprobe.d/blacklist

These will prevent them from being loaded automatically, but still allow them to be manually loaded.
 
Old 02-27-2007, 04:02 PM   #3
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 46
That solution never worked for me. Wynd, please tell me if it does for you.
 
Old 02-27-2007, 04:32 PM   #4
mas7997
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Rep: Reputation: 0
Check /etc/rc.d/rc.modules

You may also want to check in /etc/rc.d/rc.modules to make sure they aren't being loaded from there. There are some modules that are enabled by default that you may not use. Just comment out any modules that you don't want loaded. A quick way to see what is already enabled is the following command:

Code:
grep -v ^# /etc/rc.d/rc.modules |uniq
Hope this helps.
 
Old 02-28-2007, 11:49 AM   #5
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by mas7997
You may also want to check in /etc/rc.d/rc.modules to make sure they aren't being loaded from there. There are some modules that are enabled by default that you may not use. Just comment out any modules that you don't want loaded. A quick way to see what is already enabled is the following command:

Code:
grep -v ^# /etc/rc.d/rc.modules |uniq
Hope this helps.
That worked with kernel 2.4, but not 2.6. I can add modules to this file if I want them to be loaded when they aren't automatically detected, but I can't comment them out to stop them from being loaded automatically.

I will try the blacklist file, thanks.
 
Old 03-02-2007, 11:26 AM   #6
duns0014
Member
 
Registered: Dec 2006
Posts: 35

Rep: Reputation: 15
Can anyone tell me how modules are loaded anyway? I realize you can do it with modprobe, but how are they loaded automatically and how are they chosen? If I don't blacklist them, I get a bunch of modules for acpi for chipsets I don't have. Like four of them will load when I only need one. Is this because the automatic loader isn't that smart and just loads all the acpi it can when it detects acpi?
 
Old 03-02-2007, 03:53 PM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
It's more likely that the extra acpi modules were made when the kernel was compiled. If you really want to get rid of extra bits and pieces for chipsets that you don't have, or generic code, the best way is to compile your own kernel.

Have a look in /lib/modules/<kernel version>/
 
Old 03-02-2007, 05:39 PM   #8
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by dive
It's more likely that the extra acpi modules were made when the kernel was compiled. If you really want to get rid of extra bits and pieces for chipsets that you don't have, or generic code, the best way is to compile your own kernel.

Have a look in /lib/modules/<kernel version>/
Well, I don't want to take that step because even though I am not using the hardware now, I might use it in the future and I'd rather just delete a blacklist line in a file than recompile a kernel just to get a printer working or something.
 
Old 03-02-2007, 06:14 PM   #9
duns0014
Member
 
Registered: Dec 2006
Posts: 35

Rep: Reputation: 15
Quote:
Originally Posted by dive
It's more likely that the extra acpi modules were made when the kernel was compiled. If you really want to get rid of extra bits and pieces for chipsets that you don't have, or generic code, the best way is to compile your own kernel.

Have a look in /lib/modules/<kernel version>/
Thanks for the reply. sony_acpi gets loaded automatically unless I blacklist it, but there's plenty of other modules that don't get loaded that I still have on under /lib/modules. I'm using ubuntu with a stock kernel so I don't think it's compiled in. I'm probably going to compile my own kernel eventually, but I want to know how this works, why some modules are automatically loaded and some are not.
 
Old 03-04-2007, 02:19 PM   #10
duns0014
Member
 
Registered: Dec 2006
Posts: 35

Rep: Reputation: 15
Ok, noticed something odd. There's a toshiba acpi driver in the /lib/modules directory just like the sony and asus and others, but that doesn't get loaded for my computer even though it's a toshiba! So why's sony and asus load, but not toshiba?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Loading modules at boot paddyjoy Linux - Newbie 2 06-27-2005 09:23 PM
Apache 2 Modules which I can disable loading.. latino Linux - Networking 2 10-16-2004 03:14 AM
disable modules from loading on boot spyderusa11 Fedora 1 05-23-2004 05:58 PM
disable 'usbcore' and 'uhci' modules on boot... lazlow69 Slackware 6 05-09-2004 07:52 PM
HOWTO - disable modules at boot lazlow69 Debian 4 01-21-2004 05:04 PM


All times are GMT -5. The time now is 08:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration