LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux module booting sequence (https://www.linuxquestions.org/questions/linux-newbie-8/linux-module-booting-sequence-4175416909/)

beparas 07-16-2012 12:33 AM

Linux module booting sequence
 
When Linux OS boots, kernel reads the "/etc/modules" file (On Ubuntu) and loaded the modules listed in it. On my system the "modules" file contains only two entries,

cat /etc/modules

lp,

rtc

But when I run 'lsmod' command, it shows me numbers of modules loaded, many of them are not present in 'modules' file. My question is

Form where the kernel get the list of loading modules.?

How the Kernel decided the sequences of module loading. means which module load first, second, third... etc.

dmdeb 07-16-2012 02:09 PM

Quote:

Originally Posted by beparas (Post 4729179)
When Linux OS boots, kernel reads the "/etc/modules" file (On Ubuntu) and loaded the modules listed in it. On my system the "modules" file contains only two entries,

cat /etc/modules

lp,

rtc

But when I run 'lsmod' command, it shows me numbers of modules loaded, many of them are not present in 'modules' file. My question is

Form where the kernel get the list of loading modules.?

How the Kernel decided the sequences of module loading. means which module load first, second, third... etc.

Hi beparas,

there are several mechanisms that are responsible for modules being loaded. A major one (on most modern linux systems) is udev, which detects devices and loads the respective modules automatically. Another reason for modules being loaded are dependencies as specified under /lib/modules/*/modules.dep (at least in Debian). The file /etc/modules allows you to enforce the loading of additional modules - therefore, it is usually much shorter than your lsmod output.

If there's something in your lsmod output that you'd prefer not to be loaded, you can try to blacklist it (/etc/modprobe.d/blacklist.conf in the Debian family).

Regards
dmdeb


All times are GMT -5. The time now is 04:55 AM.