From 6db3d64d26a37d485f294605d4eef80e8bae5d24 Mon Sep 17 00:00:00 2001 From: David Giwojno Date: Tue, 2 Nov 2021 23:52:05 +0100 Subject: [PATCH] grub boot install fix --- 0-preinstall.sh | 8 ++++++++ 3-post-setup.sh | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/0-preinstall.sh b/0-preinstall.sh index 63058dd..6c936d4 100755 --- a/0-preinstall.sh +++ b/0-preinstall.sh @@ -106,6 +106,14 @@ echo "--------------------------------------" pacstrap /mnt base base-devel linux linux-firmware vim nano sudo archlinux-keyring wget libnewt --noconfirm --needed genfstab -U /mnt >> /mnt/etc/fstab echo "keyserver hkp://keyserver.ubuntu.com" >> /mnt/etc/pacman.d/gnupg/gpg.conf +echo "--------------------------------------" +echo "-- GRUB Bootloader Installation --" +echo "--------------------------------------" +if [[ ! -d "/sys/firmware/efi" ]]; then + grub-install --boot-directory=/mnt/boot ${DISK} +else + grub-install --efi-directory=/mnt/boot ${DISK} +fi cp -R ${SCRIPT_DIR} /mnt/root/ArchTitus cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist echo "--------------------------------------" diff --git a/3-post-setup.sh b/3-post-setup.sh index 326e5ee..a550d20 100755 --- a/3-post-setup.sh +++ b/3-post-setup.sh @@ -9,14 +9,7 @@ #------------------------------------------------------------------------- echo -e "\nFINAL SETUP AND CONFIGURATION" -echo "--------------------------------------" -echo "-- GRUB Bootloader Installation --" -echo "--------------------------------------" -if [[ ! -d "/sys/firmware/efi" ]]; then - grub-install --boot-directory=/boot ${DISK} -else - grub-install --efi-directory=/boot ${DISK} -fi + grub-mkconfig -o /boot/grub/grub.cfg # ------------------------------------------------------------------------