LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernal doesn't match sources, I think?? (https://www.linuxquestions.org/questions/linux-newbie-8/kernal-doesnt-match-sources-i-think-132759/)

baldy3105 01-08-2004 12:45 PM

Kernal doesn't match sources, I think??
 
Hi chaps,

I'm running SuSe 8.1 as a bog standard install straight off the CD. I have downloaded the nForce drivers and drivers for my GF 4400. These both seem to require the kernal sources to be present when you install them using a "make install" command.

Neither of these drivers work, I'm getting unresolved symbols when I try to load the modules using "lsmod".

The instructions say this is due to your kernal sources not matching your running kernal.

So I did a bit of reading and used the following commands -

linux:/home/everyone # uname -r
2.4.19-4GB
linux:/home/everyone # rpm -qa | grep kernal
linux:/home/everyone # rpm -qa | grep kernel
NVIDIA_kernel-1.0-5328
kernel-source-2.4.19.SuSE-49
linux:/home/everyone #

No to me this looks like my sources and my running kernal are different, yet it is a fresh install and the sources are from the same CD set. The only conclusion I can come to is that Suse have given me sources that don't match the kernal it installs, but I don't quite believe myself! Can someone confirm this for me?

I've looked on the Suse website for the matching sources but can't seem to locate them. If I use a kernal built from the new sources (I'm nothing if not willing to have a go!!) will this not trash all of the programs that suse installed for me? Don't I have to recompile just about everything?

Any help here would be appreciated

Cheers

Pete

thebell 01-08-2004 12:56 PM

What's in /usr/src? The source for the kernel you're running will probably be in /usr/src/linux-2.4.19-[something], if it's installed. Try installing that kernel-source-2.4.19.SuSE-49 RPM, and see if that helps. If that doesn't work, you could try getting a vanilla 2.4 kernel from kernel.org and installing that...

baldy3105 01-08-2004 01:22 PM

The directory under /usr/src says linux-2.4.19.SuSE, so that doesn't help much. I'm willing to have a go at building a new kernal but I want to know what the consequences will be before I do.

h/w 01-08-2004 01:59 PM

during first install, suse (or any distro) used a particular kernel.
then you went and said that you wanted a kernel source, so it went and got you some kernel source, which you will ideally see under /usr/src

did you build THAT kernel source? if not, how can you expect the running kernel and the kernel source you downloaded to match? i think it's a misnomer to say "install kernel source", as what they do is simply place the kernel src tree under /usr/src, and nothing more. the installation is upto you. it does nothing more than untar the kernel src in that dir.

so, you will have to build your kernel from the source sitting in /usr/src.

baldy3105 01-09-2004 02:52 PM

Hold on..... I buy a distribution and I need to install drivers cos the distro doesn't support my hardware. The drivers require kernal sources for my running kernal . I install the sources from the *same discs* that I used to install the distro and they are not the sources for the kernal that the distro installed? What sort of joke is that? Someone is definitely taking the wee-wee. I didn't want a new kernel, the driver didn't want a new kernal, just the sources for the kernel I've allready got.

I mean if its not enough for a noob like me to be ( quite gamely I might add) compiling drivers they go and stick a gotcha! like that in there. I'm all for learning new things but I don't need someone kicking me in the nuts while I'm doing it!

Can anyone answer my original question please? What are the effects on all of my programs which came with the distro if I go mucking about with the kernel, will they all still work?

Thanks

Pete

h/w 01-09-2004 03:14 PM

you cant "muck" around with the kernel that was installed, as its a binary. you can, however, muck around with the source.
it's akin to this:
"This driver will work with windows XP. however, you have win95 installed. pls upgrade".
so, although you have windows, and you even have the winxp cd in ur cdrom, you cant install the driver, because it needs to see what it's asking for.

for that, you have to install.

baldy3105 01-13-2004 09:40 AM

Sorry I thought this was a simple question, let me restate it -

The drivers I need to compile expect to have kernal sources, which must match my running kernel. I don't have sources that match and can't seem to get hold of them.

I use the sources I can get which are a slightly different version forcing me to compile and install a new kernel just so that I can get matching kernel and kernel sources.

I'm with that so far, my driver will now compile and install and hopefully work, BUT I now have a different kernel to the one I started with.

So heres the key question - Do all my existing programs which worked with the original kernal still work with my new kernel? Doesn't the act of replacing the kernel with a slightly later version cause my entire body of existing software to stop working?

Guru point to anyone who can answer this as its obviously more complicated than I first thought.

Cheers all

Pete

Chris H 01-13-2004 09:51 AM

I've a copy of Debian woody which I installed. When I went to install my nvidia drivers I got exactly the same error as Pete.

The kernel sources supplied did not match the running kernel. uname -r gave me 2-4-20 and I only had up to 2-4-19 (or 18?)available on the install disk.

Never had the problem with any other distro. I assume, and also in this case, that someone's made a balls-up when the distros been put on disk.

Twas bloody annoying at the time. If I was a noob to linux I probably would've dropped the penguin as a lost cause.

guygriffiths 01-13-2004 10:45 AM

Pete,
You are running a 2.4.19-4GB kernel i.e. version 2.4.19, with large memory support. Now your kernel sources are apparantly also version 2.4.19, but they are 2.4.19-SuSE-49 possibly because SuSE have made some changes to them, so although the source and runing version are very similar, they are not identical, which is what causes your problem (possibly).

HOWEVER, the answer to the question that you really want to know is this:
You can build a new kernel and eveything will be fine. You install it alongside the one old, in case a few things don't work, then you can always switch back to the old one. BUT YOU DON'T NEED TO RECOMPILE ANY OF YOUR PROGRAMS, THEY'LL ALL WORK. Sorry about the capitals, but someone had to shout it since you've been asking every post in this thread, and no-one answered you.

Also, if this is your first kernel compile, most likely nothing will work because you'll miss some vital bit out, but don't worry, just be sure to keep your old kernel in the bootloader, and you can always go back and recompile (and recompile, and recompile...)
Hope this helps
Guy

baldy3105 01-14-2004 10:34 AM

Thanks Guy! If thats the case I'll give it shot and see what happens.

Here we go again, happy as can be.........


All times are GMT -5. The time now is 08:33 AM.