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

Re: Custom Kernel Build -- All Those Modules



On Sun, May 07, 2006 at 10:13:57AM -0600, Paul E Condon wrote:
> On Sun, May 07, 2006 at 05:38:07PM +0300, David Baron wrote:
> > Since I am compiling it anyway, why not compile the modules that I need and 
> > leave the others. A lot quicker and less disk space eaten up for stuff not 
> > used!
> > 
> > How do I know what to change from "m" to "no"? If it does not appear on lsmod?
> > 
> 
> I think you can't buy today a HD that is so low capacity that the
> space used is a significant issue. In fact you're unlikely to find
> such a HD in dumpster diving.
> 
> As for the time 'saved', while the compile is chugging along, use
> whatever kernel is supporting the compile to also connect to the net and
> contribute to some of the OT political discussions on this list ;-)

That really was not a very helpful response. The OP was not asking for
opinions on his reasons - he merely stated his reasons and asked for
advice on how to do it....

There are good and valid reasons your points may not apply to him.
Not everyone has a surplus of HD storage - I look after several systems
which are limited to a single CF for storage, and the size of current
hard disk technology is of no relevence.

It may be that someone is being paid to work on the kernel, in which
case faster kernel compiles would save real and potentially significant
amounts of money. Maybe he is working on an online system for which speed
of boot is important.

If you have evidence that the poster was wrong in assuming that removing
non-needed modules would actually save time or reduce storage requirements, 
then it would be pertinent to point out that you don't think it would
achieve the stated aims. You could ask for more details on the reasons
for his stated aims if you really want check that they are justified,
but otherwise I don't think a presumption that he doesn't need what
he asked for is helpful.

As to the original question, I am no expert on Linux kernel modules,
but I would say that if a module is listed by 'lsmod', then that
would be a pretty good indication that the module is needed or at
least used, and could be considered for a change to 'y'. 
However a module that is not currently in memory is not necessarily
one that will never be needed and can confidently be removed. 

If a module is a device driver for some piece of hardware that
you do not own and have no intention of owning, then you can
probably safely change its compile status to 'n'. For example
a driver for an ISA card on a machine that has no ISA slots.

In general, however, I think you will really need to decide
on a case by case basis - because only you know what optional
functionality you are likely to want to use in the future.

Removing lots of modules might make your kernel compiles a bit
faster, but the more aggressively you remove them, the more
often you are likely to need to recompile your kernel to obtain
some excluded functionality.

As an aside, another good reason that I have come across for compiling
needed drivers into the kernel is to remove the need for an initrd
during boot. I am not sure if it applies to the current version of
Debian, but I have encountered problems in the past changing the parameters
like the target runlevel on the boot command line (so that I can
have different entries in menu.lst for example) which have turned out
to be the result of the use of an initrd during boot.

Regards,
DigbyT
-- 
Digby R. S. Tarvin                                          digbyt(at)digbyt.com
http://www.digbyt.com



Reply to: