Re: git: 0a2bc1aae36b - stable/12 - release: move installworld before installkernel

From: Jessica Clarke <jrtc27_at_freebsd.org>
Date: Fri, 03 Dec 2021 20:28:58 UTC
On 3 Dec 2021, at 20:20, Eugene Grosbein <eugen@grosbein.net> wrote:
> 
> 03.12.2021 22:20, Ed Maste wrote:
> 
>> The branch stable/12 has been updated by emaste:
>> 
>> URL: https://cgit.FreeBSD.org/src/commit/?id=0a2bc1aae36b44b2c9e16684bc6270b8a82943e2
>> 
>> commit 0a2bc1aae36b44b2c9e16684bc6270b8a82943e2
>> Author:     Ed Maste <emaste@FreeBSD.org>
>> AuthorDate: 2021-04-05 17:16:01 +0000
>> Commit:     Ed Maste <emaste@FreeBSD.org>
>> CommitDate: 2021-12-03 15:19:09 +0000
>> 
>>    release: move installworld before installkernel
>> 
>>    To support -DNO_ROOT work.  The top-level installworld target creates a
>>    new METALOG starting with `#mtree 2.0` so it needs to be first, to avoid
>>    overwriting installkernel METALOG entries.
>> 
>>    Reviewed by:    gjb
>>    MFC after:      1 month
>>    Sponsored by:   The FreeBSD Foundation
>>    Differential Revision:  https://reviews.freebsd.org/D29582
> 
> The need to run installworld before installkernel makes remote major upgrade less reliable:
> in case of unexpected reboot in process a system ends up with new binaries that may require new system calls
> and old kernel. This is bad.
> 
> Is it possible to enhance install* targets so they do not overwrite what needs to be kept intact
> to restore ability to install new kernel first?

This is only for generating release images, hence the release: prefix
and the fact it’s in release/. It has no bearing on the sequence used
to update a running system.

Jess