help-getting all loadable kernal module information while linux booting

Submitted by dileepkantamneni
on June 14, 2009 - 9:37pm

Hi all,
Iam trying to debug kernel .So I want to know how kernel get the information about the kernel loadable modules information while booting..
If kernel uses any data structure to store this information ,tell me how can i acess thta data structure.

Thanks in advance

files

strcmp
on
June 14, 2009 - 10:33pm

information about modules is stored in /etc/modules, /etc/modprobe.conf, /etc/modprobe.d/, /lib/modules/‘uname -r‘, but none of them but the modules itself are read by the kernel, they are config files of modprobe and the modules-init-tools init script. you need a file system (disk or initramfs) to load modules.

the kernel doesn't know

Mathieu
on
June 15, 2009 - 12:35pm

the kernel doesn't know about any loadable module before letting the init finish the init in the user space. Unless the module is compiled inside the kernel, the kernel itself doesn't need to know anything about the future module loaded by user/application or init.

The module that you see in the kernel at boot up are the module compiled in. The kernel look at the init section that has all the driver module init function (those are the one declared with the __init directive in your driver module code).

Comment viewing options

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