Help - Search - Members - Calendar
Full Version: Kernel unable to load module
MandrivaUsers.org > Advanced Topics > Command Line, Kernel and Programming
rohitsz
Greetings there,

I am installing the Cisco VPN Client on mandriva 2008(free).
I faced problems compiling the client, then it got fixed here

Now i am facing problems starting the client.
here are a few screenfull:
CODE
[root@localhost vpnclient]# /etc/init.d/vpnclient_init start
Starting /opt/cisco-vpnclient/bin/vpnclient: insmod: error inserting '/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN/cisco_ipsec.ko': -1 Invalid module format
Failed (insmod)
[root@localhost vpnclient]#


some stats:
CODE
[root@localhost vpnclient]# modinfo cisco_ipsec.ko
filename:       cisco_ipsec.ko
license:        Proprietary
depends:
vermagic:       2.6.22.9-1mdvcustom SMP mod_unload 686
[root@localhost vpnclient]#


CODE
[root@localhost vpnclient]# modinfo cpuid
filename:       /lib/modules/2.6.22.9-desktop-1mdv/kernel/arch/i386/kernel/cpuid.ko.gz
license:        GPL
description:    x86 generic CPUID driver
author:         H. Peter Anvin <hpa@zytor.com>
depends:
vermagic:       2.6.22.9-desktop-1mdv SMP mod_unload 686


CODE
[root@localhost vpnclient]# uname -a
Linux localhost 2.6.22.9-desktop-1mdv #1 SMP Thu Sep 27 04:07:04 CEST 2007 i686 Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz GNU/Linux
[root@localhost vpnclient]#


I'm back stuck again getting the client working unsure.gif

PLease help!

thanks,
rohit.
fdany
QUOTE (rohitsz @ Nov 4 2007, 09:52 AM) *
'/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN/cisco_ipsec.ko': -1 Invalid module format
filename: /lib/modules/2.6.22.9-desktop-1mdv/kernel/arch/i386/kernel/cpuid.ko.gz


Make a cisco_ipsec.ko.gz module and try again
rohitsz
Hi,

QUOTE (fdany @ Nov 4 2007, 02:04 PM) *
Make a cisco_ipsec.ko.gz module and try again


How do i go about doing that?

Thanks,
rohit.
Steve Scrimpshire
Have you tried rebooting and seeing if you have a 2.6.22.9-1mdvcustom kernel you can boot into?

It looks like it compiled your module against that? Had you somewhere down the line tried to recompile your kernel? Getting the 'custom' in your modinfo is a sign of that.

Edit:
Ah, I see from your link that you applied a patch that is 'include'-ing 'linux/whatever', so if you are booting to a kernel whose source is not pointed to by the symlink /usr/src/linux or the /lib/modules/whatever/linux directory, then insmod will fail. Go to a console and type

ls -l /usr/src/linux

and if the symlink doesn't match what uname tells you, you will have to change the symlink to the right kernel and repatch your VPNclient (your patch is actually patching the client, not the kernel as far as I can tell) then recompile it.
fdany
QUOTE (rohitsz @ Nov 4 2007, 11:12 AM) *
Hi,
How do i go about doing that?

Thanks,
rohit.

Use gzip
rohitsz
Hi,

QUOTE (Steve Scrimpshire @ Nov 5 2007, 09:48 AM) *
Edit:
Ah, I see from your link that you applied a patch that is 'include'-ing 'linux/whatever', so if you are booting to a kernel whose source is not pointed to by the symlink /usr/src/linux or the /lib/modules/whatever/linux directory, then insmod will fail. Go to a console and type

ls -l /usr/src/linux

and if the symlink doesn't match what uname tells you, you will have to change the symlink to the right kernel and repatch your VPNclient (your patch is actually patching the client, not the kernel as far as I can tell) then recompile it.


here's the output:

CODE
[root@localhost /]# ls -l /usr/src/linux
lrwxrwxrwx 1 root root 19 2007-10-28 20:42 /usr/src/linux -> linux-2.6.22.9-1mdv/
[root@localhost /]#


CODE
[root@localhost /]# uname -a
Linux localhost 2.6.22.9-desktop-1mdv #1 SMP Thu Sep 27 04:07:04 CEST 2007 i686 Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz GNU/Linux
[root@localhost /]#


So as per your observation, these two are different.
where/how do i symlink the correct kernel?

@fdany : where do i put that file creted using gzip.

