Project

General

Profile

Actions

Refactor #21006

closed

Enable workaround for broken grub2 in RHEL 7.4

Added by Lukas Zapletal almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Grub2 have a regression when MAC-based loading of configs does not work, due to string manipulation in Red Hat patches MAC always ands with ":" or "-" character:

RRQ from 10.87.1.231 filename /grub2/grub.cfg-01-96-48-EE-44-80-43-

The correct path is:

RRQ from 10.87.1.231 filename /grub2/grub.cfg-01-96-48-EE-44-80-43

We file a bug and RH team is going to fix this, but we need a workaround as more and more users are hitting this. In order to have that workaround, we need regexp module which is unfortunately not present in grub2 build. Instead of copying the grub2 from EFI directory, we can refactor our puppet code to build the grub2 like debian does:

/usr/bin/grub2-mkimage -O x86_64-efi -d /usr/lib/grub/x86_64-efi -o /var/lib/tftpboot/grub2/grubx64.efi -p '' all_video boot btrfs cat chain configfile echo efifwsetup efinet ext2 fat font gettext gfxmenu gfxterm gfxterm_background gzio halt hfsplus iso9660 jpeg keystatus loadenv linux lsefi lsefimmap lsefisystab lssal memdisk minicmd normal part_apple part_msdos part_gpt password_pbkdf2 png reboot search search_fs_uuid search_fs_file search_label sleep test true video zfs zfscrypt zfsinfo linuxefi lvm mdraid09 mdraid1x raid5rec raid6rec tftp regexp

Then the workaround is to use updated grub2 global template:

https://github.com/lzap/community-templates/blob/f21c8b275737243533d9b9d7c856e35fa988859b/provisioning_templates/PXEGrub2/pxegrub2_global_default.erb

That will get the MAC and load correct file once it falls back to grub2.cfg.


Related issues 1 (0 open1 closed)

Related to Installer - Bug #24653: Grub workaround for RHEL 7.4 should be only for 7.4ClosedStephen BenjaminActions
Actions #1

Updated by Lukas Zapletal almost 7 years ago

For the record the RHEL bugreport is at https://bugzilla.redhat.com/show_bug.cgi?id=1487107

Actions #2

Updated by Ewoud Kohl van Wijngaarden almost 7 years ago

  • Bugzilla link set to 1487107
Actions #3

Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ewoud Kohl van Wijngaarden
  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/374 added
Actions #4

Updated by Daniel Lobato Garcia almost 7 years ago

Lukas, Ewoud, 1.16 blocker?

Actions #5

Updated by Ewoud Kohl van Wijngaarden almost 7 years ago

It could be and I'd also consider a backport to 1.15.

Actions #6

Updated by The Foreman Bot almost 7 years ago

  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/376 added
Actions #7

Updated by Anonymous almost 7 years ago

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

Updated by Stephen Benjamin almost 6 years ago

  • Related to Bug #24653: Grub workaround for RHEL 7.4 should be only for 7.4 added
Actions

Also available in: Atom PDF