Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I see, that I am pointing directly which driver or component should be compiled "as module". This makes me think, that the names of modules to use by kernel are hardcoded into the kernel.
But recently I have installed infiniband drivers and installer created /lib/modules/<name>/kernel/drivers/ infiniband directory with many *.ko files.
Did installer recompiled my kernel? Or it is possible for kernel to load modules which names are not hardcoded into it?
I am using Fedora 9, and /etc/modules is absent here.
But does distro affects modules stuff really?
I was thinking, that kernel and modules as a part of it, are independent of distribution.
What command
make modules_instal
does while compiling kernel?
Doesn't it copies *.ko files from kernel source to systemwide place? If so, then how it is possible for this kernel to work if I have downloaded it form kernel.org site which is unrelated with distribution?
The kernel modules for a kernel are located under /lib/modules/$(uname -r)
Some of the modules are copied to the initrd file. Others are loaded later. Look in your /etc/modprobe.conf, /etc/modprobe.d/* & /etc/modprobe.conf.local files.
I don't think the OP is asking about that. Those that you all mention are just userland scripts.
He might be more concerned about the mechanism that triggers the mechanism and how a kernel knows that a given module is the one that should handle a given device. And I guess that this post could get a better answer in the kernel subsection of the forum, where someone with a real knowledge about the issue will possibly be able to give a much more accurate response than I could give him.
That's why I am reporting this to be moved to a more convenient section.
Modules have to be loaded into memory - they then are effectively extensions to the kernel itself. When you installed the drivers (using rpm or yum presumably), it will have updated the modprobe.conf or modprobe.d as mentioned above. These are used by the (distro specific) init scripts at boot time to determine what modules should be loaded. A module can in need be loaded at any other time - it's possible for the install process to do this for you as well.
See "man modprobe" and "man modprobe.conf".
As for the later question, modules register their interest(s) with the kernel- it determines when they get control.
1) Downloaded new kernel.
2) Installed new kernel with tcp probe enabled in Networking category.
3) Restarted the laptop on new kernel.
4) But I dont see tcp_probe getting installed.
5) Giving following error when I try to do modprobe
FATAL: Module tcp_probe not found.
1) Downloaded new kernel.
2) Installed new kernel with tcp probe enabled in Networking category.
3) Restarted the laptop on new kernel.
4) But I dont see tcp_probe getting installed.
5) Giving following error when I try to do modprobe
FATAL: Module tcp_probe not found.
Let me know how to install tcp_probe
After changing the MakeFile of the Kernel it got worked
Generally speaking, the mechanism which is used to handle device-insertion is called hotplug.
When a USB device is attached or removed, the kernel has the means of broadcasting a notification to "anyone who might be listening," and that "anyone" will be the hotplug daemon. Using various information tables, hotplug figures out if any drivers need to be loaded.
It's a bit more complicated than that, but there's the idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.