From c4625d1a44635e8d1b3d30a3fded22ec5e9cc874 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 7 Jul 2022 20:12:47 +0200 Subject: [PATCH] arch: Add symlinks to /boot for kernel and initrd when using bios Grub doesn't support the boot loader spec on Arch so we have to symlink vmlinuz and the initrd to some place where grub can find them. --- mkosi/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mkosi/__init__.py b/mkosi/__init__.py index edd7d43e0..324ae4f09 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -7315,6 +7315,11 @@ def run_kernel_install(args: MkosiArgs, root: Path, do_run_build_script: bool, f for kver, kimg in gen_kernel_images(args, root): run_workspace_command(args, root, ["kernel-install", "add", kver, Path("/") / kimg]) + if args.distribution == Distribution.arch and "bios" in args.boot_protocols: + boot_dir = Path("/") / boot_directory(args, kver) + root.joinpath(f"boot/vmlinuz-{kver}").symlink_to(boot_dir / "linux") + root.joinpath(f"boot/initramfs-{kver}.img").symlink_to(boot_dir / "initrd") + @dataclasses.dataclass class BuildOutput: -- 2.47.2