Subject: re: which kernel booted?
To: Darren Reed <>
From: matthew green <>
List: tech-kern
Date: 01/02/2002 14:10:29
   In some of the ports, there exists machdep.booted_kernel to tell you which
   kernel was booted.  The problem is that this isn't always set or can just
   be plain wrong as this can be changed by the loader.  Given this, I'd like
   to pass the kernel image name being loaded to the kernel (sort of like how
   programs get argv[0]) so that machdep.booted_kernel is always set and always
   correct.  Can anyone see any problems with doing this, aside making the list
   of boot params for the kernel 1 longer ?  Hmmm, should it be called
   kern.booted_kernel (since it wouldn't be hardware dependant) instead ?

sometimes the kernel image isn't available to the NetBSD userland
at all.  eg, a shark netbooted kernel doens't have to exist in
the machine's / at all.  i might have loaded my kernel over the
ethernet and then used a local root filesystem...  so while you can
add to the times when this _is_ available, you can never make it
always possible.