From 24d7ffd0d03ea3668eac80b8b282e8b1ae719089 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 5 Sep 2023 10:38:01 -0400 Subject: [PATCH] Install correct GRUB packages --- templates/install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/install.sh b/templates/install.sh index 0834e96..5ad9322 100755 --- a/templates/install.sh +++ b/templates/install.sh @@ -80,7 +80,13 @@ default_debmirror="http://ftp.debian.org/debian" basepkglist="lvm2,parted,gdisk,sudo,vim,gpg,gpg-agent,openssh-server,vlan,ifenslave,python3,ca-certificates,curl" case $( uname -m ) in x86_64) - basepkglist="${basepkglist},grub-pc,grub-efi-amd64,linux-image-amd64" + # If we're in EFI mode, install grub-efi, otherwise install grub-pc + if grep -q efivarfs /proc/mounts &>/dev/null; then + grub_pkg="grub-efi" + else + grub_pkg="grub-pc" + fi + basepkglist="${basepkglist},${grub_pkg},linux-image-amd64" ;; aarch64) basepkglist="${basepkglist},grub-efi-arm64,linux-image-arm64"