lkml.org 
[lkml]   [2006]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: How to check if kernel sources are installed on a system?
    Arjan,

    On Fri, 26 May 2006, Arjan van de Ven wrote:

    > On Thu, 2006-05-25 at 18:29 -0400, Lee Revell wrote:
    > > On Thu, 2006-05-25 at 21:19 +0000, devmazumdar wrote:
    > > > 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? How
    > > > about debian based distros?. There doesn't seem to be a a single
    > > > conherent naming scheme.
    > >
    > > I'd really like to see a distro-agnostic way to retrieve the kernel
    > > configuration. /proc/config.gz has existed for soem time but many
    > > distros inexplicably don't enable it.
    >
    > /boot/config-`uname -r`
    >

    Redhat and SuSE put /boot/config- files of the same name for different
    architectures (i386, i586) in the same file. If multiple architecture
    kernels of the same verion are installed, there is no guarantee that the
    /boot/config-`uname -r` is not for, say, i686 instead of i386. It takes

    rpm -q --qf "%{ARCH}" --whatprovides /boot/config-`uname -r`

    complared with

    uname -m

    to see if the mismatch occurs.

    Debian (Woody), OTOH strips extra names of their kernels, so 3 or 4
    different releases of the same upstream kernel version all install with
    the same name and report `uname -r` the same. If multiple of these
    kernels and a vanilla kernel are installed, their config files will be
    difficult to distinguish. dpkg can be used (similar to above for rpm)
    to test the condition.

    /boot/config-`uname -r`

    works reliability only on Mandrake.

    --brian

    --
    Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
    bidulock@openss7.org ¦ world; the unreasonable one persists in ¦
    http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
    ¦ Therefore all progress depends on the ¦
    ¦ unreasonable man. -- George Bernard Shaw ¦
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-05-26 17:37    [W:4.718 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site