generator: add root=off to explicitly turn search for rootfs off

This is useful when booting into storage target mode, where we do not
want to enter a root fs, we just want to stay forever in the initrd,
and hence there's value in not even generating and jobs to find the
rootfs
This commit is contained in:
Lennart Poettering
2025-04-03 11:08:57 +02:00
parent 198f7badaa
commit c05a132fef
2 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -1114,6 +1114,10 @@ GptAutoRoot parse_gpt_auto_root(const char *value) {
return GPT_AUTO_ROOT_DISSECT_FORCE;
}
log_debug("Disabling root partition auto-detection, root= is neither unset, nor set to 'gpt-auto', 'gpt-auto-force', 'dissect' or 'dissect-force'.");
if (streq(value, "off"))
log_debug("Disabling root partition auto-detection, root= handling is explicitly turned off.");
else
log_debug("Disabling root partition auto-detection, root= is neither unset, nor set to 'gpt-auto', 'gpt-auto-force', 'dissect' or 'dissect-force'.");
return GPT_AUTO_ROOT_OFF;
}