From e7d9faadc87c965f15e6267d2fc5e5a2f5424e41 Mon Sep 17 00:00:00 2001 From: Adrian Vladu Date: Thu, 20 Jun 2024 15:05:37 +0300 Subject: [PATCH] grub_install: Remove core grub modules from EFI partition for i386-pc The image also boots on Hyper-V Generation 1 VM (BIOS) if the modules are removed. Signed-off-by: Adrian Vladu --- build_library/grub_install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build_library/grub_install.sh b/build_library/grub_install.sh index 6426dea9f0..6149131760 100755 --- a/build_library/grub_install.sh +++ b/build_library/grub_install.sh @@ -183,11 +183,9 @@ sudo grub-mkimage \ --output "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" \ "${CORE_MODULES[@]}" -if [[ "${FLAGS_target}" != i386-pc ]]; then - for mod in "${CORE_MODULES[@]}"; do - sudo rm "${ESP_DIR}/${GRUB_DIR}/${mod}.mod" - done -fi +for mod in "${CORE_MODULES[@]}"; do + sudo rm "${ESP_DIR}/${GRUB_DIR}/${mod}.mod" +done # Now target specific steps to make the system bootable case "${FLAGS_target}" in