From 60e4b4291b0a59d77fb8d4b149d9d6672b274aed Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Tue, 26 Sep 2023 01:00:23 +0800 Subject: [PATCH 1/2] core/main: log that we assume first boot if failed to read machine-id --- src/core/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/main.c b/src/core/main.c index 6f779586d07..4ee5e8735f4 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -2151,7 +2151,7 @@ static void log_execution_mode(bool *ret_first_boot) { r = read_one_line_file("/etc/machine-id", &id_text); if (r < 0 || streq(id_text, "uninitialized")) { if (r < 0 && r != -ENOENT) - log_warning_errno(r, "Unexpected error while reading /etc/machine-id, ignoring: %m"); + log_warning_errno(r, "Unexpected error while reading /etc/machine-id, assuming first boot: %m"); first_boot = true; log_info("Detected first boot."); From ff4a7d32f11f765b9babbdfff37db911c8bdea60 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Tue, 26 Sep 2023 01:01:57 +0800 Subject: [PATCH 2/2] man/systemd-firstboot: /etc/ empty -> unpopulated We use the phrase "unpopulated" in systemd.unit(5) too. And "/etc/ is empty" is simply spurious. --- man/systemd-firstboot.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemd-firstboot.xml b/man/systemd-firstboot.xml index 3aa160ecad2..5129d068f29 100644 --- a/man/systemd-firstboot.xml +++ b/man/systemd-firstboot.xml @@ -37,7 +37,7 @@ 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 empty, see + is unpopulated, see systemd.unit5 for details.