From 352874b80077b733ea18e1fe8b1a6ced97001d33 Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Thu, 14 Sep 2023 11:20:36 +0530 Subject: [PATCH] fix grub setup --- includes/post/grub-setup.ksi | 15 +++++++++++++++ includes/post/post-install.ksi | 1 + 2 files changed, 16 insertions(+) create mode 100644 includes/post/grub-setup.ksi diff --git a/includes/post/grub-setup.ksi b/includes/post/grub-setup.ksi new file mode 100644 index 0000000..1d63c30 --- /dev/null +++ b/includes/post/grub-setup.ksi @@ -0,0 +1,15 @@ +%post +set -x + +if [[ -d /boot/efi/EFI/rocky ]] && [[ -f /boot/efi/EFI/rocky/grubaa64.efi ]]; then + mv -vf /boot/grub2/grub.cfg /boot/efi/EFI/rocky/grub.cfg + ln -s ../efi/EFI/rocky/grub.cfg /boot/grub2/grub.cfg + + [[ -d /boot/efi/EFI/BOOT ]] || mkdir -vp /boot/efi/EFI/BOOT + cp -vf /boot/efi/EFI/rocky/grubaa64.efi /boot/efi/EFI/BOOT/BOOTAA64.EFI +else + echo "Something is wrong with the current GRUB install. Have fun debugging. Bye." + exit 1 +fi + +%end diff --git a/includes/post/post-install.ksi b/includes/post/post-install.ksi index f3552a2..d387836 100644 --- a/includes/post/post-install.ksi +++ b/includes/post/post-install.ksi @@ -1,3 +1,4 @@ +%include grub-setup.ksi %include rpm-repos-enable.ksi %include user-setup.ksi %include rpi-setup.ksi