Skip to content

Commit

Permalink
grub_install: Remove core grub modules from EFI partition for i386-pc
Browse files Browse the repository at this point in the history
The image also boots on Hyper-V Generation 1 VM (BIOS) if the modules
are removed.

Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
  • Loading branch information
ader1990 committed Jun 20, 2024
1 parent 75c79df commit 477f5a6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build_library/grub_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 477f5a6

Please sign in to comment.