From: Zbigniew Jędrzejewski-Szmek Date: Wed, 7 Feb 2024 12:47:38 +0000 (+0100) Subject: man: mention that preset-all is performed during early boot X-Git-Tag: v256-rc1~934 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb470316943f07e382371ee4326ff6442156a07b;p=thirdparty%2Fsystemd.git man: mention that preset-all is performed during early boot The intro of systemd-firstboot is rewritten to make it clearer how it fits into the big picture. Systemd does some machine-id and presets and systemd-firstboot.service is used to interactively fill in the blanks. Closes #22225. --- diff --git a/man/systemd-firstboot.xml b/man/systemd-firstboot.xml index a6ba07a3a8c..ded7048792c 100644 --- a/man/systemd-firstboot.xml +++ b/man/systemd-firstboot.xml @@ -34,12 +34,23 @@ Description - systemd-firstboot initializes basic system settings interactively during the - first boot, or non-interactively on an offline system image. The service is started during boot if - ConditionFirstBoot=yes is met, which essentially means that /etc/ - is unpopulated, see + The systemd-firstboot.service unit is one of the units which are used to + initialize the machine configuration during "First Boot", i.e. when the system is freshly installed or + after a factory reset. The + systemd1 manager + itself will initialize + machine-id5 and preset + all units, enabling or disabling them according to the + systemd.preset5 + settings. systemd-firstboot.service is started later to interactively initialize + basic system configuration. It is started only if ConditionFirstBoot=yes is met, which + essentially means that /etc/ is unpopulated, see systemd.unit5 for - details. + details. System credentials may be used to inject configuration; those settings are not queried + interactively. + + The systemd-firstboot command can also be used to non-interactively initialize + an offline system image. The following settings may be configured: @@ -415,8 +426,8 @@ # systemd-nspawn --image=… --set-credential=firstboot.locale:de_DE.UTF-8 … - Note that these credentials are only read and applied during the first boot process. Once they are - applied they remain applied for subsequent boots, and the credentials are not considered anymore. + Note that these credentials are only read and applied during the first boot. Once they are applied + they remain applied for subsequent boots, and the credentials are not considered anymore. diff --git a/man/systemd.preset.xml b/man/systemd.preset.xml index f84a0535487..b1e796a16a9 100644 --- a/man/systemd.preset.xml +++ b/man/systemd.preset.xml @@ -41,7 +41,7 @@ systemctl preset is used by the post install scriptlets of rpm packages (or other OS package formats), to enable/disable specific units by default on package installation, enforcing - distribution, spin or administrator preset policy. This allows choosing a certain set of units to be + distribution, spin, or administrator preset policy. This allows choosing a certain set of units to be enabled/disabled even before installing the actual package. For more information, see systemctl1. @@ -56,7 +56,9 @@ When the machine is booted for the first time, systemd1 will enable/disable all units according to preset policy, similarly to systemctl - preset-all. Also see "First Boot Semantics" in + preset-all. Also see ConditionFirstBoot= in + systemd.unit5 and + "First Boot Semantics" in machine-id5. diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index f7a6af70597..46184f5b7e7 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -1654,12 +1654,20 @@ whether the system is booting up for the first time. This roughly means that /etc/ was unpopulated when the system started booting (for details, see "First Boot Semantics" in machine-id5). - First boot is considered finished (this condition will evaluate as false) after the manager + First Boot is considered finished (this condition will evaluate as false) after the manager has finished the startup phase. This condition may be used to populate /etc/ on the first boot after factory reset, or when a new system instance boots up for the first time. + Note that the service manager itself will perform setup steps during First Boot: it will + initialize + machine-id5 and + preset all units, enabling or disabling them according to the + systemd.preset5 + settings. Additional setup may be performed via units with + ConditionFirstBoot=yes. + For robustness, units with ConditionFirstBoot=yes should order themselves before first-boot-complete.target and pull in this passive target with Wants=. This ensures that in a case of an aborted first boot, these units will