1829566 Members
1138 Online
109992 Solutions
New Discussion

insmod "bonding" error

 
Scott Jacobson
Advisor

insmod "bonding" error

Here is the error when the driver is attempted to load:

insmod bonding
Using /lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o
/lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o: couldn't find the kernel version the module was compiled for.


22 REPLIES 22
Martin P.J. Zinser
Honored Contributor

Re: insmod "bonding" error

Hello Scott,

the page you quoted before contains a Source RPM. Did you rebuild the driver on your local system? If yes, any problems during the rebuild?

Greetings, Martin
Manoj Kumar A
Advisor

Re: insmod "bonding" error

This regarding the error during the module installation.

If the version conflict error occurs during the module installation, it is always wise to download the relavent version of c-complier and recomplie the module, then install the module using insmod.

However you can forcibly install the module by using -f option

#insmod -f

Kind Regards,
Manoj Kumar A
Scott Jacobson
Advisor

Re: insmod "bonding" error

There were no errors during the build. We were able to create/compile/build the "bcm5700" driver from this URL required for use in bonding two NIC ports. So to me the c-complier suggestion doesn't make sense; ie. why would it work for one build, but not the other?

The â insmodâ â f bondingâ resulted in the same error


insmod -f bonding
Using /lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o
/lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o: couldn't find the kernel version the module was
Alexander Chuzhoy
Honored Contributor

Re: insmod "bonding" error

try to force the bonding module from different kernel to load with a command:
insmod -f /lib/modules//kernel/drivers/addon/bonding.o


where is a directory of an "old" kernel.
Scott Jacobson
Advisor

Re: insmod "bonding" error

Are you saying to boot from an old kernal FIRST and then try the force? Also the bonding.o file doensn't exist in the other kernel "addon" path for that alternate kernel.

So are you saying to copy the existing bonding.o file into the alternate kernel path, or attempt to rebuild the bonding.o file once the alternate kernel is loaded and then try insmod?

Thank You
Alexander Chuzhoy
Honored Contributor

Re: insmod "bonding" error

It would be best to compile a bonding module from within existing kernel...
then simply use
insmod bonding
Scott Jacobson
Advisor

Re: insmod "bonding" error

Get the error:

insmod: /lib/modules/2.4.9-e.35enterprise/kernel/drivers/addon/bonding: No such file or directory


I've copied the bonding.o files into that kernel path (under addon) and verified they are there....?
Alexander Chuzhoy
Honored Contributor

Re: insmod "bonding" error

what command did you use to load the module
last time
Scott Jacobson
Advisor

Re: insmod "bonding" error

Tried it in for both kernels:

[root@ms01 addon]# insmod -f /lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o
/lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o: couldn't find the kernel version the module was compiled for
[root@ms01 addon]#
[root@ms01 addon]#
[root@ms01 addon]# insmod -f /lib/modules/2.4.9-e.35enterprise/kernel/drivers/addon/bonding.o
/lib/modules/2.4.9-e.35enterprise/kernel/drivers/addon/bonding.o: couldn't find the kernel version the module was compiled for
Scott Jacobson
Advisor

Re: insmod "bonding" error

Just "insmod"
Alexander Chuzhoy
Honored Contributor

Re: insmod "bonding" error

compile just the bonding module while you've boot with current kernel and copy it to the relevant location...
Scott Jacobson
Advisor

Re: insmod "bonding" error

Could it be the permission on the file:

drwxr-xr-x 2 root root 4096 Mar 5 11:09 aep
-rw-r--r-- 1 root root 298812 Feb 10 22:06 aic79xx_134.o
-rw-r--r-- 1 root root 232197 Feb 10 22:06 aic7xxx_mod_6230.o
drwxr-xr-x 2 root root 4096 Mar 5 11:34 bcm5700
-rw-r--r-- 1 root root 37836 Mar 5 17:09 bonding.o
-r--r--r-- 1 root root 37836 Mar 5 17:09 bonding.o.new
drwxr-xr-x 2 root root 4096 Mar 5 11:09 cciss
drwxr-xr-x 2 root root 4096 Mar 5 11:09 cipe
drwxr-xr-x 2 root root 4096 Mar 5 11:09 cpqarray
drwxr-xr-x 2 root root 4096 Mar 5 11:09 e100
drwxr-xr-x 2 root root 4096 Mar 5 11:09 e1000
drwxr-xr-x 2 root root 4096 Mar 5 11:09 e1000_4412k1
drwxr-xr-x 2 root root 4096 Mar 5 11:44 e1000_5220k1
drwxr-xr-x 2 root root 4096 Mar 5 11:09 e100_2124k2
drwxr-xr-x 2 root root 4096 Mar 5 11:40 e100_2330k1
drwxr-xr-x 2 root root 4096 Mar 5 11:09 fusion_20500
drwxr-xr-x 2 root root 4096 Mar 5 11:09 ips
drwxr-xr-x 2 root root 4096 Mar 5 11:09 megaraid2
drwxr-xr-x 2 root root 4096 Mar 5 11:09 megaraid_2002
-rw-r--r-- 1 root root 26480 Feb 10 22:06 pcnet32_127b.o
drwxr-xr-x 2 root root 4096 Mar 5 11:09 qla2200_531RH1
drwxr-xr-x 2 root root 4096 Mar 5 11:09 qla2xxx

