From 5ae89ef34774a777c5af7af48b1ad431d10a425e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 28 Apr 2023 16:56:39 +0200 Subject: core/systemctl: when switching root default to /sysroot/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- man/systemctl.xml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'man') 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 - switch-root ROOT INIT + switch-root ROOT INIT 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. + 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 + /sysroot/. 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. -- cgit v1.2.1