Module inside the kernel, and loaded ones

Hi all,

I'm using Linux and *BSD since years, but I'm really new to system administration.

I wonder how I can have "the full list of modules" of a Debian system.
When I compile a kernel, some modules are marked 'kernel' and some are 'module'. The first are compiled inside the kernel, the second are separate binaries. Easy.

To see what modules are loaded, I just issue 'lsmod'. This gives me the list of currently loaded modules.

If I look inside /boot/config`uname -r` I can see which modules are in the kernel and which are loadable. And even which are not available at all (except if I take the binaries from elswhere).

I'm correct until here ?

Now, what I want is to have the "real" list of modules inside the kernel. Without looking into /boot/config`uname -r` or another indirect way. Just by asking the system or by looking inside the kernel file or inside memory.

Loaded modules are listed with lsmod, then no need to list them in another way. Even if an all-in-one method can be used :-)

I googled during hours but not found any clue. I just think this is not possible with a simple command.
Someone have a way to do that ?

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Module inside the kernel,

cd /lib/modules/$(uname -r)/kernel
find . -name '*.ko'

I don't see how this differs much from the config-$(uname -r) though. The few differences would be where:
1. The driver is built into the kernel, or not compiled at all - they will not appear in these directories.
2. The config file indicates '=y', but 'Y' means 'enable support for Z in the module' rather than the usual 'compile into kernel'.

Why are you so concerned about the modules?

Module inside the kernel,

I'm not concerned really strongly. I just wonder where to find informations.

In my mind, the ideal place to find this kind of thing should be in the kernel itself. If the module is compiled into the kernel, then only a look inside the kernel can tell it for sure.

I can imagine lots of problems in a company like where I work. Someone can change a kernel just by copying it from another machine and so on. And when he calls the linux guy (me, just a newbie) I like to understand things :)

Syndicate content