LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How many diff methods of Installing, Compiling Kernel Sources are there? (https://www.linuxquestions.org/questions/red-hat-31/how-many-diff-methods-of-installing-compiling-kernel-sources-are-there-179491/)

DriveMeCrazy 05-08-2004 11:12 PM

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

motub 05-09-2004 04:41 AM

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.

DavidPhillips 05-09-2004 10:24 PM

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-????.

DriveMeCrazy 05-10-2004 11:53 AM

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

motub 05-10-2004 01:35 PM

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.

DriveMeCrazy 05-10-2004 01:40 PM

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.

:D

motub 05-10-2004 02:53 PM

.... 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).


All times are GMT -5. The time now is 07:57 AM.