Re: How to identify contents of /lib/modules/*

From: Kristofer T. Karas (ktk@enterprise.bidmc.harvard.edu)
Date: Thu Apr 17 2003 - 13:08:45 EST


On Wed, 2003-04-16 at 10:21, Alan Cox wrote:
> if its an rpm based distro
> rpm -qf /lib/modules/[version]/something
> will tell you which kernel owns the file.
>
> Its a horrible thing to need to do however

I have a worse problem. :-) I often run several instances of the
identically version-numbered kernel, all available from the LILO boot
menu, each instance having a different .config or perhaps compiled with
a different gcc. If each instance wants to share
/lib/modules/[sameversion]/... then I've got a problem. Ditto for
userspace programs compiled against /usr/include/linux and
/usr/include/asm, where I want the compiled program to correspond very
closely with the currently running kernel. So...

I "fixed" this problem by creating /lib/modules/BootsAs/,
/usr/include/BootsAs/, etc. Then, rc.sysinit looks in /proc/cmdline to
figure out what I typed at LILO, greps through /etc/lilo.conf to find
the physical /boot/[xyzzy].vmlinux that was booted, and it creates
symlinks so /lib/modules/[sameversion] -> /lib/modules/BootsAs/[xyzzy]
and so on. This is also a win when you have several LILO targets that
point to the same kernel.

Kris -- running heavily hacked Slackware.

-
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/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:22 EST