Re: Linux kernel file name

Hans Lermen (lermen@elserv.ffm.fgan.de)
Tue, 10 Dec 1996 09:47:21 +0100 (MET)


On Tue, 10 Dec 1996, Ulrich Windl wrote:
>
> On 9 Dec 96 at 18:07, stenn@whimsy.udel.edu wrote:
>
> > Under FreeBSD, for example, getbootfile() calls sysctl() in order to get
> > the name of the booted kernel.
> >

You _can_ get that information under Linux:

cat /proc/cmdline

The param 'BOOT_IMAGE=' contains the info you need.
When loaded with LILO its the name of the 'label' in /etc/lilo.conf,
when loaded with LOADLIN its the base name of the image file.

>
> Well, I'll CC: your message to the kernel hackers. Maybe someone has
> a good idea...
>
> Ulrich

Hans
<lermen@fgan.de>