From: Michael A Cassaniti Date: Wed, 27 Jul 2022 04:22:15 +0000 (+1000) Subject: Skip setting kernel root cmdline parameter for UsrOnly with ImageID and without verity X-Git-Tag: v14~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c96cb4c4bfab0ca5949309dd4c1d087e03b3556c;p=thirdparty%2Fmkosi.git Skip setting kernel root cmdline parameter for UsrOnly with ImageID and without verity When an image is built as a /usr only image and does not use verity, the kernel command line should (and already does) contain the parameter `mount.usr`. It should not contain a root parameter since `systemd-repart` and `systemd-gpt-auto-generator` will take care of generating and mounting the root partition. Without this change the root partition label used on the kernel command line will be invalid. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 9cce217a5..4d8be448f 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -4078,7 +4078,8 @@ def install_unified_kernel( option = "usrhash" if args.usr_only else "roothash" boot_options = f"{boot_options} {option}={root_hash}" elif partlabel: - boot_options = f"{boot_options} root=PARTLABEL={partlabel}" + option = "mount.usr" if args.usr_only else "root" + boot_options = f"{boot_options} {option}=PARTLABEL={partlabel}" osrelease = root / "usr/lib/os-release" cmdline = workspace(root) / "cmdline"