]> code.delx.au - monosys/commitdiff
multiboot: Support booting arch with non-default kernels.
authorGreg Darke <greg@tsukasa.net.au>
Thu, 19 May 2022 05:57:54 +0000 (15:57 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Fri, 27 May 2022 12:08:44 +0000 (22:08 +1000)
This only works if there is a single kernel in the iso file.

While we are here, also load the microkernel updates (for amd and intel)
if the files exist in the image (which they do by default).

hacks/multiboot-setup

index 0ea027c0379a9890033d63f6be57648014b6ea1a..8abc2be26cc0023191a351dd33b2c6ed156cd6ae 100755 (executable)
@@ -112,8 +112,10 @@ search --set=root --label $PARTITION_LABEL
 function setup_arch {
   menuentry "\$1" {
     loopback loop \$1
-    linux (loop)/arch/boot/x86_64/vmlinuz-linux img_label=${PARTITION_LABEL} img_loop=\$1 archisobasedir=arch earlymodules=loop
-    initrd (loop)/arch/boot/x86_64/initramfs-linux.img
+    echo "Loading kernel..."
+    linux (loop)/arch/boot/x86_64/vmlinuz-* img_label=${PARTITION_LABEL} img_loop=\$1 archisobasedir=arch earlymodules=loop
+    echo "Loading initrd (and microcode if they exist)..."
+    initrd (loop)/arch/boot/*.img (loop)/arch/boot/x86_64/initramfs-*.img
   }
 }
 for iso in /archlinux-*.iso; do