stages/grub2.inst: fix format for non-x86_64 image

When writing the grub2 core image, the format should be set based on the
platform.  This was accidentally changed to be `i386-pc` for all
platforms except when building ISOs.

Set the format to the platform and only change it to `i386-pc-eltorito`
when building ISOs.
This commit is contained in:
Achilleas Koutsou 2025-03-04 17:00:09 +01:00 committed by Simon de Vlieger
parent 563153ac6f
commit 67070cc316

View file

@ -86,12 +86,11 @@ def core_mkimage(platform: str, prefix: str, options: Dict):
# read the partition and its filesystem containing said modules
# and the grub configuration [NB: efi systems work differently]
gformat = platform
if platform == "i386-pc":
modules = ["biosdisk"]
gformat = "i386-pc"
else:
modules = []
gformat = "i386-pc"
if pt_label in ["dos", "mbr"]:
modules += ["part_msdos"]