Subject: Re: bin/7656: run kvm_mkdb at boot to fix dmesg error
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Simon Burge <simonb@NetBSD.ORG>
List: netbsd-bugs
Date: 05/29/1999 13:13:29
Greg A. Woods wrote:

> [ On Friday, May 28, 1999 at 14:37:06 (+1000), Simon Burge wrote: ]
> > Subject: Re: bin/7656: run kvm_mkdb at boot to fix dmesg error 
> >
> > Given that it's a "machdep", should this "restriction" on what
> > the contents of 'booted_kernel' are?  If so, then I can change
> > 'booted_kernel' to something like 'kernel_location' and make
> > 'booted_kernel' the basename of that, but then that may not make sense
> > for diskless boots...
> 
> It the base filename of the 'booted_kernel' doesn't make sense from
> diskless client's perspective then that's the fault of the the person
> who configured the file server's image of the root filesystem.  It
> should be trivial to ensure that the kernel on the TFTP or MOP server
> and the kernel in the client's root directory are identical.

It _is_ trivial to ensure that the kernel on the TFTP or MOP server
and the kernel in the client's root directory are identical, but is it
a requirement to have the file name the same in each case?  I prefer
calling the kernel in the diskless client area "/netbsd", but calling
the kernel by hostname in the TFTP/MOP server directory.  I guess I
could make directories based on the hostname, and put kernels called
"netbsd" in those, but (a) I don't see why this should be dictated by
the OS and (b) some machines have problems with the length of the TFTP
bootfile name.

Maybe something along the lines of the following is the best of both
worlds:

	kernname=`sysctl booted_kernel`
	if [ ! -e "$kernname" ]; then
		kernname="/netbsd"
	fi
	kvm_mkdb $kernname

Simon.