Jump to content
rohitsz

Kernel unable to load module

Recommended Posts

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:

[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:

[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]#

 

[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

 

[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:

 

PLease help!

 

thanks,

rohit.

Share this post


Link to post
Share on other sites
'/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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi,

 

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:

 

[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 /]#

 

[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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi,

 

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:

 

[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:

[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:

[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:

 

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

 

Then i got this:

 

[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:

 

Thanks,

rohit.

Share this post


Link to post
Share on other sites

You gzipped it but not in your kernel tree? Do this:

 

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.

Share this post


Link to post
Share on other sites

Hi,

 

the module seems to be there:

[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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hi,

 

Or was it compiled into the kernel and placed automatically there?

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

 

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...