Subject: Re: kvm
To: None <>
From: Chris G. Demetriou <>
List: tech-kern
Date: 08/20/1997 16:10:07
> How about if sysctl retrieves the booted kernel name, and on those
> architectures where there is no kernel name sysctl returns something
> "special" and rc just knows to use /netbsd by default?

Oh, that's perfectly fine by me.  In particular, I was using something

KERNELNAME=`sysctl -n machdep.booted_kernel`
kvm_mkdb ${KERNELNAME:=/netbsd}

(since the value is directly derived from the firmware's "booted
kernel" environment variable, which is used by the boot block to pick
the file to load.  If the empty string, the boot block uses /netbsd.)

Obviously, this doesn't necessarily work in the case where your kernel
is not on your root partition (e.g. tftpbooting), or when you're
pulling your kernel from a different partition than your root
partition.  However, in the common case (booting from a single
partition, or netbooting where your current kernel _is_ in your root
partition), it works just fine.