[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: remove unwanted modules



On Wednesday 21 September 2005 12:53 am, Hamish Moffatt wrote:
> On Wed, Sep 21, 2005 at 12:24:06AM -0500, Marc DM wrote:
> > Stupid questions :
> >
> > How can I find out which modules my system actually needs and disable
> > the ones I don't need.
> >
> > How can I know if a module I'm disabling at startup isn't needed for
> > another module that I plan to load?
> >
> > Thanks. And I won't ask anymore stupid questions for the rest of the
> > week.
>
> You can check the use count from lsmod:
>
> Module                  Size  Used by
> nls_utf8                2432  0
> it87                   29472  0
> i2c_sensor              3712  1 it87
> i2c_isa                 2688  0
> i2c_dev                12288  0
> powernow_k8            11088  0
> freq_table              5192  1 powernow_k8
>                               ^ This column
>
> If the count is 0, it means the module is not being used, either because
> the device it supplies isn't currently being used, or because you don't
> need it.

Or with regards to the modules loaded in the initrd, 
change /etc/mkinitrd/mkinitrd.conf to have the line
    MODULES=dep
instead of =[all,most] and then regenerate the initrd.

That's what I've done anyway and it works great. One issue with newer kernels 
is that is seems to load all IDE drivers regardless since they aren't yet 
tagged as unloadable (shows [permanent] in lsmod). How can one indicate to 
initrd (or yaird) selectively which ide modules to load?

Joel Johnson



Reply to: