System updates/upgrades: single user mode, and chroot approaches

Graham Perrin grahamperrin at
Tue Mar 2 07:43:17 UTC 2021

On 28/02/2021 23:52, Garance A Drosehn wrote:

Re: Panic after updating from source

> On 28 Feb 2021, at 13:04, Michael Sierchio wrote:
>> … if you don't installworld before
>> booting, you can have a mismatch between userland and kernel interfaces.
>> make buildworld && make kernel && make installworld && reboot
>> that always works for me when following a -STABLE branch.
> It may happen to work for you many times in a row, until the day
> it does not work and then you're screwed.  The official instructions
> state that you should always reboot into single-user mode before
> doing 'make installworld'.
> The instructions are what they are based on a lot of experience.
> We have frequently seen people who are furious when their system
> breaks after they've upgraded from source, and frequently the reason
> their system broke is that they "got away" with cutting corners for
> 20 times in a row.  And then they hit the first time that they were
> not able get away with cutting corners.  And they always blame us
> developers when in fact they're not following instructions.
> To quote from /usr/src/UPDATING:
>     ... Then, carefully follow the full procedure documented below
>     under the heading "To rebuild everything and install it on the
>     current system."
>     Specifically, a reboot is -> required <- after installing the
>     new kernel before installing world.  While an installworld
>     normally works -> by accident <-  from multiuser after rebooting
>     the proper kernel, there are many cases where this will fail
>     across this upgrade and installworld from single user is
>     required.
Thanks to Garance for these insights.

I do routinely read the upper sections of /usr/src/UPDATING however 
until now, I never realised the existence of the COMMON ITEMS section at 
the foot of the page, below the 20131010 line. Not realised because I 
have not used FreeBSD for so long. I stopped paging down, near a point 
in time before which I never updated.

/usr/src/UPDATING might benefit from a hint, near the head of the page, 
to read the COMMON ITEMS section at the foot.

It's remarkable that 
makes no mention of single user mode.


Upgrade FreeBSD with ZFS Boot Environments | 𝚟𝚎𝚛𝚖𝚊𝚍𝚎𝚗

– there's a chroot approach to streamlining, where freebsd-update(8) can 
be used. Please, can you think of any special precautions?

(FreeBSD pure in the midst of a discussion about FreeBSD-based 
helloSystem) if I'm not mistaken, there's an edge case risk of shooting 
oneself in the foot if the user does follow the on-screen instruction:

     Run `/usr/sbin/freebsd-udpate fetch` first.

– at a point during the streamlining where fetch and install need not 
(probably must not) be performed.


More information about the freebsd-questions mailing list