Actions
Bug #27550
closedGenerate grub2 config also in grub2/grub.cfg-aa:bb:cc:dd:ee:ff form
Description
Grub2 on non-Red Hat systems does not automatically load per-MAC configuration files. We simulated that behavior using a hack:
# To load MAC-based config explicitly, a MAC address separated by dash chars is needed. # Also due to bug in RHEL 7.4 files are loaded with an extra ":" character at the end. # This workarounds both cases, make sure "regexp.mod" file is present on the TFTP. # For more info see: https://bugzilla.redhat.com/show_bug.cgi?id=1370642#c70 insmod regexp regexp --set=1:m1 --set=2:m2 --set=3:m3 --set=4:m4 --set=5:m5 --set=6:m6 '^([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})\: +([0-9a-f]{1,2})\:([0-9a-f]{1,2})\:([0-9a-f]{1,2})' "$net_default_mac" mac=${m1}-${m2}-${m3}-${m4}-${m5}-${m6} configfile=/grub2/grub.cfg-01-$mac source "$configfile"
I have found this hack no longer works in HTTP UEFI Boot mode. It's much cleaner to generate the configuration filename in expected way than doing this terrible hack, so this ticket is adding additional file generated by TFTP module. Now two are generated for PXEGrub2:
- "grub2/grub.cfg-01-aa-bb-cc-dd-ee-ff"
- "grub2/grub.cfg-aa:bb:cc:dd:ee:ff" (this one is new)
The hack can be now simplified to:
source "/grub2/grub.cfg-$net_default_mac"
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/670 added
Updated by Ewoud Kohl van Wijngaarden over 5 years ago
- Target version set to 1.24.0
Updated by Anonymous over 5 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 7d0053a54fa76a9a1172753b0deb921566fa99fd.
Actions