-   Linux - Newbie (
-   -   how to load kernel module based on kernel version? (

linetnew 05-10-2005 08:08 AM

how to load kernel module based on kernel version?
I want to execute my kernel module at start of red hat linux. But i that depends
on which compiled kernel version i am booting. I have compiled kernel 2.6.10 with its name "2.6.10-NEW". So whenever i boot kernel 2.6.10-New it must load kernel module that i have testmodule.o
How to do that in linux shell script and how to execute it at start of linux RH9?


slackie1000 05-10-2005 08:20 AM

hi there,

you just implement an "if" with the command "uname" and everything is fine...
something like that..

kernel=`uname -r`
if [ "$kernel" -eq "XXX" ]; then
 modprobe $whatyouwant

put that in your init scripts - sorry, i have no idea where they are in redhat - and it works..


linetnew 05-10-2005 10:56 AM

But module is in my home directory /home/rahul/testmodule.o
How to use modprobe then ?

slackie1000 05-10-2005 11:45 AM

hi there,

afaik if you are not root, no chance... security reasons...
if you are root, why you don't copy it to the correct directory?
from your home without being root, sorry.. no idea..



All times are GMT -5. The time now is 02:22 AM.