insmod: invalid module format with 2.6.27 kernel

Timo Teräs timo.teras at iki.fi
Mon Apr 13 15:14:06 UTC 2009


Dallas Clement wrote:
> I have been using busybox version 1.13.3 just fine with the linux kernel
> version 2.6.21.1.  I recently upgraded my kernel to 2.6.27 and am now
> getting an error when I try to insert a kernel module.  For example:
> 
> ext2:  no symbol version for struct_module
> 
> insmod: cannot insert '/lib/modules/2.6.27/ext2.ko': invalid module format
> 
> Does anyone have ideas for me on what might be the problem?  I am
> assuming that this is a problem with insmod.

You have compiled the modules without building the kernel. When you
compile kernel with versioned symbols, a file called "Module.symvers"
is generated, that needs to be present when compiling the modules.
Otherwise you don't get module symbol versions, and the kernel
refuses to load module by default.

There is a way to enforce the kernel to load a module even if the
symbols mismatch. But it's not implemented in busybox modutils
currently. Even in module-init-tools it's not in insmod; only in
modprobe.

Recommended is to fix your build scripts / environment so that
you do full kernel compile and preserve Module.symvers and use
it when compiling modules. Or turn off "versioned symbols" from
kernel configuration.

Cheers,
  Timo


More information about the busybox mailing list