LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-16-2012, 03:22 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
A question about kernel versions...


So say I'm running kernel 2.6.18-274.1 but my repository only has the new 2.6.18-293.1 (hypothetical). And I say that I want to do write some kernel modules and compile it against my running 2.6.18-274.1 kernel.

So I do a yum install kernel-headers kernel-devel.

So then when I compile the module it uses the kernel source from 2.6.18-293.1 instead of my running 2.6.18-274.1 because that's all the my repo keeps. So when I try to "insmod prog.ko" I get symbol table version mismatch because my running kernel (uname -r) does not match the magicversion from modinfo prog.ko because I compiled it against a different kernel source.

So I need to download the kernel headers and libs source for my running kernel 2.6.18-274.1. So I go to kernel.org. But I can only download 2.6.18 and not one of the subsets. Where do I go from here?
How can I get the source to that subset 2.6.18-274.1? Do I just download the patches and patch it?

If I recompiled the kernel with moduleversioning set to off, would I be able to insmod a module that doesn't match my running kernel? I understand the implications of crashing a server by loading a module not meant for the kernel but I would like to understand.
 
Old 01-16-2012, 04:02 PM   #2
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 14
Probably you can download your version by yumdownloader.

See http://fedoraproject.org/wiki/Building_a_custom_kernel

or use GIT repository of kernel.org directly.

yum install kernel-devel kernel-headers
download the last version from repository.

Probably you can try downgrade (yum downgrade kernel-headers kernel-devel) if the version after downgrade is the same as you are running.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about old kernel versions bourne Linux - Laptop and Netbook 1 09-05-2007 12:49 AM
gcc versions compatibility with kernel versions.. mahesh_manthapuri SUSE / openSUSE 1 03-22-2006 12:28 AM
Kernel Versions (very dumb but obvious question) timrs Linux - General 2 02-20-2006 01:22 AM
2 versions ..question JT13 Linux - General 2 06-04-2005 04:38 PM
How to keep modules/drivers across kernel recompiles and kernel versions? Pisces107 Linux - General 5 01-21-2004 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration