summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-04-28 16:56:39 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-04-28 23:26:20 +0100
commit5ae89ef34774a777c5af7af48b1ad431d10a425e (patch)
tree54c2755ddf182ea784e38633b2cc5340a84f1bde /man
parent77b7026668cd376744a99881777dce8c2f5da835 (diff)
downloadsystemd-5ae89ef34774a777c5af7af48b1ad431d10a425e.tar.gz
core/systemctl: when switching root default to /sysroot/
We hardcode the path the initrd uses to prepare the final mount point at so many places, let's also imply it in "systemctl switch-root" if not specified. This adds the fallback both to systemctl and to PID 1 (this is because both to — different – checks on the path).
Diffstat (limited to 'man')
-rw-r--r--man/systemctl.xml19
1 files changed, 10 insertions, 9 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 639c888110..009aabacb9 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -1561,19 +1561,20 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
</varlistentry>
<varlistentry>
- <term><command>switch-root</command> <replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></term>
+ <term><command>switch-root</command> <optional><replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></optional></term>
<listitem>
<para>Switches to a different root directory and executes a new system manager process below it.
This is intended for use in the initrd, and will transition from the initrd's system manager
- process (a.k.a. "init" process) to the main system manager process which is loaded from the
- actual host root files system. This call takes two arguments: the directory that is to become the
- new root directory, and the path to the new system manager binary below it to execute as PID 1.
- If the latter is omitted or the empty string, a systemd binary will automatically be searched for
- and used as init. If the system manager path is omitted, equal to the empty string or identical
- to the path to the systemd binary, the state of the initrd's system manager process is passed to
- the main system manager, which allows later introspection of the state of the services involved
- in the initrd boot phase.</para>
+ process (a.k.a. "init" process, PID 1) to the main system manager process which is loaded from
+ the actual host root files system. This call takes two arguments: the directory that is to become
+ the new root directory, and the path to the new system manager binary below it to execute as PID
+ 1. If both are omitted or the former is an empty string it defaults to
+ <filename>/sysroot/</filename>. If the latter is omitted or is an empty string, a systemd binary
+ will automatically be searched for and used as service manager. If the system manager path is
+ omitted, equal to the empty string or identical to the path to the systemd binary, the state of
+ the initrd's system manager process is passed to the main system manager, which allows later
+ introspection of the state of the services involved in the initrd boot phase.</para>
</listitem>
</varlistentry>