thanks,
rohit.
Steve Scrimpshire
The '-desktop-' part is not important, so your source and uname match. The problem, though, is that the version magic of your module shows 'custom' which sounds like the compiling of the module altered the kernel's config file in the source. Since the version magic of the module does not match your installed kernel, you will probably wind up having to recompile your kernel using the config file that is in /usr/src/linux-2.6.22.9-1mdv/

If you would like to try it, I'd be happy to give you instructions on how to do that.

You may want to wait if someone has actually installed this package and knows whether or not I am mistaken since I have never installed it.
fdany
Mandriva uses compressed kernel modules and your error message indicates that the module was compiled but not compressed so all you have to do is find the module in the tree /lib/modules/2.6.22.9-desktop586-1mdv/kernel/... (it's my kernel tree)
compress it with "gzip module-name.ko"
and that's all.
Steve Scrimpshire
Ah, the obvious.
rohitsz
Hi,

QUOTE (fdany @ Nov 7 2007, 03:30 AM) *
Mandriva uses compressed kernel modules and your error message indicates that the module was compiled but not compressed so all you have to do is find the module in the tree /lib/modules/2.6.22.9-desktop586-1mdv/kernel/... (it's my kernel tree)
compress it with "gzip module-name.ko"
and that's all.


I did as you told:

CODE
[root@localhost CiscoVPN]# pwd
/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN
[root@localhost CiscoVPN]# gzip cisco_ipsec.ko
[root@localhost CiscoVPN]# ls
cisco_ipsec.ko.gz
[root@localhost CiscoVPN]#



i got this:
CODE
[root@localhost vpnclient]# /etc/init.d/vpnclient_init start
Starting /opt/cisco-vpnclient/bin/vpnclient: insmod: can't read '/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN/cisco_ipsec.ko': No such file or directory
Failed (insmod)
[root@localhost vpnclient]#


here are the rights of the file:
CODE
[root@localhost CiscoVPN]# ll
total 148
-rw-r--r-- 1 root root 144567 2007-11-04 12:52 cisco_ipsec.ko.gz


then i created a .ko and .ko.gz file in the CiscoVPN dir:

CODE
[root@localhost CiscoVPN]# ls
cisco_ipsec.ko  cisco_ipsec.ko.gz


Then i got this:

CODE
[root@localhost CiscoVPN]# /etc/init.d/vpnclient_init start
Starting /opt/cisco-vpnclient/bin/vpnclient: insmod: error inserting '/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN/cisco_ipsec.ko': -1 Invalid module format
Failed (insmod)
[root@localhost CiscoVPN]#


What next to do. unsure.gif

Thanks,
rohit.
ianw1974
You gzipped it but not in your kernel tree? Do this:

CODE
find /lib -name cisco_ipsec*


if it doesn't find the module here, then you cannot load it into the kernel and therefore this is why it's failing. It seems to me you extracted the cisco_ipsec tarball, and have compressed it in here, and it doesn't even exist in your kernel tree.
rohitsz
Hi,

the module seems to be there:
CODE
[root@localhost CiscoVPN]# pwd
/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN
[root@localhost CiscoVPN]# find /lib/ -name cisco_ipsec*
/lib/modules/2.6.22.9-desktop-1mdv/CiscoVPN/cisco_ipsec.ko
[root@localhost CiscoVPN]#


Also while searching over the net i came across this
I hope someone might have come across such a problem on mandriva or maybe this has already been taken care of.
I have not tried it on my system as of now.

Thanks,
rohit.
ianw1974
How did that CiscoVPN directory get there? Did you manually create it and put in in the kernel tree? Or was it compiled into the kernel and placed automatically there? IE: not copied by you?

I would have expected it to come under a different directory that is all. I've never used cisco_vpn, but it doesn't look normal.
ianw1974
Maybe try:

CODE
modprobe cisco_ipsec
rohitsz
Hi,

QUOTE (ianw1974 @ Nov 8 2007, 06:08 PM) *
Or was it compiled into the kernel and placed automatically there?

Yes, it was compiled into the kernel and placed automatically there.

QUOTE (ianw1974 @ Nov 8 2007, 06:08 PM) *
I would have expected it to come under a different directory that is all. I've never used cisco_vpn, but it doesn't look normal.


It's all normal, it worked flawlessly in the mandriva 2007(free) version. :-)

Thanks,
rohit.
tcn03u
Have you found the solution to this problem?
I'm on the same boat here.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.