From 35bdd361abefae265d8ee6cf344836b3f60f9286 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Tue, 20 Jun 2023 13:16:39 +0200 Subject: [PATCH] install stage 1: grub-install for BIOS, x86-32 EFI, and x86-64 EFI --- install-stage1.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install-stage1.sh b/install-stage1.sh index 6e80448..49c3bfd 100644 --- a/install-stage1.sh +++ b/install-stage1.sh @@ -266,6 +266,15 @@ done echo "$TARGET_HOSTNAME" > /mnt/target/etc/hostname +mkdir /mnt/target/boot/efi/LOADER +echo "GRUB has been deliberately installed to a non-standard location. +This avoids default kernel hooks breaking the custom config." > /mnt/target/boot/efi/LOADER/README.TXT + +# no idea if any of these are even necessary/relevant but it can’t hurt... +TARGET_PRELOAD_GRUB_MODULES="usb usbms uhci ehci ohci part_gpt f2fs" +run_in_target grub-install --target=i386-pc --boot-directory=/boot/efi/LOADER --disk-module=native --modules="$TARGET_PRELOAD_GRUB_MODULES" "/dev/$TARGET_DISK" +run_in_target grub-install --target=i386-efi --boot-directory=/boot/efi/LOADER --efi-directory=/boot/efi --removable --no-nvram --modules="$TARGET_PRELOAD_GRUB_MODULES" "/dev/$TARGET_DISK" +run_in_target grub-install --target=x86_64-efi --boot-directory=/boot/efi/LOADER --efi-directory=/boot/efi --removable --no-nvram --modules="$TARGET_PRELOAD_GRUB_MODULES" "/dev/$TARGET_DISK"