1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

init.8: add RECOVERING section

Reviewed by:	imp, jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56536
This commit is contained in:
Konstantin Belousov
2026-04-26 13:28:05 +03:00
parent 9e6ae89d83
commit e378d97eeb
+35
View File
@@ -401,6 +401,41 @@ Specifies the path used to search for the init binary.
More than one binary can be listed in the string,
candidate file names are split by the \[lq]:\[rq] separator.
Each name is opened in sequence until a valid executable is found.
.Sh RECOVERING
If the
.Pa /sbin/init
binary is broken or cannot be executed by the current kernel,
recovery requires console access.
Then, the
.Va init_path
loader tunable can be used to specify alternative
.Nm
location.
.Pp
By default, system install leaves copy of the previous
.Nm init
binary at
.Pa /sbin/init.bak ,
and this path is set as one component of the default
.Va init_path .
.Pp
If
.Nm
cannot be run, the
.Fx
version of
.Xr sh 1
has a special provision for running as PID 1.
If the shell detects that it is running as init, it opens
.Pa /dev/console
as it standard input and output and enters the
command loop.
.Pp
The session should be exited using
.Ic reboot Fl q
or exec-ing fixed
.Nm ,
since a normal exit will cause a kernel panic.
.El
.Sh FILES
.Bl -tag -width /var/log/init.log -compact