On Thu, Jun 07, 2007 at 07:50:24PM +0200, Otto Moerbeek wrote:
> I have thinking a bit more about the problem, and it is very likely the
> following scenario happened:
> 
> 1. Kernel upgrade by source.
> 
> 2. Reboot
> 
> 3. Kernel reads old disklabel format and converts it in-memory to the
> new v1 format. 
> 
> 4. Run a newfs using the old executable that does not know about the
> new disklabel format. newfs writes the block and fragment size info
> the old way, on a spot that is used in v1 labels to store the high 16
> bits of the offset and size of a partition. The label is written with
> version = 1, since the in-memory copy is v1. 
> 
> 5. Reboot, the kernel now sees a v1 disklabel with very high offset
> and/or size, the new consistency code (which is now disabled) kicks in
> and marks the partition as unused. 
> 
> So the lesson here is: keep userland and kernel in sync, or use a
> snapshot to upgrade. 

I believe that's exactly what happened the first time.  The catch is
that kernel and userland were being built from the same cvs update, and
I thought I was keeping them in sync.  In this case it would probably
have been better to skip the reboot between building the kernel and the
userland.

I'll take newfs out of my build script (back to "rm -rf /usr/obj/*") and
try to remember to use newfs before rebooting with a new kernel if I
want to avoid the wait.

Thanks again!

Emilio

Reply via email to