Skip to content

Commit

Permalink
Update PostBuild.sh
Browse files Browse the repository at this point in the history
`/sbin/grub2-install` will error-out if EFI is active (` /sys/firmware/efi` exists)
  • Loading branch information
ferricoxide authored Nov 13, 2023
1 parent 469fa72 commit 6e67329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PostBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6e67329

Please sign in to comment.