]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Nudge kernel-install towards using the BLS layout 2924/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 29 Jul 2024 15:06:06 +0000 (17:06 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 29 Jul 2024 17:37:39 +0000 (19:37 +0200)
mkosi/__init__.py

index 04588531685edac152f96d80cfb733dd75075349..90dbfc8c3012d432a344753fbfa24548cc85d3a6 100644 (file)
@@ -162,6 +162,14 @@ def install_distribution(context: Context) -> None:
             # should not be read from or written to.
             with umask(~0o500):
                 (context.root / "efi").mkdir(exist_ok=True)
+                (context.root / "boot").mkdir(exist_ok=True)
+
+            # Ensure /boot/loader/entries.srel exists and has type1 written to it to nudge kernel-install towards using
+            # the boot loader specification layout.
+            with umask(~0o700):
+                (context.root / "boot/loader").mkdir(exist_ok=True)
+            with umask(~0o600):
+                (context.root / "boot/loader/entries.srel").write_text("type1\n")
 
             if context.config.packages:
                 context.config.distribution.install_packages(context, context.config.packages)