On Wed, 31 Aug 2011 15:39:41 +0200, Csanyi Pal wrote:
> I have a rather impressive list of loaded modules.
How many, how many? :-)
sm01@stt008:~$ lsmod| wc -l
67
> I'm not shure whether are they really needed?
Some modules are automatically loaded on demand or as a requirement for
another module.
> How can I know which modules I don't need so I can have those
> blacklisted?
Hard to tell... but if they are loaded there must be a good reason for
it :-?
Greetings,
--
Camaleón
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.08.31.14.45.13@gmail.com">http://lists.debian.org/pan.2011.08.31.14.45.13@gmail.com
08-31-2011, 02:53 PM
Darac Marjal
How to reduce number of loaded kernel modules?
On Wed, Aug 31, 2011 at 03:39:41PM +0200, Csanyi Pal wrote:
> Hi,
>
> I have a rather impressive list of loaded modules. I'm not shure whether
> are they really needed?
>
> How can I know which modules I don't need so I can have those
> blacklisted?
Generally speaking, the kernel only loads modules it needs. Typical
methods for this include udev discovering hardware (so the kernel loads
the driver for it) or modules or user-space software depending on other
modules (such as how the wireless system depends on some of the hashing
modules).
So, in a normal system, the modules are loaded because they are needed.
(The corollary to this is that when modules are not needed, such as
removing a device, they are unloaded).
Blacklisting is usually only needed if you have a broken modules or
there are two modules that service your needs and you need to use the
other one (for example, a USB device might be detected as needed
cdc-ether, but you know that actually it doesn't, so you blacklist
cdc-ether).
As Debian's stock kernel is designed for maximum flexibility, having a
couple of hundred modules loaded is not unexpected.
--
Darac Marjal
09-01-2011, 11:29 AM
Camaleón
How to reduce number of loaded kernel modules?
On Thu, 01 Sep 2011 07:45:50 +0200, Csanyi Pal wrote:
> Camaleón <noelamac@gmail.com> writes:
>
>> On Wed, 31 Aug 2011 15:39:41 +0200, Csanyi Pal wrote:
>>
>>> I have a rather impressive list of loaded modules.
>>
>> How many, how many? :-)
>>
>> sm01@stt008:~$ lsmod| wc -l
> 155
That's too much.
On my netbook there are "just" 82 loaded (67 on the desktop).
By reading the kernel bug report you mentioned in your reply to Darac, I
see most of the modules are required for you iptables/netfiler/network
rules system so... just for debugging your problem you can just try to:
1/ Blacklist "pegasus" module if you think this is the one causing your
pain. Maybe is not...
2/ Or you can boot in "init 1" (single-user) with no network to avoid
related modules being loaded.
3/ Unload manually all of the non-crucial modules (sch*, ipt*, nf*,
xt*...).
Greetings,
--
Camaleón
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: pan.2011.09.01.11.29.23@gmail.com">http://lists.debian.org/pan.2011.09.01.11.29.23@gmail.com
09-01-2011, 03:02 PM
D G Teed
How to reduce number of loaded kernel modules?
On Thu, Sep 1, 2011 at 2:53 AM, Csanyi Pal <csanyipal@gmail.com> wrote:
Darac Marjal <mailinglist@darac.org.uk> writes:
> On Wed, Aug 31, 2011 at 03:39:41PM +0200, Csanyi Pal wrote:
>> I have a rather impressive list of loaded modules. I'm not shure whether
>> are they really needed?
>>
>> How can I know which modules I don't need so I can have those
>> blacklisted?
>
> Generally speaking, the kernel only loads modules it needs. Typical
> methods for this include udev discovering hardware (so the kernel loads
> the driver for it) or modules or user-space software depending on other
> modules (such as how the wireless system depends on some of the hashing
> modules).
>
> So, in a normal system, the modules are loaded because they are needed.
> (The corollary to this is that when modules are not needed, such as
> removing a device, they are unloaded).
>
> Blacklisting is usually only needed if you have a broken modules or
> there are two modules that service your needs and you need to use the
> other one (for example, a USB device might be detected as needed
> cdc-ether, but you know that actually it doesn't, so you blacklist
> cdc-ether).
I have an usb ethernet adapter that sometimes freezes my Debian SID
system. I have mailed this problem to the Bugzilla Kernel org here:
https://bugzilla.kernel.org/show_bug.cgi?id=40372
The developers advices me to reduce loaded modules.
How can I do that?
As I read it, they are trying to reduce the number of modules fordiagnostic purposes. *It isn't intended to fix the problem, but perhapsallow a kernel dump to appear so there are some real details to
bite into for this bug report.*
This Debian wiki page might help for disabling the auto loadof modules. *The update-initramfs step is important, as manymodules load from within initfs, before your root partition is
even mounted.
http://wiki.debian.org/KernelModuleBlacklisting
Spend some time getting to know what they are, as disabling some can
cause the system to not boot up, or not very well. *I suspect you havesome sort of firewall package which is loading a lot of extra*unnecessarymodules. *There is also a chance the bug is one specific to the specialized
iptables*features provided by extra modules and your USB ethernet adapter driver.Some iptables modules are marked experimental and should be avoided.Modules such as*nf_conntrack_amanda are not standard for basic rules set
up in iptables, so there is likely something bringing that along.