-
insmod problems
I noticed something really weird about insmod..
Code:
$su
Password:
VCC_SRC_HOME = /root/VCC2
[root@sarayu tipc_demo-1.15]# which insmod
/usr/bin/which: no insmod in (/root/VCC2-Deps/java/jdk1.6.0_01/bin:/root/VCC2-Deps/ant/apache-ant-1.6.2/bin:/root/VCC2-Deps/java/jwsdp-1.5.0/jaxb/bin:/root/VCC2-Deps/JacORB/JacORB_1_4_1/bin:/root/VCC2-Deps/aspectj/aspectj1.5/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/chaitanya/bin)
[root@sarayu tipc_demo-1.15]# exit
exit
and
Code:
$su -
Password:
VCC_SRC_HOME = /root/VCC2
[root@sarayu ~]# which insmod
/sbin/insmod
In the first case , i logged in as su without the -l option and insmod failed to work. In the second case, with the -l option, it worked. What is going on here?
-
Read the man page for su and find out what that option does.
You can also try
echo $PATH
in both cases.
-
OK. I noticed the difference in the paths and I concluded that the location from where i call insmod should not matter. But the problem is due to the actions performed by the login shell right? So, insmod can never be successfully called without logging into the login shell is it?
-
If you specify the full path to it, yes.
Eg
# /sbin/insmod
-
Things seem to get weirder by the minute...
I am trying to install TIPC - 1.5.12 on this comp. Now, i can get insmod to work. But, when I try to use insmod to insert the module that i want to insert to the kernel, i get the message saying
"insmod: error inserting 'tipc.ko': -1 Invalid module format"
This is the file that has to be inserted according to the documentation in :
http://tipc.sourceforge.net/doc/Users_Guide.txt
-
>If you specify the full path to it, yes.
Yeah. figured that out ..
-
If this can help in some way :
Code:
$ modinfo tipc.ko
filename: tipc.ko
description: TIPC: Transparent Inter Process Communication
license: Dual BSD/GPL
version: 1.5.12
vermagic: 2.6.11-1.1369_FC4 686 REGPARM 4KSTACKS gcc-4.0
depends:
srcversion: 63E59CA197A5130BF0BD26A
-
insmod is working for now. I booted the default, non-smp FC-4 kernel. That is sorted out for the time being.
One conceptual doubt though, when i do insmod on tipc.ko, the kernel object is supposed to be inserted into the kernel module right? Does this mean, say a "tipc.h" file is actually put into the dir : /usr/src/kernel/2.6.11-1.1369_FC4-i686/include/net?
-
No, no header file needs to be installed.
You can't insert any module into any kernel. Make sure that the module you are trying to insert was compiled for YOUR kernel version. Otherwise, it will be rejected, as sort of a safety feature to prevent compatibility problems.