I noticed that whe I created the "bcm5700" driver it created it's own directory in the addon location where as in the creation of the bonding driver it created bonding.o and bonding.o.NEW in the addon directory - no folder was created.
Alexander Chuzhoy
Honored Contributor

Re: insmod "bonding" error

don't think so..
Scott Jacobson
Advisor

Re: insmod "bonding" error

Alexander,

So her is where we are at:

Tried it in for both kernels:

[root@ms01 addon]# insmod -f /lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o
/lib/modules/2.4.9-e.38enterprise/kernel/drivers/addon/bonding.o: couldn't find the kernel version the module was compiled for
[root@ms01 addon]#
[root@ms01 addon]#
[root@ms01 addon]# insmod -f /lib/modules/2.4.9-e.35enterprise/kernel/drivers/addon/bonding.o
/lib/modules/2.4.9-e.35enterprise/kernel/drivers/addon/bonding.o: couldn't find the kernel version the module was compiled for

What do you suggest now?
Alexander Chuzhoy
Honored Contributor

Re: insmod "bonding" error

what I would do right now is
compile just the module for bonding.
then copy this module to relevant location-if I compiled it with 2.4.9-e.38enterprise kernel -then I'd put it under
/lib/modules/2.4.9-e.38enterprise/kernel/drivers/net/bonding/

(I have it there)
then try to load it.

Martin P.J. Zinser
Honored Contributor

Re: insmod "bonding" error

Hello Scott,

is it possible that you have installed the new Kernels but not the Kernel sources? Please go into the directory you have build the module in. From there do a cat include/linux/version.h

What do you get?

Greetings, Martin
Scott Jacobson
Advisor

Re: insmod "bonding" error

I'll check on that in a sec, however, I has partial success. When I changed to the "net" directory and not the "addon" directory it worked. However, I "insmod" to the wrong kernel (it worked), realized my mistake, removed it and then "insmod" against the correct kernel


[root@ms01 net]# insmod /lib/modules/2.4.9-e.35enterprise/kernel/drivers/net/bonding.o
[root@ms01 net]# insmod /lib/modules/2.4.9-e.38enterprise/kernel/drivers/net/bonding.o
insmod: a module named bonding already exists

AND GET:

/lib/modules/2.4.9-e.38enterprise/kernel/drivers/net/bonding.o: couldn't find the kernel version the module was compiled for

for either kernel path that I try.... hum


Scott Jacobson
Advisor

Re: insmod "bonding" error

Here is the cat results:

#include
#if defined(__module__smp)
#define UTS_RELEASE "2.4.9-e.38smp"
#elif defined(__module__BOOT)
#define UTS_RELEASE "2.4.9-e.38BOOT"
#elif defined(__module__enterprise)
#define UTS_RELEASE "2.4.9-e.38enterprise"
#elif defined(__module__summit)
#define UTS_RELEASE "2.4.9-e.38summit"
#else
#define UTS_RELEASE "2.4.9-e.38"
#endif
#define LINUX_VERSION_CODE 132105
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
Scott Jacobson
Advisor

Re: insmod "bonding" error

Do I need to take out the "#" rem char off the kernel of choice in the .h file and then build the driver again?

Martin P.J. Zinser
Honored Contributor

Re: insmod "bonding" error

Hello Scott,

no, do not change the code. The hash sign (#) is no indicating a comment in C. Comments in this language look like this
/* This is a comment
which might be split over
several lines */

The # sign indicates that the following instruction is to be processed by the C preprocessor (cpp). It is a valid and important statement.

What I wanted to check is, if you actually got the sources for the 2.4.9-e.38 kernel on your system. Since this is the case you should be able to use the module if you are running this kernel. Can you make sure using a uname -a which Kernel you are executing?

Greetings, Martin
Thomas Callahan
Valued Contributor

Re: insmod "bonding" error

I am having this same problem in RedHat ES 3 kernel version 2.4.21-27.0.2.ELsmp

error is exactly the same, has there been a resolution to this?

I have downloaded and installed the relevant kernel-sources, as well as the relevent gcc and glibc and kernel-headers. I have prepped the source tree and followed HP's instructions to a T. Still no luck...

Let me know what is going on here please. Thanks.

-Tom Callahan
NiCK_76
Respected Contributor

Re: insmod "bonding" error

Hi Scott,

Did you installed kernel source rpm of 2.4.9-e.38enterprise? You should install it .

NiCK
just for fun