LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Kernel module (https://www.linuxquestions.org/questions/linux-software-2/kernel-module-372984/)

Zandu 10-14-2005 08:09 AM

Kernel module
 
hi all,
I just built my own kernel module(simple hello world) in Red hat 7.1 with kernel 2.4.7-10.
i complied that module so that it was listed in /proc/modules or sam by lsmod coomand.
But i am not geeting how to make that module to run during boot up?Where i have to made changes?
I tried by putting insmod mymodulename in /etc/rc.d/rc.local but it doesnt work

Help me frnds

Thanks in advance.

regards

Zandu

s_deepak_123 10-15-2005 02:49 AM

you can add it in /etc/rc.d/rc.modules

If insmod doesn't work, try /sbin/modprobe

Zandu 10-17-2005 04:39 AM

hi ,
Thanks for reply that means after complining my module i add the line "insmod mymodule.o" in "/etc/rc.d/rc.modules"
and if it doesnt work i give command /sbin/modprobe by the way tell wat will be path from where modprobe take modules..

s_deepak_123 10-17-2005 11:55 PM

modprobe looks in /lib/modules/<kernel-version>/
Ex:
if the kernel version is 2.4.29 then, the path will be
/lib/modules/2.4.29/

Zandu 10-19-2005 06:26 AM

hi,
That means I should place my module in /lib/modules/2.4.29/

s_deepak_123 10-19-2005 06:35 AM

yes.
create a directory in that path and place that module in it.
Ex: mkdir /lib/modules/2.4.29/misc
cp /myhome/mymodule /lib/modules/2.4.29/misc/


All times are GMT -5. The time now is 06:26 AM.