FreeBSD update from sources : single user mode useless to installword?

Ian Smith smithi at
Tue Jun 27 13:01:15 UTC 2017

In freebsd-questions Digest, Vol 682, Issue 2, Message: 19
On Tue, 27 Jun 2017 10:07:47 +0000 Alexandre Labarre <alexandre_ml at> wrote:
 > Hi,
 > I am using 11/Stable on a server built a few month ago, and I checked 
 > the handbook to verify steps 
 > I noticed that 
 > there is no mention about booting into single user mode to execute ? 
 > # make installworld ?.
 > Is it not necessary anymore and all steps can be safely done from 
 > multi user mode, or this is a mistake and steps has not changed?

This is surprising.  That chapter has always been fairly closely aligned 
with the procedures in /usr/src/UPDATING - which I've always used - and 
/usr/src/Makefile, but now differs significantly in several respects.

 > In /usr/src/Makefile steps are:
 > # For individuals wanting to upgrade their sources (even if only a
 > # delta of a few days):
 > #
 > #  1.  `cd /usr/src'       (or to the directory containing your source tree).
 > #  2.  `make buildworld'
 > #  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE'     (default is GENERIC).
 > #  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
 > #       [steps 3. & 4. can be combined by using the "kernel" target]
 > #  5.  `reboot'        (in single user mode: boot -s from the loader prompt).
 > #  6.  `mergemaster -p'
 > #  7.  `make installworld'
 > #  8.  `mergemaster'            (you may wish to use -i, along with -U or -F).
 > #  9.  `make delete-old'
 > # 10.  `reboot'
 > # 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)

Checking /usr/src/UPDATING in head, revision 318757 [1] states:

"Add note to UPDATING for ino64 to follow the standard upgrade process

 The existing upgrade process documented in UPDATING is both necessary
 and sufficient for upgrading across the ino64 change.  However, the
 shortcut of installing both kernel + world before a single reboot has
 been possible for quite some time, and several developers and users
 were surprised by fallout from ino64.  Add an explicit entry pointing
 out that the full process must be followed."


Further, the full process in UPDATING states (as ever) that:

	To rebuild everything and install it on the current system.
	# Note: sometimes if you are running current you gotta do more than
	# is listed here if you are upgrading from a really old current.

	<make sure you have good level 0 dumps>
	make buildworld
	<reboot in single user>				[3]
	mergemaster -Fp					[5]
	make installworld
	mergemaster -Fi					[4]
	make delete-old					[6]

Note the mergemaster steps at [5] and [4] - the latter of which is said 
to be "non-optional" and the former is advised and "never hurts" - are 
not mentioned, at least in the right sequence, in the handbook page.

Further, while the handbook page mentions /usr/src/UPDATING, it doesn't 
refer to its advised update procedure, and even omits the sequence of 
steps advised in booting single-user, namely:

	[3] From the bootblocks, boot -s, and then do
		fsck -p
		mount -u /
		mount -a
		cd src
		adjkerntz -i		# if CMOS is wall time
	Also, when doing a major release upgrade, it is required that
	you boot into single user mode to do the installworld.

 > Thank you for your clarification.
 > Alexandre

I'll be sticking with /usr/src/UPDATING as authoritative, and hope that 
handbook page can be clarified or expanded to first suggest the standard 
procedure, and only then mention shortcuts that MIGHT work, such as -j, 
or skipping the first mergemaster or the single-user boot .. especially 
for new users who may be unfamilar with all the nuances.

cheers, Ian

More information about the freebsd-questions mailing list