Project

General

Profile

Actions

Refactor #21006

closed

Enable workaround for broken grub2 in RHEL 7.4

Added by Lukas Zapletal over 6 years ago. Updated over 6 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

Also available in: Atom PDF