LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 08-29-2005, 04:10 PM   #1
Tux136
LQ Newbie
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 7

Rep: Reputation: 0
Q: install kernel source code


Hello all,

This is my first post to Linux Questions so I hope this is going in the correct forum...

I just installed FC4 on my Dell 5150 laptop. It seems to work fine, expect for the standard problem of the nvidia graphics card not wanting to play ball with the kernel.

To fix the prob, I downloaded the nvidia-installer program. This requires a copy of the kernel source files in order to build the kernel-interface which (as I understand it) interacts with the kernel and allows me full resolution graphics.

So, the simple problem is: How do I install the kernel source files? I have the four FC4 discs and feel sure they're on one of them, but I simply don't know how to deal with RPMS in any clever fashion... I'm assuming one can extract the source files from the RPM, I just don't know how. Any help please?

Gracias,
Richard
 
Old 08-29-2005, 04:25 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
First run (from terminal):
uname -a
You get something like
Quote:
Linux mara 2.6.13 #1 Mon Aug 29 12:18:43 EST 2004 i686 GNU/Linux
The bolded number is kernel version. Now look into your cds and you should have a package kernel-version.rpm. Install it. That's all you need to do.

Last edited by Mara; 08-29-2005 at 04:27 PM.
 
Old 08-29-2005, 04:33 PM   #3
Tux136
LQ Newbie
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks a lot for the response.

I install the kernel-version.rpm with a command like:

Code:
rpm -Ivh kernel-version.rpm
correct? I'll read the man page...

That'll place the source files on disc. Why don't they get put on as standard?


Thanks again.
 
Old 08-29-2005, 04:38 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
In fact you need to replace 'version' with the corect version from uname, but I understand you know it.

The file is not installed because it's very big and not many people need it in fact. I can agree, however, that if you're installing on a 20GB disk or so it may be installed by default
 
Old 08-29-2005, 05:33 PM   #5
Tux136
LQ Newbie
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 7

Original Poster
Rep: Reputation: 0
Yes I used the kernel-`uname -r` rpm... the problem now is that it says the package is already installed (this must be true of course since I'm actually using that kernel!).


The situation is:

The directory /lib/modules/`uname -r`/build/

is a broken link to someother directory, while the directory

/lib/modules/`uname -r`/source/

is a link to the build/ directory (i.e. also a broken link).

Therefore the nvidia installer can't access the source code when it looks in these locations since it doesn't exist!

Can you please tell me a way to get the source files of the kernel then, and not just install the kernel "package", which IS already installed.


Thanks a lot,

Tux136
 
Old 08-29-2005, 08:02 PM   #6
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
To install nvidia drivers on FC4, you need to install the kernel devel package and disable selinux. e.g.
Code:
#yum install kernel-devel
#setenforce 0
#./NVIDIA-Linux-x86-1.0-7676-pkg1.run
 
Old 08-30-2005, 08:31 AM   #7
Tux136
LQ Newbie
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 7

Original Poster
Rep: Reputation: 0
Is the kernel-devel the same as the kernel-source rpm then? I should've thought not...


I've downloaded the following file:

kernel-2.6.11-1.1369_FC4.src.rpm

but when I do a

Code:
rpm -Vp kernel-2.6.11-1.1369_FC4.src.rpm
I end up with this result:

Code:
error: kernel-2.6.11-1.1369_FC4.src.rpm: V3 DSA signature: BAD, key ID 4f2a6fd2
don't know what that means. Can someone please explain?


Tux136
 
Old 08-30-2005, 10:32 AM   #8
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Did you bother reading my post. If you had you would have solved your problem already.
 
Old 08-30-2005, 10:38 AM   #9
Tux136
LQ Newbie
 
Registered: Aug 2005
Distribution: Fedora Core 4
Posts: 7

Original Poster
Rep: Reputation: 0
Yes I read it. Thank you, you have been very helpful.

Concerning last post: Don't get your knickers in a twist. I was just experimenting and wanted to know what that error was. Anyway, why the heck call a file "kernel-2.6.11-1.1369_FC4.src.rpm" if you're going to put the source files for the kernel in one called kernel-devel!? I don't understand the thinking behind that.


cheers again.
 
Old 08-30-2005, 10:59 AM   #10
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
That file is a source rpm that contains the kernel source code for those that want to rebuild it into a binary rpm. Its not the file that you require to build stuff that requires the kernel source package.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I install the Linux kernel source code?? thearchitect Linux - Newbie 3 08-13-2005 01:07 AM
linux kernel source code legolas_t Programming 1 09-17-2004 07:13 AM
where to D/L kernel source code Almazick Linux - Software 6 09-03-2004 04:41 PM
mandrake10 install kernel source code /radeon 9800xtpro drivers UberNo0ber Mandriva 0 06-07-2004 06:18 PM
kernel source code nabil_boussetta Linux - Software 7 02-13-2004 07:57 AM


All times are GMT -5. The time now is 11:13 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration