From f43c3f71b1d42aa4c99ba5ce616a1a1b26b506fa Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 3 Nov 2021 14:11:35 -0500 Subject: [PATCH] Fix BIOS Boot Added checks for efi and bios at different points --- 0-preinstall.sh | 6 ++++++ 3-post-setup.sh | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 63058dd..84b15d8 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -109,6 +109,12 @@ echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" +echo "--GRUB BIOS Bootloader Install&Check--" +echo "--------------------------------------" +if [[ ! -d "/sys/firmware/efi" ]]; then + grub-install --boot-directory=/boot ${DISK} +fi +echo "--------------------------------------" echo "-- Check for low memory systems <8G --" echo "--------------------------------------" TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') diff --git a/3-post-setup.sh b/3-post-setup.sh index 326e5ee..ba51c5d 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -10,11 +10,9 @@ echo -e "\nFINAL SETUP AND CONFIGURATION" echo "--------------------------------------" -echo "-- GRUB Bootloader Installation --" +echo "-- GRUB EFI Bootloader Install&Check--" echo "--------------------------------------" -if [[ ! -d "/sys/firmware/efi" ]]; then - grub-install --boot-directory=/boot ${DISK} -else +if [[ -d "/sys/firmware/efi" ]]; then grub-install --efi-directory=/boot ${DISK} fi grub-mkconfig -o /boot/grub/grub.cfg