From nobody Mon Apr 27 03:21:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4g3pkn53G0z6bbN0 for ; Mon, 27 Apr 2026 03:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g3pkn2kPZz3lNG for ; Mon, 27 Apr 2026 03:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777260097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xj3Y8yj2+EBrzAnQK/rXGGOWRrlLtc55HshU7+JRdh4=; b=OpKbsU9aD0oNKiFayKfI0hUDqfohS0YEg54Dc9TRm1Oys3Rjmhvmc6myf2u0A/Jvc/a7Oa lrVmTcksZp70zJoYpLjlYQkUgskUeP60TORGrWiMz53LswN+GYNwCiITWpXk6XkQboQI1f YR4oXqtA4vidUmMsHf1zjavQmPy+5QYEKIGur8Q2nlaUfm+Y+FBbszk0GL5PT80yxVOCuI W5nZeOfWzgOmFZ+RsV6wfZ/NhFoNeSFmFzJiisZMwFRHUdyDDkcSGI/ZLkCMZWrD4px8sY J6GtvOz2dcoHl4SVjgxVXbU4pTndZT5bfzTF8szbppzCG5p8kL9zdmUdPMqO2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777260097; a=rsa-sha256; cv=none; b=LyQEyKOH6rdjgTmY8eIdXILrFLtVTpx6tvF5hpjBtXQBq/qs/1HiI6z4S8Bop8UpJ35yR0 ZK/WqAI/eg7Ajus1OLY81sNY+4XC5RgVmuq/wt7m4oseXdlBYigNTVIPTQQueW8SZUzhwz f60WFT3FToMJ/KV0lmnMhA3KQ5obXWkQ1FGOBvtzIo8jyGMd/x+qzmjUIZ2FvLQSyNK/Yo vmT7FTP0lntuHBtPKaRD1LWhy1+vvj5aVXZMHILQTLXBsdodB62aPmrESfQ7sZesUXBgiu 1And7l26T8VOZ9Kek4QtzUkDcMJc3n+388MLD5dnxRBUBOQ1zAv3ZUUXrGPJ9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777260097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xj3Y8yj2+EBrzAnQK/rXGGOWRrlLtc55HshU7+JRdh4=; b=mDTP/IIjwYckxocPdKV4IjfVtvcpbOPpN+AX8Y9dzaBBtdUG1uyquQ8CQ3RAqpEe5adyHn QK0zpUZnObWFrIpzaRDQOH4QsXWSHxy7tPSYc4TYBJUbmEsjYtw+uwOn/b/LxoAXrd6EwD XiYfpaIP7nFAGDOgFEn+xQRHuNpDZqYp0CF4C2FajpHG9INK6Y/Fs9MEPIQSf/U08TGngK o+ySP2m1OPzIwniqSagHGgmKnQuuL6WyI4YMEnrcUrGC/be/lPPh/yuakNk3NfXHwOcEy5 uZ3rLvTSdyrfPW8lJnXfAX4NbsA99JROHhdDa6YmBb+ziPhfwx/ywti1+a6nyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g3pkn2JtGzqbs for ; Mon, 27 Apr 2026 03:21:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b7ad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Apr 2026 03:21:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e378d97eeb2b - main - init.8: add RECOVERING section List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e378d97eeb2b8961f312cc04d4751579a7b70741 Auto-Submitted: auto-generated Date: Mon, 27 Apr 2026 03:21:37 +0000 Message-Id: <69eed641.3b7ad.3fb0a6d@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e378d97eeb2b8961f312cc04d4751579a7b70741 commit e378d97eeb2b8961f312cc04d4751579a7b70741 Author: Konstantin Belousov AuthorDate: 2026-04-26 10:28:05 +0000 Commit: Konstantin Belousov CommitDate: 2026-04-27 01:45:57 +0000 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 --- 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