Go back to kernel.org and select F this should be the source
the unzip into your /usr/src directory
The latest stable version of the Linux kernel is: 2.4.18 2002-02-25 19:44 UTC "F" V VI Changelog
Ok, I am still kind of new to Linux. And I have recently done some experimenting on my old "Mandrake 8.1" box.
I downloaded the full stock Kernel source (tar file) from "kernel.org" (kernel 2.4.18). This was my first attempt to install a kernel on a comercial distro (I don't count my previous Gentoo installs), so I might have missed some important steps.
Anywho, I can boot and use "X" fine and all. But when I tried installing my Nvidia drivers I get the following error:
#error Modules should never use kernel-headers system headers
#error but headers from an appropriate kernel-source
According to Nvidia the Answer to this error is:
"You need to install the source for the Linux kernel. In most situations you can fix this problem by installing the kernel-source package for your distribution."
Ok, so how do I install source manually from the kernel build I just did?
Thanks ahead of time to any advice anyone can give.
-Beatlejuice
Go back to kernel.org and select F this should be the source
the unzip into your /usr/src directory
The latest stable version of the Linux kernel is: 2.4.18 2002-02-25 19:44 UTC "F" V VI Changelog
Sorry about the late reply.
I tried unzipping to /usr/src, but it did not work.
Funny thing though, I know that your linux source is in /usr/src. But according to the "Read Me" file in the unzipped 2.4.18 kernel it recommends that you DO NOT uzipped the kernel to your /usr/src directory? Huh, anyways I don't get this myself, but I still get the same error no matter what.
I am not sure but perhaps its partly because I am using Mandrake on this test machine. And I know it is pretty much like Red Hat linux, in the way they use "symbolic links" to refer to there kernel and some other files in there "/" directory (using almost your whole hard drive for "/home" directory). I did however replace all the symbolic links I encountered when I replaced my kernel though.
Anyways, any help you have would be greatly appreciated.
Thanks,
Beatlejuice
only root has write permissions to /usr/srcI tried unzipping to /usr/src, but it did not work.
drwxr-xr-x 6 root root 4.0k Jul 19 01:13 src
The recommendation to not extract your new kernel source directly into /usr/src is actallly quite warranted. When you tar -xzvf kernel-x.y.z.tar.gz it creates a directory called "linux" in the cwd.But according to the "Read Me" file in the unzipped 2.4.18 kernel it recommends that you DO NOT uzipped the kernel to your /usr/src directory? Huh, anyways I don't get this myself, but I still get the same error no matter what.
The practice of many distributions is to have the current kernel directory in /usr/src called "linux". So imagine what you would happen when you extract your new kernel source in /usr/src which makes a new "linux" dir effectively overwriting your current kernels directory.
What some distro's do, as do I, is always name the kernel source dir corresponding to it's release values. Create a link to it called linux.
$ ln -s /usr/src/linux-2.4.19 /usr/src/linux
Even if the latter is the case, it is still best to extract your kernel to a temp directory, and only mv it to /usr/src after you have renamed the kernel directory.
If you want help on the actual kernel compiling process I'd be happy to help, but you'll have to post the exact commands you are using to compile it.This was my first attempt to install a kernel on a comercial distro (I don't count my previous Gentoo installs), so I might have missed some important steps.
I'll be releasing a OMP tutorial on kernel compiling the next time I see Aragorn on irc as well, so feel free to reference that when it is up.
Thanks for the post Aaron! I appreciate your help.
And yes I would be interested to know more about kernel compiling, thanks for the tip on your upcoming tutorial.
About my latest project, I did download and untar the kernel to a home directory. I didn't use a temp dir because it appears that in Mandrake my "/" directory is mounted to a smaller partition (which is full) and "/home" is the remainder of my HDD. This seems to be setup automatically with the installation program.
Therefore I used "symbolic links" just as you mentioned (since I couldn't even mv my untarred "linux" directory over to /usr/src do to lack of space). I also had to create a symbolic link for the "bzImage" in my "/boot" directory (as had previously been the case with the original kernel).
The commands I did were just the basic build steps:
-(I untarred)
-make mrproper
-make xconfig
-make dep
-make
-make $$ bzImage
Note: I did not make modules since I did not select any in my original kernel configuration.
Then the steps I previously mentioned. My kernel works fine, soundcard and all are great. But when I try to install those darn Nvidia modules with the "make install" command (after "make clean" first). I constantly get the same errors about kernel headers, and kernel source.
Anyways, any ideas you may have would be appreciated.
Thanks,
Beatlejuice
What are you doing to install the Nvidia drivers? Are you following the instructions on the nvidia site?
Do you have the kernel files and GLX files? You only need run make, not make install, when installing the NVIDIA_kernel and NVIDIA_GLX files.
I've never seen just a plain old make in the kernel compilation process, nor have I see make bzImage with the $$'s before. Any significance to those? What instructions are you going by that told you to do it that way?
Sorry about the kernel compile steps I mentioned. They were incorrect, I was responding from work and I thought I had them memorized, but I guess not. The actual steps I followed were:
-make mrproper
-make xconfig
-make dep
-make bzImage
I just did the "make bzImage" as listed in the kernel readme file. everything worked fine like I said.
As for the Nvidia drivers. Yes, I have the kernel and GLX (tarred files for both). The commands I used were from Nvidia, and have worked on all my privious linux distros.
(after untarring each directory, and "cd" to kernel dir first)
"make install" (just using "make" produces the same errors)
I believe that you are supposed to use the complete "make install" command with Nvidia drivers. I was told once on Nvidia's forum page , that since you are not doing a "make config" or anything like that, and because Nvidia drivers are designed directly for installation, and are closed source, that the "make install" was the full procedure to install the drivers using Nvidia's "source kit". But thats just what I heard.
Anyways, thanks again for any help you can give.
Beatlejuice
We have an OMP for such things, maybe you could see if you are missing any steps :P
http://www.getlinuxonline.com/omp/ha...ia_install.htm
Goodluck,
Babbing
Bookmarks