On Thu, 19 Jun 2008 16:58:56 -0700, Wade Curry
<[EMAIL PROTECTED]> wrote:
Ryan Lewon wrote:
On Thu, Jun 19, 2008 at 03:47:23PM -0700, randall wrote:
> Does anyone know if there is a program that looks at the
> hardware on a linux platform, then lists the necessary kernel
> modules and no others? I want to optimize a kernel for one of
> my platforms, but a recent glance at menuconfig shows literally
> hundreds of possibilities that is becoming confusing and I am
> afraid to do this manually.
>
> - Randall
Unfortunately, there is no such utility if there were, they
wouln't make monolithic MASSIVE kernels. It's best not to venture
into menuconfig if you don't know what you're doing in there
anyways especially hardware wise.
-- Ryan Lewon /sbin.us
Randall! Don't listen to him!!
The people who've stuck with Linux over the long haul and know
their stuff, are the ones who *experimented* when they came to this
kind or situation. This is a *great* chance to become familiar
with your hardware, your bootloader, the kernel, the documentation
that is in your kernel source, and the kernel config tools. (There
is more than menuconfig, but menuconfig has the least build
requirements.)
It's not dangerous. You won't get injured. The *worst* that could
happen is that you might need a fresh installation. Back up your
data and be smart, then the mistakes will be "AHA!" experiences
instead of heartbreakers.
Maybe you even have a little space on your disk that you could
create a bootable partition on. Put a minimal installation on it
and use it only for experimentation.
The advice to see what modules were loaded by stock kernels is a
good place to start. The "lsmod" command will list them for you.
In the end though, you still need to just take the time to go
carefully through the list. It won't be fast, and probably won't
be fun, but it *will* pay off! You can save the kernel configs
into a separate file between builds. If you only want to change a
few things, reload it instead of starting from scratch.
Wade Curry
syntaxman
It is a most excellent idea, and should be common sense, to load your new
kernel using a different entry in Lilo (or whatever boot loader you're
using.) I keep my original distro's kernel around and in Lilo for ever and
ever, just in case.
Also, someone please correct me if I am wrong (and I know you will, and I
admit my knowledge in the area is somewhat rudimentary) but isn't the
point of having loadable modules to keep the kernel small? If,
hypothetically, I compile every USB wireless driver as a module, I could
effectively buy a new USB wireless controller, plug it in, and the kernel
will just use the appropriate module, no?
If I have compiled kernel modules that do not match up to my hardware do
they do anything but take up disk space? Surely my kernel doesn't load 100
USB wireless modules when it only needs to use one?
It's my understanding that the reasoning behind any distro's monolithic
kernel is to provide a boot kernel that contains all possible drivers
needed for booting (including all filesystem drivers, pci drivers, etc.),
things that can't really safely be a module on unknown systems. When I
compile my own kernel it's usually to take out all filesystem drives other
than xfs and optomize any drivers specific to my motherboard/CPU.
-Matt
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list