LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Invalid module format (https://www.linuxquestions.org/questions/linux-general-1/invalid-module-format-900456/)

Wayne Sallee 08-31-2011 02:21 PM

Invalid module format
 
I have googled this and found a thousand answers, but none of them seem to answer my problem.

I have been using the distro kernels (Mandriva), but needed to install a current kernel directly from kernel.org.

When doing a modprobe on some modules I get this error.
This error usually means that one thing is using a different version, but I can't find where that is happening.

I have a lot of kernels installed, but while the distro kernels don't give me that error, any kernel I install from source from Kernel.org, I get the error on a few modules.

Wayne Sallee
Wayne@WayneSallee.com

MS3FGX 08-31-2011 04:07 PM

You can only use modules that were built against the exact same kernel as the one you are currently running. That means, even if you downloaded the identical kernel version from kernel.org and built a module against it, it still wouldn't work on your running system because it wasn't built from the same source.

To build kernel modules for your system you need to either download the kernel source package from your distribution's package repositories and build against that, or else completely replace your kernel and all modules with ones that you personally built from source.

Not being a Mandriva user, I don't know how much modification (if any) they do on the source, so I can't say for sure that replacing the Mandriva kernel with a vanilla build is a good idea, or would even work. It is likely a much safer (and certainly, easier) approach to build against your distribution's provided kernel source.

Wayne Sallee 09-01-2011 05:41 PM

Quote:

Originally Posted by MS3FGX (Post 4458279)
You can only use modules that were built against the exact same kernel as the one you are currently running. That means, even if you downloaded the identical kernel version from kernel.org and built a module against it, it still wouldn't work on your running system because it wasn't built from the same source.

To build kernel modules for your system you need to either download the kernel source package from your distribution's package repositories and build against that, or else completely replace your kernel and all modules with ones that you personally built from source.

Not being a Mandriva user, I don't know how much modification (if any) they do on the source, so I can't say for sure that replacing the Mandriva kernel with a vanilla build is a good idea, or would even work. It is likely a much safer (and certainly, easier) approach to build against your distribution's provided kernel source.

Thanks,

The kernels work, there's just a few things I need to work out.

Also do you have any advice in regard to dkms mods' ability to build the module when a new kernel is built?

Wayne Sallee
Wayne@WayneSallee.com

Wayne Sallee 09-06-2011 10:14 AM

Anyone else?

Wayne Sallee
Wayne@WayneSallee.com

Wayne Sallee 05-20-2012 07:22 PM

Well it's been almost 9 months now.

Is there still nobody that knows the answer that can explain it to me?

Wayne Sallee
Wayne@WayneSallee.com


All times are GMT -5. The time now is 02:36 PM.