Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Installation - Getting started with Red Hat Linux
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
About kernel-modules version mismatch

About kernel-modules version mismatch

2004-08-06       - By Mir Muzaffar Ali

 Back
Thank you for your reply.  I'm sure this will work because it makes sense since
there will be only one kernel on the system.  Redhat uses the "custom" tag as a
precaution when recompiling kernels so that the original is left intact and one
would be able to reboot in case something goes wrong with the recompiled
version.

However I have found another way as well.  If you include the -I flag and give
the proper path to the current kernel header files, the module will be inserted
.  This is what I did when I booted the "custom" kernel

gcc -c hello.c -I/usr/src/linux-2 (See http://nux-2.ora-code.com).4.20-8/include

and then

insmod hello.o

I have got the directory linux-2 (See http://nux-2.ora-code.com).4.20-8 and the include directory in it has the
header files for which the current "custom" kernel was compiled against.
Anyways thank you for the prompt reply Brian.

Mir

*******************************************************************************
**********************

Go re-compile the kernel, but edit Makefile in /usr/src/linux
In the Makefile, near the top, is a line defining a name as being  
"-8custom"
Change that to read ""
then make & install the kernel
After that, you'll be building kernels and modules on the same version.

Brian Brunner
brian.t.brunner@(protected)
(610)796-5838

>>> mir_rulz16@(protected) 08/05/04 05:06PM >>>
Hi,

I'm relative new to linux and I've just started module programming
following the Alessandro Rubini and Jonathan Corbet "Linux Device Drivers"
book for kernel 2.4.  I have got Redhat 9.0 installed on my system.  I
try to use "insmod" to insert a module called hello.o, however the
system returns a message

hello.o: kernel-module version mismatch.
hello.o was compiled for kernel version 2.4.20
while this kernel is 2.4.20-8custom

In the book it is mentioned that it would be better to recompile the
kernel without the version support for modules.  I believe I did the
right thing by simply changing the option of "loadable module support ->
set version information on all module symbols" from y to n.  I ran "make
xconfig" and followed the steps carefully listed in the Red Hat
documentation CD plus the steps listed on Alessandro's website and as you can
see from the message I booted the recompiled custom kernel without any
problems.

I don't know if this information is pertinent as well but I typed the
following

"gcc --version" and I got

"gcc (GCC) 3.2.2.20030222 (Reh Hat Linux 3.2.2-5)" followed by some
text.  I believe my compiler is ok.  Could someone please help me out?  Is
what I did the thing to do or was I suppose to do something else in
order to remove version support?

Mir




   
-- ---- ---- ---- ---- ---- -----
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
<DIV>Thank you for your reply.&nbsp; I'm sure this will work because it makes
sense since there will be only one kernel on the system.&nbsp; Redhat uses the
"custom" tag as a precaution when recompiling kernels so that the original is
left intact and one would be able to reboot in case something goes wrong with
the recompiled version.</DIV>
<DIV>&nbsp;</DIV>
<DIV>However I have found another way as well.&nbsp; If you include the -I flag
and give the proper path to the current kernel header files, the module will be
inserted.&nbsp; This is what I did when I booted the "custom" kernel</DIV>
<DIV>&nbsp;</DIV>
<DIV>gcc -c hello.c -I/usr/src/linux-2 (See http://nux-2.ora-code.com).4.20-8/include</DIV>
<DIV>&nbsp;</DIV>
<DIV>and then </DIV>
<DIV>&nbsp;</DIV>
<DIV>insmod hello.o</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have got the directory linux-2 (See http://nux-2.ora-code.com).4.20-8 and the include directory in it
has the header files for which the current "custom" kernel was compiled against
.&nbsp; Anyways thank you for the prompt reply Brian.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Mir</DIV>
<DIV>&nbsp;</DIV>
<DIV>**************************************************************************
***************************</DIV>
<DIV>&nbsp;</DIV>
<DIV>Go re-compile the kernel, but edit Makefile in /usr/src/linux<BR>In the
Makefile, near the top, is a line defining a name as being&nbsp; <BR>"-8custom"
<BR>Change that to read ""<BR>then make &amp; install the kernel<BR>After that,
you'll be building kernels and modules on the same version.<BR><BR>Brian
Brunner<BR><A href="http://us.f513.mail.yahoo.com/ym/Compose?To=brian.t.brunner
@(protected)&amp;YY=27062&amp;order=down&amp;sort=date&amp;pos=0&amp;view=a
&amp;head=b">brian.t.brunner@(protected)</A><BR>(610)796-5838<BR><BR>&gt;&gt
;&gt; <A href="http://us.f513.mail.yahoo.com/ym/Compose?To=mir_rulz16@(protected)
&amp;YY=27062&amp;order=down&amp;sort=date&amp;pos=0&amp;view=a&amp;head=b">mir
_rulz16@(protected)</A> 08/05/04 05:06PM &gt;&gt;&gt;<BR>Hi,<BR> <BR>I'm relative
new to linux and I've just started module programming <BR>following the
Alessandro Rubini and Jonathan Corbet "Linux Device Drivers" <BR>book for
kernel 2.4.&nbsp; I have got Redhat 9.0 installed on my
system.&nbsp; I <BR>try to use "insmod" to insert a module called hello.o,
however the <BR>system returns a message <BR> <BR>hello.o: kernel-module
version mismatch.<BR>hello.o was compiled for kernel version 2.4.20<BR>while
this kernel is 2.4.20-8custom<BR> <BR>In the book it is mentioned that it would
be better to recompile the <BR>kernel without the version support for modules.
&nbsp; I believe I did the <BR>right thing by simply changing the option of
"loadable module support -&gt; <BR>set version information on all module symbols
" from y to n.&nbsp; I ran "make <BR>xconfig" and followed the steps carefully
listed in the Red Hat <BR>documentation CD plus the steps listed on Alessandro
's website and as you can <BR>see from the message I booted the recompiled
custom kernel without any <BR>problems.<BR> <BR>I don't know if this
information is pertinent as well but I typed the <BR>following<BR> <BR>"gcc -
-version" and I got<BR> <BR>"gcc (GCC) 3.2.2.20030222 (Reh Hat Linux 3.!
2.2-5)"
followed by some <BR>text.&nbsp; I believe my compiler is ok.&nbsp; Could
someone please help me out?&nbsp; Is <BR>what I did the thing to do or was I
suppose to do something else in <BR>order to remove version support?<BR> <BR
>Mir<BR><BR><BR></DIV><p>
    <hr size=1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mail_us/taglines/100/*http://promotions.yahoo
.com/new_mail/static/efficiency.html">New and Improved Yahoo! Mail</a> - 100MB
free storage!
--
Shrike-list mailing list
Shrike-list@(protected)
https://www.redhat.com/mailman/listinfo/shrike-list