The unload + load example in the 12.2.3 section doesn't seem to work.
The original problem was reported in this review
According to the Handbook we can do this:
unload load kernel.old
But when tested in 12.1, 12.2 and 13-current, this is what happens:
OK unload OK load kernel.old can't find 'kernel.old'
The problem here is that at this point some configuration variables are not yet
set so we don't know where to find the kernel. So change the example and the
explanation right after to indicate the need of the qualified path in order to
load the kernel file. Note that I say kernelfile and not kernel since for
example kernel.old and GENERIC both use the same kernelfile, this is:
/boot/GENERIC/kernel /boot/kernel.old/kernel
The next example with boot-conf is not affected because boot-conf does the
work of loading and setting variables like module_path.
This can be easily checked after login by running:
sysctl kern.bootfile
Note:
I don't have a /boot/GENERIC despite the fact that I have 12.1 and 12.2 stock
machines updated with freebsd-update and running GENERIC kernel. But according
to usr.sbin/freebsd-update/freebsd-update.sh that should be the directory
where it should be found:
... # Sometimes the kernel isn't installed where INDEX-ALL # thinks that it should be: In particular, it is often in # /boot/kernel instead of /boot/GENERIC or /boot/SMP. ...
This is kind of related to r45517