LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   modules, boot process, how, why, where? (https://www.linuxquestions.org/questions/slackware-14/modules-boot-process-how-why-where-936456/)

plisken 03-26-2012 05:17 AM

modules, boot process, how, why, where?
 
Looking for some pointers, this is a follow on from a previous post, but thought it best to have its own thread.

I'm looking on information on how modules are inserted/loaded at boot time, what determines which ones are selected etc etc.

I know I have /lib/modules/[kernel version]
When I build my kernel, does the /lib/modules/[kernel version] filder beomce poulated based on the .config file used to customise the kernel?

I also have /etc/rc.d/rc.modules
What creates this file, is it standard or customised to my system?

I see /etc/rc.d/rc.S runs the above file at boot time, so what determines which modules are available and which should be loaded?

cat /proc/modules only shows:
agpgart 42648 0 (unused)



All help/comments are as always appreciated.

TobiSGD 03-26-2012 06:26 AM

Quote:

Originally Posted by plisken (Post 4636379)
I know I have /lib/modules/[kernel version]
When I build my kernel, does the /lib/modules/[kernel version] filder beomce poulated based on the .config file used to customise the kernel?

Yes, the modules directory is created when you launch
Code:

make modules_install
Quote:

I also have /etc/rc.d/rc.modules
What creates this file, is it standard or customised to my system?
I don't know how it is created, but if you have a look at this file you will see that it only should be used if udev is not present or not working correctly (or your hardware needs a special treatment).

Quote:

I see /etc/rc.d/rc.S runs the above file at boot time, so what determines which modules are available and which should be loaded?
It is udev that loads the modules.

GazL 03-26-2012 07:00 AM

My understanding of rc.modules is that it is hand-crafted. I don't know whether its contents are slackware specific or something generic that was originally from upstream somewhere, but the source file can be found in $mirror/slackware/source/k/kernel-modules/rc.modules.new. It hasn't been updated in a long while though, and when Patrick decided to modularise the loop device module he added an etc/rc.d/rc.loop initscript rather than use the traditional rc.modules file. Whether this means rc.modules is 'deprecated' or not I don't know.

plisken 03-26-2012 08:40 AM

I should add that these questions arose from findings on a slack 9.1 system 2.4.22 kernel.

Thought I'd add that as I read somewhere that udev was a > 2.4.22 kernel thing.

What decides which modules should be loaded at boot time?

the3dfxdude 03-26-2012 09:04 AM

Back during slackware 9.1, hotplug was the predecessor to udev. So if you aren't using rc.modules, or statically linking your modules, then look there.

dive 03-26-2012 04:53 PM

FYI rc.modules is contained within the kernel-modules package.


All times are GMT -5. The time now is 01:36 AM.