Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 May 2026 07:17:05 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 350d980db869 - stable/15 - init.8: add RECOVERING section
Message-ID:  <69f847f1.40e8c.3b065f0@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=350d980db8693b300fdee01598cb98c9699616ba

commit 350d980db8693b300fdee01598cb98c9699616ba
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-04-26 10:28:05 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-05-04 07:16:39 +0000

    init.8: add RECOVERING section
    
    (cherry picked from commit e378d97eeb2b8961f312cc04d4751579a7b70741)
---
 sbin/init/init.8 | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/sbin/init/init.8 b/sbin/init/init.8
index f86adf53b361..85b1db2ddf06 100644
--- a/sbin/init/init.8
+++ b/sbin/init/init.8
@@ -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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f847f1.40e8c.3b065f0>