View previous topic :: View next topic |
Author |
Message |
shallpion Guru
Joined: 29 Sep 2008 Posts: 331
|
Posted: Thu Oct 16, 2008 6:53 pm Post subject: question about the autoloading of modules |
|
|
Hi dear all. I installed a gentoo on my virtualbox with a intel pro/1000 virtual network. I think this needs an e1000 module so I compile it as module during the installation. Then I added e1000 to /etc/modules.autoload.d/kernel-2.6, so when the system started it obtained IP through DHCP. Since I am learning gentoo so I wonder what will happen if I did not assign e1000 to be loaded automatically. To my surprise even I deleted e1000 from /etc/modules.autoload.d/kernel-2.6, this module was still loaded by system when I restarted my virtualmachine. So I was confused. Can anybody kindly explain me the following questions?
1. How to figure out a module in "lsmod" was compiled into kernel or just was compiled as a module?
2. Is there any approach to read the detail information when the system is starting, rather than dmesg? I think if I can know the exact reason
why the system requires some modules to be loaded, such as what configuration file the kernel is reading, that will be extremely helpful for me
to understand gentoo.
3. If the question 2 is not very practical, can anybody please tell me besides /etc/modules.autoload.d/kernel-2.6, is there any other configuration file which determines the autoloading of modules?
Thank you. |
|
Back to top |
|
|
z3rgl1ng_z Tux's lil' helper
Joined: 06 Jan 2006 Posts: 116 Location: Romania
|
Posted: Thu Oct 16, 2008 7:18 pm Post subject: |
|
|
Do you have this enabled?
Code: | [*] Enable loadable module support --->
[*] Automatic kernel module loading |
Here is the help for it:
Normally when you have selected some parts of the kernel to
be created as kernel modules, you must load them (using the
"modprobe" command) before you can use them. If you say Y
here, some parts of the kernel will be able to load modules
automatically: when a part of the kernel needs a module, it
runs modprobe with the appropriate arguments, thereby
loading the module if it is available.
This should answer to question 3.
As for 1, if you have something compiled into kernel will not apear in lsmod, only modules loaded are shown in lsmod.
For 2, i don't think you need to check dmesg to find out what program asked for network connection, and network (net.ethX) asked for a interface that needed the e1000 module to bring it up.
Short example:
/etc/init.d/sshd:
Code: | ....
depend() {
use logger dns
need net
}
.... |
As you see it needs net, this will start to autostart net.ethx, if it is configured and autoload the needed kernel module, hope things are clear now.
I'm not the best at explications |
|
Back to top |
|
|
shallpion Guru
Joined: 29 Sep 2008 Posts: 331
|
Posted: Fri Oct 17, 2008 4:50 am Post subject: |
|
|
z3rgl1ng_z wrote: | Do you have this enabled?
Code: | [*] Enable loadable module support --->
[*] Automatic kernel module loading |
Here is the help for it:
Normally when you have selected some parts of the kernel to
be created as kernel modules, you must load them (using the
"modprobe" command) before you can use them. If you say Y
here, some parts of the kernel will be able to load modules
automatically: when a part of the kernel needs a module, it
runs modprobe with the appropriate arguments, thereby
loading the module if it is available.
This should answer to question 3.
As for 1, if you have something compiled into kernel will not apear in lsmod, only modules loaded are shown in lsmod.
For 2, i don't think you need to check dmesg to find out what program asked for network connection, and network (net.ethX) asked for a interface that needed the e1000 module to bring it up.
Short example:
/etc/init.d/sshd:
Code: | ....
depend() {
use logger dns
need net
}
.... |
As you see it needs net, this will start to autostart net.ethx, if it is configured and autoload the needed kernel module, hope things are clear now.
I'm not the best at explications |
Thank you very much!! I learned a lot from that!! Thank you |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|