Feature #16652

Updated by Lukas Zapletal over 1 year ago

Foreman currently sets DHCP filename option to either grubx64.efi or grubia32.efi according the architecture of the host. We need to expand the list with more architectures so users can boot other platforms via Grub2 UEFI.

In order to achieve that, one only needs to generate Grub2 binary for particular architecture. Instead using traditional modular build:

grub2-mknetdir --net-directory=/root/grub

Foreman assumes the firmware is built into single file. If file is available in the OS, it can be simple copied. For example in Red Hats on several platforms grub2-efi package provides the EFI loader (e.g. /boot/efi/EFI/redhat/grubaa64.efi).

In other cases, it must be build from scratch (replace architecture with correct one):

grub2-mkimage -O powerpc-ieee1275 x86_64-efi -d /usr/lib/grub/powerpc-ieee1275 /usr/lib/grub/x86_64-efi -o /root/grubppc64.efi /root/grub -p "" all_video boot btrfs cat chain configfile echo efifwsetup efinet ext2 fat font gfxmenu gfxterm gzio halt hfsplus iso9660 jpeg loadenv loopback lvm mdraid09 mdraid1x minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot search search_fs_uuid search_fs_file search_label serial sleep syslinuxcfg test tftp video xfs linux backtrace usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug linuxefi

Then copy the file to TFTP Smart Proxy under /var/lib/tftproot/boot/grub2/

The file must be named in the following way:

* grubx64.efi or grubia32.efi (for Intel)
* grubaa64.efi (for AARCH64)
* grubppc64.efi (for PPC64)
* grubppc64le.efi (for PPC64 LE)

Then new host with proper architecture and PXE loader (set to Grub2) can be created and provisioned. The architecture name must match patterns defined in:


REMARK: The @grubppc64.efi@ and @grubppc64le.efi@ are not good names for the files as these binaries are NOT EFI on IBM POWER platform. We need to rename them to *.elf files and pass the correct DHCP filename option for those architectures. Reported as #16706