-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 14 January 2003 09:31 am, David Betz wrote:
> I just installed RedHat 8.0 including the kernel development package
> and used it to build a simple kernel module. When I tried to load the
> kernel module I got an error saying there was a version mismatch. When
> I checked /usr/include/linux/version.h I noticed that it said the
> kernel version was 2.4.9-9 but the actual kernel installed with RedHat
> 8.0 is 2.4.18-14. Why is there a mismatch between the installed kernel
> and the kernel include files? What is the best way to bring my include
> directory in sync with the kernel?

Others have answered with good answers already, but there is also another 
simple reason for a detected version mismatch.

When you install the stock Red Hat kernel source package, the makefile 
contains the following line:
$ grep -i extra /usr/src/linux-2.4/Makefile
EXTRAVERSION = -19.8.0custom
(In other words, the 'custom' tag is added to the EXTRAVERSION define.)

Modules compliled against the kernel source, which should work fine for 
the 2.4.18-19.8.0 (for example) kernel, will complain about a mismatch, 
since the module is compiled for the 2.4.18-19.8.0custom kernel.

If that's the case, the error message is pretty useful, something along 
the lines of: "module is for kernel 2.4.18-19.8.0custom, while the 
running kernel is 2.4.18-19.8.0"

I suppose Red Hat adds the 'custom' tag to prevent people from wiping out 
their current modules directory when running make modules_install. It 
does however cause problems of it's own when trying to build a single 
module.

I know this is the case here, where I have an ethernet module I have to 
rebuild from source at each kernel upgrade. More than once, I've 
forgotten to edit the kernel makefile only to find that the module 
refuses to load after booting into the new kernel.

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.{2,3}|8.0 in 8M of RAM: http://www.rule-project.org/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+JLbQn/07WoAb/SsRAlZrAJ9SjYiw2V7C1IrCQTQReFauShvpsgCgtUsQ
t1m6nquIDcDB74oRlWn6jes=
=TT39
-----END PGP SIGNATURE-----



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to