make installworld and single-user mode

When it comes to make installworld this should be done in single-user mode. In Absolute FreeBSD 2nd Ed. (M.W.Lucas 2008, p. 395f.) can be read
some lowlevel changes in the system require the install in the single-user mode.
I’d like to ask what these lowlevel changes might be and when they occur. Can one know about such changes before upgrading?

There are situations, when a system should be upgraded with the help of an NFS server providing sources and builds. Can installworld then be done in single-user mode too?

And what about remote upgrades? How to do that regarding single-user mode?
 
I'd be interested in this, too. From what I have heard so far, this is because in multi-user mode (or network mode), you would overwrite things already running and then would have to reboot again for the sake of proper function. So you save one reboot with it. make installworld in multi-user mode, if you really insist on it, is probably better done after make installkernel and right before the reboot.
 
One very obvious case is when you're running the system in a non-default securelevel(7), it's not possible to overwrite system binaries that have the schg flag turned on in such a case. I would say that when doing a minor upgrade to a newer minor version you can pretty safely do make installworld without using single user mode. Major version upgrades might be a different story though. Installing new binaries of a higher major version while you're still on the earlier kernel may prevent a clean shutdown after the installation and something might go wrong.

I have done single user mode updates/upgrades using the sources and objects (/usr/src and /usr/obj) on an NFS server. You just need to start the bare essential services on the client and mount the NFS shares and away you go. Something like (starting from the point when the single user mode starts):

Code:
/sbin/adjkerntz -i
/sbin/mount -a -t ufs

/usr/sbin/service syscons start
/usr/sbin/service netif start rl0
/usr/sbin/service nfsclient start

/sbin/mount /usr/src
/sbin/mount /usr/obj

Those were extracted from a script I use, hence the full paths to everything. The last two commands need /etc/fstab entries for the NFS shares to exist.
 
Ever since I started using FreeBSD back on version 4.1 I have always done minor version upgrades in full multi-user mode whilst the server is still working with a quick two-minute reboot and never had a single issue with this. The only time I do the official single-user mode upgrade is when I do a major version upgrade just to be on the safe side. Though now there are much smaller differences between major versions than there used to be in the older days even this might not be completely necessary.
 
… advised to reboot in single user (or at least drop to it) before installing world.

Can you provide a bit more information on this subject? What's the reasoning behind this?

In addition to what's above:

From System updates/upgrades: single user mode, and chroot approaches … org.freebsd.freebsd-questions - MarkMail (2021-03-01), quoting Garance A Drosehn:

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:


I don't doubt that things have been trouble-free for the vast majority of people who have intentionally, or unintentionally, skipped the single user mode aspect (for major upgrades in particular) ?



For what it's worth, I err on the side of caution.

The few steps in single user mode don't make things unreasonably complex. Since I learnt to habitually include these steps for every (minor) update from source: on the very rare occasion when a major upgrade will be required, I'll be in the swing of things.

HTH
 
Back
Top