LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about kernel versions... (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-kernel-versions-924098/)

trist007 01-16-2012 03:22 PM

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.

MartinStrec 01-16-2012 04:02 PM

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.


All times are GMT -5. The time now is 10:32 AM.