]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Set up proper environment variables for kernel-install
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 29 Jul 2024 13:38:49 +0000 (15:38 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 29 Jul 2024 17:37:01 +0000 (19:37 +0200)
If we're not explicitly disabling kernel-install during package
manager invocations, let's set up the environment to make it do the
right thing instead.

mkosi/installer/__init__.py

index 0f28d3e730ec97fb2c1d7c604da2765ad4a42f45..7c0429f7c9c6169bc112c25ed3f5a099cd24d8b3 100644 (file)
@@ -47,6 +47,14 @@ class PackageManager:
             context.config.bootable != ConfigFeature.disabled
         ):
             env["KERNEL_INSTALL_BYPASS"] = "1"
+        else:
+            env |= {
+                "BOOT_ROOT": "/boot",
+                # Required to make 90-loaderentry.install put the right paths into the bootloader entry.
+                "BOOT_MNT": "/boot",
+                # Hack to tell dracut to not create a hostonly initrd when it's invoked by kernel-install.
+                "hostonly_l": "no",
+            }
 
         return env