LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to insert a loadable module into the kernel.? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-insert-a-loadable-module-into-the-kernel-517401/)

moog 01-08-2007 09:13 AM

how to insert a loadable module into the kernel.?
 
I'm really a novice LINUX user..


I'd like to insert module into the kernel.

Where is my kernel located?

I'm using fedora Core 6..

I know a little bit about the modprobe,but is there any way to edit the kernel directly in text mode.?????

Also how to enable a loadable module already in the kernel??

Simon Bridge 01-08-2007 09:36 AM

You insert a loadable module into the kernel with the "modprobe" command.
(man modprobe)

You cannot edit the kernel directly - you can edit the kernel source!
However - FC does not ship with the kernel source. You must use yum to install it.
(www.fedorafaq.org, www.mjmwired.net)

To insert a module into the kernel you must recompile the kernel to include your module code. There are plenty of tutorials etc (including in LQ) on compiling the kernel.

Once the module is compiled into the kernel, it is "enabled". (Unless you are thinking of something else?)

PTrenholme 01-08-2007 09:37 AM

Here's my take on your questions:

Quote:

Originally Posted by moog
I'm really a novice LINUX user..


I'd like to insert module into the kernel.
Use modprobe
Where is my kernel located?
The actual "kernel" is loaded during startup by the boot loader, so it would be in /boot
I'm using fedora Core 6..

I know a little bit about the modprobe,but is there any way to edit the kernel directly in text mode.?????
No. You can, however, pass argument through the kernel to processes started by it. And, of course, you're free to download the kernel source and recompile it incorporating any changes you wish.

Also how to enable a loadable module already in the kernel??
Look at /etc/modprobe.* for what is added by the nash init script, and at /etc/rc.d/rc?.d/* for the links to the services started after the kernel is loaded. (See /etc/rc.d/rc.sysinit for details.

If there's some specific thing(s) you'd like to have in the kernel, tell us what it is, and someone here might be able to help you.

Also, you should install the release documentation and look at the kernel options section. What you want to do might already be an option you could pass to your FC 6 kernel.


All times are GMT -5. The time now is 12:40 PM.