From 04b240d730e4276cd300eaebf6018b0fb67117e2 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 29 Jul 2024 17:06:06 +0200 Subject: [PATCH] Nudge kernel-install towards using the BLS layout --- mkosi/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 045885316..90dbfc8c3 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -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)