Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support UEFI 32bit boot on amd64 #227

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Support UEFI 32bit boot on amd64 #227

merged 1 commit into from
Dec 19, 2024

Conversation

mika
Copy link
Member

@mika mika commented Dec 19, 2024

We dropped support for i386, though there are 32bit EFI systems with 64bit CPUs out in the wild, so let's support UEFI 32bit boot on amd64.

Verified with /usr/share/OVMF/OVMF32_CODE_4M.fd from ovmf-ia32 (v2024.11-2) and qemu, running:

% qemu-system-amd64 -m 2048 -M pc -cdrom /path/to/grml_isos/grml_0.42iso -drive if=pflash,format=raw,unit=0,file.filename=/usr/share/OVMF/OVMF32_CODE_4M.fd,file.locking=off,readonly=on

Launch boot UEFI interactive shell there and verified that this works:

fs0:
cd efi/boot
bootia32.efi

This shows the Grml boot menu as expected, whereas executing bootx64.efi fails (as we're running within a 32bit EFI environment), also as expected.

NOTE: We already ship the grub-efi-ia32-bin package on AMD64 already for support within /etc/grml/fai/config/scripts/GRMLBASE/45-grub-images. But for netboot package we need the grubnetia32.efi for usage as grubia32.efi. Though the file /usr/lib/grub/i386-efi-signed/grubnetia32.efi.signed is shipped only via the grub-efi-ia32-signed package, which is available only on i386. Therefore we need to use the file /usr/lib/grub/i386-efi/monolithic/grubnetia32.efi from grub-efi-ia32-unsigned instead, which is available only as of Debian/trixie and newer. But let's still provide the code path in netboot creation, as someone might handle this within a custom script on their own.

See grml/grml#211

We dropped support for i386, though there are 32bit EFI systems with
64bit CPUs out in the wild, so let's support UEFI 32bit boot on amd64.

Verified with /usr/share/OVMF/OVMF32_CODE_4M.fd from ovmf-ia32 (v2024.11-2)
and qemu, running:

  % qemu-system-amd64 -m 2048 -M pc -cdrom /path/to/grml_isos/grml_0.42iso -drive if=pflash,format=raw,unit=0,file.filename=/usr/share/OVMF/OVMF32_CODE_4M.fd,file.locking=off,readonly=on

Launch boot UEFI interactive shell there and verified that this works:

  fs0:
  cd efi/boot
  bootia32.efi

This shows the Grml boot menu as expected, whereas executing bootx64.efi
fails (as we're running within a 32bit EFI environment), also as
expected.

NOTE: We already ship the grub-efi-ia32-bin package on AMD64 already for
support within /etc/grml/fai/config/scripts/GRMLBASE/45-grub-images.
But for netboot package we need the grubnetia32.efi for usage as
grubia32.efi. Though the file
/usr/lib/grub/i386-efi-signed/grubnetia32.efi.signed is shipped only via
the grub-efi-ia32-signed package, which is available only on i386.
Therefore we need to use the file
/usr/lib/grub/i386-efi/monolithic/grubnetia32.efi from
grub-efi-ia32-unsigned instead, which is available only as of
Debian/trixie and newer. But let's still provide the code path in
netboot creation, as someone might handle this within a custom script on
their own.

See grml/grml#211
@mika mika requested review from zeha and jkirk December 19, 2024 00:35
@mika mika merged commit 8520a72 into master Dec 19, 2024
12 checks passed
@zeha zeha deleted the mika/ia32 branch December 19, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants