Subject: Re: updating, build and install order
To: NetBSD current list <current-users@netbsd.org>
From: William Allen Simpson <wsimpson@greendragon.com>
List: current-users
Date: 06/19/2003 08:38:38
Johnny Billquist wrote:
> 
> You have some other problem than your new kernel (obviously).
> 
> Building and installing a new kernel before building userland is highly
> recommended. 

Why?  I've asked for a reason.  This appears to be a myth.  There's 
certainly good reasons *NOT* to do so.

>              If you build to some other destination than root, you can
> build it all at once, but never install the new userland in the runnable
> location unless you are running the new kernel. That's the big no-no.
> 
Everyone agrees.


> New kernels should always be able to run old executables, 

We've learned from Bellovin that isn't true today (except vax).

> unless you
> explicitly configure them not to, or we are talking about some odd
> exceptions with programs that actually play with kernel datastructures.
> 
Apparently, the odd exception is increasingly common.


> You obviously managed to boot the new kernel, log in, and start working
> there. Then it broke somewhere along the way of building the new userland.
> You should start by checking exactly what happened before jumping to any
> conclusions...
> 
I've only found one clue: the old kernel (June 11) was 1.6T, the new 
kernel (June 16) was 1.6U.  I hadn't noticed the change before.

Postmortem on the machine shows everything in the logs looks normal.  
The build.sh ran to completion, so it wasn't a hardware problem.
Rebooting the old kernel solved the problem.

I conclude that the documentation should be changed to: 
 (1) build tools
 (2) build kernel
 (3) build userland
 (4) install kernel
 (5) reboot
 (6) install userland
 (7) reboot
 (8) etcupdate
 (9) reboot

And it would be nice to figure out some clever way to install both 
kernel and userland at the same time, eliminating the window where a 
new kernel might be incompatible with old userland.

And it would be REALLY handy to document how to use etcupdate to prepare 
a copy of the etc changes, and install them during build.sh install=/
-- 
William Allen Simpson
    Key fingerprint =  17 40 5E 67 15 6F 31 26  DD 0D B9 9B 6A 15 2C 32