LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 05-08-2004, 11:12 PM   #1
DriveMeCrazy
Member
 
Registered: Mar 2004
Posts: 70

Rep: Reputation: 15
How many diff methods of Installing, Compiling Kernel Sources are there?


Now I am totally lost.
Why are there so many diff versions of installing the kernels?
RPMS, Source, Headers, blah blah blah.

What I did for my previous kernel was:
1) download kernel-source.x.x.x.rpm from rpmfind.net.
2) type "rpm -ivh kernel-source.x.x.x.rpm"
3) make a symbolic link

and everything works fine... I didn't even have to compile the kernel.

Recently i downloaded kernel-source-2.4.20-31.9.i386.rpm.
However, I am stuck becos i can see that the kernel is not installed at all (only the kernel source) after I did the above steps.

What shows up in rpm -qa | grep kernel

kernel-2.4.20-30.9
kernel-2.4.20-8
kernel-source-2.4.20-30.9
kernel-source-2.4.20-31.9
kernel-2.4.20-8


I dun want to blindly go through the process without knowing anything.
Can some kind souls enlightened me?

Thanks in advance
 
Old 05-09-2004, 04:41 AM   #2
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Are you trying to upgrade your kernel? Is there no RPM available for the kernel you want to upgrade to? It might be worth it to search the repositories you use and see if you can find one, as obviously you already realize that this is the easiest way for the user of an RPM distro to install a new kernel tuned for his/her distribution.

If you have outside hardware drivers that need to be compiled against the kernel source (ATI or nVidia drivers, linmodem drivers, whatever), then you don't need to even compile the kernel-source, but you do need the source for the currently running kernel, rather than the source of any up- or down-graded kernel that is not installed (yet). This is one reason that installing the kernel-source RPM only unpacks the source and makes the appropriate symlink-- about half the time, that's all you need the kernel-source to do for you (as the kernel itself is already installed via the kernel.rpm).

However, if in fact you want to compile a kernel upgrade from source, you may want to read some of these;

http://www.redhat.com/docs/manuals/...odularized.html --info from RedHat themselves; always the best place to start;

http://www.linuxquestions.org/quest...mp;pagenumber=1-- info from this wonderful site itself (definitely the next-best alternative starting point );

http://www.linuxplanet.com/linuxplanet/tutorials/202/1/;

http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO-2.html;

http://www.linuxanswers.net/?cmd=howto&key=kernel.

http://www.linuxlookup.com/html/guides/kernel.html


Hope this helps.
 
Old 05-09-2004, 10:24 PM   #3
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
It doesn't sound right when you say you didn't need to do anything. You must have already had the same kernel installed. So you could have downloaded and installed the source for the kernel you already had, which did not change the kernel at all. Now you are installing a different source, so you need to install that kernel. As stsated above you can probably just download and install kernel-2.4.20-31.9 if that's all you need to do. If you need a custom kernel you would build one. At this time you have no custom kernel so if your upgrading just install kernel-???? and kernel-source-????.

Last edited by DavidPhillips; 05-09-2004 at 10:25 PM.
 
Old 05-10-2004, 11:53 AM   #4
DriveMeCrazy
Member
 
Registered: Mar 2004
Posts: 70

Original Poster
Rep: Reputation: 15
Ha guys,

i finally get it done by downloading the kernel rpm and install it.
The kernel source is installed but not the kernel itself.
In the past, I also can't figure out why i only installed the kernel-source and the kernel is installed as well.

BTW, thanks for the link motub.
I will bookmark these links.

Thanks alot
 
Old 05-10-2004, 01:35 PM   #5
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
DavidPhillips is right; there is no way that you installed a kernel-source RPM for a different kernel than the one that was already installed, and the kernel it went with was installed as well.

That's really not the point of having a compiled kernel and the kernel-source available as separate RPMs from each other.

If you install a kernel RPM, it will install a new kernel. If you install a kernel-source RPM, the kernel source will be unpacked to /usr/src and that source folder will be linked to /usr/src/linux. That's all that happens when you install a kernel-source.rpm, because the intention is that you are either going to compile a custom kernel (if it's a new kernel and not the one you already have installed), or compile some outside drivers against the kernel source (if it's the same kernel you're currently running). The same is true of kernel-header RPMs; I've not used them, but they appear to be some kind of "kernel-source lite", which you can use to compile drivers that don't need the full kernel source, but only what in other respects would be called "development headers".

So I think that you're mistaken about your previous experience, but this is not a surprise, as in the early days of Linux use it's not always easy to keep track of what's happening when you don't know what's happening . Maybe you had the kernel-source for your current kernel installed and did a sytem-wide update which updated both the current kernel and its source. That could possibly happen, using tools like up2date.

Glad the links are helpful.
 
Old 05-10-2004, 01:40 PM   #6
DriveMeCrazy
Member
 
Registered: Mar 2004
Posts: 70

Original Poster
Rep: Reputation: 15
ha, i guess you are right motub.
BTW, i was not able to use redhat up2date tool efficiently cos i am on a demo a/c.
But I guess i tend to learn more by doing some of the things myself.

 
Old 05-10-2004, 02:53 PM   #7
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
.... well, I'm not going to say anything much about that on the RedHat dedicated forums, since I will get burned alive, but... the reason that you were not able to use the tool efficiently may not have related to the type of account. There seem to be a few problems with the up2date tool, which is why many RedHat users switched to Yum or apt.

At least you were able to use it a bit. I couldn't even get the doggone thing to open, which is just one of many reasons that I am no longer using RedHat (she said very mildly).
 
  


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
Ndiswrapper - Cant find kernel sources while installing (Kernel 2.6.11) krayhze Linux - Wireless Networking 6 05-23-2006 06:30 AM
compiling kernel sources joshknape Mandriva 17 09-16-2005 08:33 PM
installing kernel sources bhodi Slackware 1 04-12-2005 01:07 PM
Compiling kernel from vanilla sources - suse 9.2 lukas_svoboda SUSE / openSUSE 11 03-26-2005 07:18 AM
Installing Kernel Sources... Solean Slackware 4 04-26-2003 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 12:45 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