Refactor #21006
closedEnable workaround for broken grub2 in RHEL 7.4
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:
That will get the MAC and load correct file once it falls back to grub2.cfg.
Updated by Lukas Zapletal over 7 years ago
For the record the RHEL bugreport is at https://bugzilla.redhat.com/show_bug.cgi?id=1487107
Updated by Ewoud Kohl van Wijngaarden over 7 years ago
- Bugzilla link set to 1487107
Updated by The Foreman Bot over 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
Updated by Ewoud Kohl van Wijngaarden over 7 years ago
It could be and I'd also consider a backport to 1.15.
Updated by The Foreman Bot over 7 years ago
- Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/376 added
Updated by Anonymous about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset puppet-foreman_proxy|0dfe601438cf8b891d56112c5dc1ea92c6ae0885.
Updated by Stephen Benjamin over 6 years ago
- Related to Bug #24653: Grub workaround for RHEL 7.4 should be only for 7.4 added