]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
arch: Add symlinks to /boot for kernel and initrd when using bios 1038/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 7 Jul 2022 18:12:47 +0000 (20:12 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 12 Jul 2022 22:38:59 +0000 (00:38 +0200)
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

index edd7d43e066a36c17a2709537ef12162b275d588..324ae4f092ad2095263e52a021ca7a8ff028b241 100644 (file)
@@ -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: