Click to See Complete Forum and Search --> : how to get the kernel-source installed?


luqman
03-04-2005, 11:55 AM
1) Installed Redhat Linux 9
2) uname-r
2.4.20-8

rpm -qa | grep kernel
...
kernel-2.4.20-8
kernel-source-2.4.20-8
...
3)Every thing is ok till now.

4)compiled kernel-2.4.25
5)Installed it.
6)New kernel boots.
7)uname -r
2.4.25

rpm -qa | grep kernel
...
kernel-2.4.20-8
kernel-source-2.4.20-8
...
[not even a single new entry]
8)I was told that installing from source and installing from packages are different things. If i will install it from package then rpm -qa would show some new entries as well.


Ques.1: couldn't find any rpm for kernel-2.4.25
Ques.2: why the kernel compilation and installation doesn't also install the kernel-source? And to get this kernel-source package installed what i have to do?


Kindest
Muhammad Muzzamil Luqman
<added by je_fro>testing 123

AngryPuppy
03-04-2005, 12:12 PM
Is there a particular reason you want 2.4.25?

The kernels ending in odd numbers are not considered stable.


Terry

luqman
03-04-2005, 12:16 PM
Yeah you are right that but what my unerstanding is that
2.4 .25

4 is the part of the version that tells about stability or under development of this particular version.

Anyways have you got any information about my question????

cybertron
03-04-2005, 12:18 PM
Originally posted by AngryPuppy
Is there a particular reason you want 2.4.25?

The kernels ending in odd numbers are not considered stable.


Terry
Not quite. The kernels with 2.x.y where x is odd are considered unstable.

luqman, when you say you compiled 2.4.25, how did you do that? If you downloaded the source from kernel.org then that is the kernel source you're looking for. You may need to symlink /lib/modules/2.4.25/build to the location of the 2.4.25 sources, but otherwise it should work.

luqman
03-04-2005, 12:21 PM
thankx cybertron.

by "source" i mean the kernel-source in step 2 of my query.

pilotgi
03-04-2005, 12:22 PM
The rpm command isn't going to list the new kernel or sources because you compiled it yourself. If RedHat is the same as SUSE, you'll have the new kernel sources in /usr/src/linux.

If the uname command says you're using the new kernel then it's installed, just not in rpm form.

HTH

luqman
03-04-2005, 12:24 PM
yeah you are right but the problem is that i require the kernel-souce package for getting some thing very important installed.

Bye the way i heve done all this to get the kernel-source package instaled.

AngryPuppy
03-04-2005, 12:25 PM
Originally posted by cybertron
Not quite. The kernels with 2.x.y where x is odd are considered unstable.

luqman, when you say you compiled 2.4.25, how did you do that? If you downloaded the source from kernel.org then that is the kernel source you're looking for. You may need to symlink /lib/modules/2.4.25/build to the location of the 2.4.25 sources, but otherwise it should work.

Duh... yes... I even knew that.


I'm having one of those days.


:D

Terry

pilotgi
03-04-2005, 12:28 PM
Originally posted by luqman
yeah you are right but the problem is that i require the kernel-souce package for getting some thing very important installed.

Bye the way i heve done all this to get the kernel-source package instaled.
I'm not sure what you mean here. If you have the kernel-source installed then you can compile other software. It doesn't need to be in rpm form.

luqman
03-04-2005, 12:31 PM
ohhhh sorry, my mistake.

Actually the problem is that when i install that important thingy, it says that package kernel-source is required which is not installed.

XiaoKJ
03-04-2005, 12:41 PM
rpm doesn't do dependancies. so even if its required it will *not* go out and help you.

so you will have to install the sources yourself. and in rpm form or else the different kernel sources from kernel.org and redhat will cause more trouble.

but if you compile your own kernel, you already have both sources and kernel installed. RPM distros omit the kernel sources to save cd space. you don't really need the sources to have stuff work.

luqman
03-04-2005, 12:44 PM
XiaoKJ if i have correctly undestood, you mean to say that i sould not worry about the results of the

rpm -qa | grep kernel

and the sources directory [/usr/src/linux-2.4.25] will work for all the softwares that require the kernel source???

cybertron
03-04-2005, 12:51 PM
Simple answer: yes.

Complex answer: RPM does check that dependencies for what you're installing are present, but in this case since your kernel source didn't come from an RPM it won't be able to find it. You could try installing with --nodeps and if it works then the program found your kernel sources just fine anyway.

je_fro
03-12-2005, 01:43 PM
As I recall from my red hat days, the kernel source IS on the installation CD's. Just choose Development, and Kernel Source will be there too. No need for kernel.org, and that would only mess things up anyway.
<edit>
heh...nevermind
</edit>

Choozo
03-12-2005, 02:19 PM
Originally posted by luqman
and the sources directory [/usr/src/linux-2.4.25] will work for all the softwares that require the kernel source??? You should make a symlink in /usr/src pointing to the kernel tree:
ln -s /usr/src/linux-2.4.25 /usr/src/linuxas this is the directory structure other programs depending on kernel-source looks for.

You probably already have a /usr/src/linux symlink pointing to the previous kernel version which you need to delete first.

bwkaz
03-12-2005, 09:55 PM
Originally posted by Choozo
this is the directory structure other programs depending on kernel-source looks for. But they're wrong to do that. Having that symlink should not be required for anything (if it is, the program that requires it is definitely broken).

This is because no userspace programs should ever need the kernel headers to compile. Kernel modules, yes, but programs, no. (Programs should be using sanitized headers, grabbed from somewhere like Fedora or PLD if you build your own distro, or from your distro otherwise. The sanitized headers are part of glibc, not the kernel, and should NEVER change -- unless glibc changes.)

Kernel modules use /lib/modules/<kernel version>/build (which the kernel's modules_install Makefile target is guaranteed to create correctly), not /usr/src/linux.

je_fro
03-13-2005, 01:49 AM
Originally posted by bwkaz
But they're wrong to do that. Having that symlink should not be required for anything (if it is, the program that requires it is definitely broken).

This is because no userspace programs should ever need the kernel headers to compile. Kernel modules, yes, but programs, no. (Programs should be using sanitized headers, grabbed from somewhere like Fedora or PLD if you build your own distro, or from your distro otherwise. The sanitized headers are part of glibc, not the kernel, and should NEVER change -- unless glibc changes.)

Kernel modules use /lib/modules/<kernel version>/build (which the kernel's modules_install Makefile target is guaranteed to create correctly), not /usr/src/linux.

There he goes again... :D
You seem to have changed your standard schpeel a bit...

soulestream
03-13-2005, 02:03 AM
i never knew that how you spelled schpeel


soule

XiaoKJ
03-13-2005, 04:08 AM
Originally posted by luqman
XiaoKJ if i have correctly undestood, you mean to say that i sould not worry about the results of the

rpm -qa | grep kernel

and the sources directory [/usr/src/linux-2.4.25] will work for all the softwares that require the kernel source???

Of course. the rpm command asks the servers what kernel they have, not your own computer.

the sources directory (in this case /usr/src/linux-2.4.25) will work. but you may have to link it to /lib/modules/'uname -r'/build for some stuff to compile. for older stuff, you may have to link it to /usr/src/linux.

Finally, I have to restate that most rpm-based distros leave out kernel-sources to make you angry :D sorry for that... I didn't have clue

cybertron
03-13-2005, 02:20 PM
Originally posted by XiaoKJ
Of course. the rpm command asks the servers what kernel they have, not your own computer.

Actually, no. "rpm -qa" returns all of the RPM's installed on the local computer and then you can grep out of the name of the one you want. RPM itself doesn't connect to any servers, thus the oft-lamented fact that it can't automatically handle dependencies.:(

Choozo
03-13-2005, 05:35 PM
'urpmi' does, though :)

bwkaz
03-13-2005, 07:11 PM
If you use Mandrake, anyway... :)

(At least, I don't *think* Red Hat or Fedora has urpmi. I could be wrong, though.)

cybertron
03-13-2005, 11:55 PM
Yeah, urpmi is Mandrake-only. I think YUM does the same thing for Fedora/RH, which, unless I'm getting my threads confused (again;)), came up earlier in the thread and is what led to this discussion. So it's not even totally off-topic:)

luqman
03-14-2005, 05:01 AM
thankx alot to all of you for the presious tips :)

XiaoKJ
03-14-2005, 06:41 AM
Originally posted by cybertron
Actually, no. "rpm -qa" returns all of the RPM's installed on the local computer and then you can grep out of the name of the one you want. RPM itself doesn't connect to any servers, thus the oft-lamented fact that it can't automatically handle dependencies.:(

Opps --- sorry again. That is what you get from someone without clue of RPM-based distros... :D