Re: How to check if kernel sources are installed on a system?

From: Valdis . Kletnieks
Date: Thu May 25 2006 - 17:29:36 EST


On Thu, 25 May 2006 21:19:33 -0000, devmazumdar said:
> How does one check the existence of the kernel source RPM (or deb) on
> every single distribution?.
>
> We know that rpm -qa | grep kernel-source works on Redhat, Fedora,
> SuSE, Mandrake and CentOS - how about other RPM based distros?

There's no kernel-source RPM on recent Fedora. Also, there's another problem...

On my laptop at the moment:

% rpm -q kernel
kernel-2.6.16-1.2215_FC6
% uname -r
2.6.17-rc4-mm3

Did you want the vendor kernel source, or the running kernel source?

Might want to look at the symlink at /lib/modules/`uname -r`/source which
is probably as sane as it gets... (Though admittedly Fedora points it
into the wild blue yonder of /usr/src/kernels/`uname -r` which isn't
where the non-existent kernel-source RPM puts it. Getting the .src.rpm
and working from there leaves it in /usr/src/redhat/BUILD/yadda-yadda....)

Attachment: pgp00000.pgp
Description: PGP signature