Feature #16652

UEFI Grub2 support for non-intel architectures

Added by Lukas Zapletal 5 months ago. Updated 5 months ago.

Status:Closed
Priority:Normal
Assigned To:Lukas Zapletal
Category:Orchestration
Target version:Team Daniel - iteration 3
Difficulty:easy Bugzilla link:1376191
Found in release: Pull request:https://github.com/theforeman/foreman/pull/3878
Story points-
Velocity based estimate-
Release1.13.1Release relationshipAuto

Description

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 -d /usr/lib/grub/powerpc-ieee1275 -o /root/grubppc64.efi -p "" all_video boot btrfs cat configfile echo 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

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:

https://github.com/theforeman/foreman/blob/develop/app/models/architecture.rb

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


Related issues

Related to Foreman - Bug #16706: Rename POWER DHCP filenames to elf New 09/27/2016
Duplicates Foreman - Bug #16734: DHCP sets incorrect server.filename for Power Clients. Duplicate 09/28/2016

Associated revisions

Revision 4f5adf65
Added by Lukas Zapletal 5 months ago

Fixes #16652 - UEFI Grub2 support for non-intel archs

History

#1 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman/pull/3878 added

#2 Updated by Lukas Zapletal 5 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Lukas Zapletal 5 months ago

  • Bugzilla link set to 1376191

#4 Updated by Dominic Cleal 5 months ago

  • Release set to 1.13.1

#5 Updated by Lukas Zapletal 5 months ago

  • Description updated (diff)

Updated the mkimage command, tested on POWER7.

#6 Updated by Lukas Zapletal 5 months ago

  • Related to Bug #16706: Rename POWER DHCP filenames to elf added

#7 Updated by Dominic Cleal 5 months ago

  • Release changed from 1.13.1 to 1.14.0

#8 Updated by Lukas Zapletal 5 months ago

  • Release changed from 1.14.0 to 1.13.1

Can we keep the 1.13.1 version please? The referenced issue is minor and I won't make any effort to backport it into 1.13. I am ready for commitment with helping backporting and maintaining the 1.13 branch.

#9 Updated by Dominic Cleal 5 months ago

The referenced issue will cause a behaviour change if it's applied, which means it should be fixed before this is shipped in 1.13.1 to prevent different minor versions requiring different filenames. If you wait to fix it then it'll be more of a problem than if it's changed before.

#10 Updated by Lukas Zapletal 5 months ago

  • Duplicates Bug #16734: DHCP sets incorrect server.filename for Power Clients. added

#11 Updated by Lukas Zapletal 5 months ago

I was not going to propose the referenced ticket for 1.13 at all. That one can wait, but this small patch allows POWER architectures.

#12 Updated by Daniel Lobato Garcia 5 months ago

  • Target version set to Team Daniel - iteration 3

Also available in: Atom PDF