Re: lsmod question
Andy <email@example.com> writes:
> A side question if you don't mind.....
> It is my understanding that people use modules
> to make a lighter/smaller kernel. Is that correct?
> Other reasons....?
There are limits on the total size of the kernel; I believe that,
while you can build every possible driver into the kernel, the result
won't boot. Linux distributors (e.g. Debian) like to build modular
kernels since some hardware drivers conflict with others, and since
this means you can put the actual kernel and the big blob of modules
on two separate floppies.
I personally like having a more modular kernel since then I can run
'lsmod' and get a listing of most of the kernel drivers I have
loaded. But this isn't really necessary, and with the machines I
generally use being 700 MHz (or faster) x86 machines with 256 MB (or
more) of memory, the traditional arguments for going one way or
another aren't too relevant.
> Are modules supposed to load automatically?
> For example, if I don't know my sound card on my laptop, and
> I load every sound module when doing xconfig, and then
> upon first boot, does linux simply see what card I have and
> then load appropriate module?
"Only sometimes." For particular cases like filesystems or USB where
the kernel knows exactly what to load, this should just happen. But
where the kernel needs to pick a piece of hardware -- "hey, is there a
driver for my sound card" -- you need to configure things manually,
either by loading the module via /etc/modules or by adding an alias
> You will see below he has smbfs as a module.
> When I put the samba file system into my kernel as
> a module, and I run lsmod, there is nothing there.
> Does it get loaded if I try to mount a samba server?
"Built into the kernel" means "isn't a module" for purposes of lsmod.
But you have the functionality available either way.
(And as someone else noted, there are chunks of kernel code available
in Debian that are Hard to build into the kernel. These include
things like the ALSA sound system, the client code for the OpenAFS
network file system, and the lm-sensors drivers for hardware
temperature/voltage sensors. Installing these separately doesn't mean
you can't have a mostly-monolithic kernel, though.)
David Maze firstname.lastname@example.org http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell