Hi Martin-Éric,

On Sun, 2025-01-19 at 17:04 +0200, Martin-Éric Racine wrote:
> 
> Here is what I see on this 32-bit host:
> 
> $ uname -a
> Linux u1400 6.1.0-30-686-pae #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1
> (2025-01-12) i686 GNU/Linux
> 
> $ dir -1 /boot/
> config-6.1.0-29-686-pae
> config-6.1.0-30-686-pae
> grub
> initrd.img-6.1.0-29-686-pae
> initrd.img-6.1.0-30-686-pae
> ipxe-arm64.efi
> ipxe.efi
> ipxe.lkrn
> memtest86+ia32.bin
> memtest86+ia32.efi
> memtest86+x64.bin
> memtest86+x64.efi
> System.map-6.1.0-29-686-pae
> System.map-6.1.0-30-686-pae
> vmlinuz-6.1.0-29-686-pae
> vmlinuz-6.1.0-30-686-pae
> 
> As seen above, iPXE clearly installs 3 binaries, regardless of the
> target architecture.

Yeah, that's how it has been for quiet a while at Ubuntu, and my first
goal, when adopting the package, was to catch up with what Ubuntu
delivers. There is probably room for improvements.

> $ sudo update-grub
> Generating grub configuration file ...
> Found background image: /usr/share/images/desktop-base/desktop-grub.png
> Found linux image: /boot/vmlinuz-6.1.0-30-686-pae
> Found initrd image: /boot/initrd.img-6.1.0-30-686-pae
> Found linux image: /boot/vmlinuz-6.1.0-29-686-pae
> Found initrd image: /boot/initrd.img-6.1.0-29-686-pae
> Found iPXE image: /boot/ipxe.lkrn
> Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
> Found memtest86+ 32bit EFI image: /boot/memtest86+ia32.efi
> Found memtest86+ 64bit image: /boot/memtest86+x64.bin
> Found memtest86+ 32bit image: /boot/memtest86+ia32.bin
> Warning: os-prober will not be executed to detect other bootable partitions.
> Systems on them will not be added to the GRUB boot configuration.
> Check GRUB_DISABLE_OS_PROBER documentation entry.
> Adding boot menu entry for UEFI Firmware Settings ...
> done
> 
> As seen above, none of the EFI iPXE binaries are found by update-grub.
> Since you wrote that it's for x86-64, it kinda makes sense not to find
> it on an x86-32 host, 

Looking at the code in /etc/grub.d/20_ipxe carefully reveals that the
script _aways_ prints "Found iPXE image: /boot/ipxe.lkrn" [1] but
inserts code which chooses ipxe.lkrn or ipxe.efi at run-time depending
on the plattform [2].

> but it nonetheless ships in the package, along
> with the arm64 EFI binary.

That's inevitable for picking the binary at run-time (except for the
arm64 binary). It might even be a feature as the same volume can boot
up connected to a BIOS host as well as to a UEFI host.

> 
> Meanwhile, memtest86+ installs both BIOS and EFI images, and comes
> with GRUB scripts to produce menu entries for every memtest86+ variant
> it finds. The only minor hickup here here is that it also ships 64-bit
> images on i386. While an amd64 host can indeed be launched in 32-bit
> mode, the reverse is not true.

In a similar way you can consider it a hickup to present EFI images on
a BIOS system and vice versa.

Conclusions:
- The only real flaw I currently see is the misleading static output
 "Found iPXE image: /boot/ipxe.lkrn".
- I doubt it's vital to support 32 bit EFI nowadays, however this can
  be added.
- The grub config code definitely needs improvement.

Sven

[1] 
https://sources.debian.org/src/ipxe/1.21.1%2Bgit20220113.fbbdc3926%2Bdfsg-2/debian/ipxe.grub/#L20
[2] 
https://sources.debian.org/src/ipxe/1.21.1%2Bgit20220113.fbbdc3926%2Bdfsg-2/debian/ipxe.grub/#L27

-- 
GPG Fingerprint
3DF5 E8AA 43FC 9FDF D086 F195 ADF5 0EDA F8AD D585

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to