From 6e67329a4e6ce631f06f24467e80d91814ba114a Mon Sep 17 00:00:00 2001 From: Thomas H Jones II Date: Mon, 13 Nov 2023 13:30:10 -0500 Subject: [PATCH] Update PostBuild.sh `/sbin/grub2-install` will error-out if EFI is active (` /sys/firmware/efi` exists) --- PostBuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PostBuild.sh b/PostBuild.sh index a689727..771d68b 100755 --- a/PostBuild.sh +++ b/PostBuild.sh @@ -404,8 +404,8 @@ function GrubSetup { ) > "${CHROOTMNT}/etc/default/grub" || \ err_exit "Failed writing default/grub file" - # Install GRUB2 bootloader on x86 hosts - if [[ $( uname -i ) == "x86_64" ]] + # Install GRUB2 bootloader when EFI not active + if [[ ! -d /sys/firmware/efi ]] then chroot "${CHROOTMNT}" /bin/bash -c "/sbin/grub2-install ${CHROOTDEV}" fi