From 6b0903ec7150ec28d12b37e06408e5d4f9a28e79 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 22 May 2024 12:37:06 -0700 Subject: [PATCH] attempt to remove unneeded boot files --- config.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config.sh b/config.sh index 90bbedb..b8f4119 100644 --- a/config.sh +++ b/config.sh @@ -150,6 +150,15 @@ EOF echo -e 'rocky\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers sed -i '1i # Modified for cloud image' /etc/cloud/cloud.cfg sed -i 's/name: cloud-user/name: rocky/g' /etc/cloud/cloud.cfg + + # Remove unneeded EFI files to match an actual installed system + case "$(uname -m)" in + x86_64) arch="x64"; ARCH="X64";; + aarch64) arch="aa64"; ARCH="AA64";; + esac + test -f "/boot/efi/EFI/BOOT/grub${arch}.efi" && /bin/rm "/boot/efi/EFI/BOOT/grub${arch}.efi" + test -f "/boot/efi/EFI/BOOT/mm${arch}.efi" && /bin/rm "/boot/efi/EFI/BOOT/mm${arch}.efi" + test -f "/boot/efi/EFI/BOOT/grub.cfg" && /bin/rm "/boot/efi/EFI/BOOT/grub.cfg" } ################################################################################