Bug #35917
openPXE boot with GRUB2 fails, "linuxefi"and "initrdefi" deprecated
Description
"linuxefi"and "initrdefi" are not avaliable in RHEL8, Once foreman-installer copies grubx64.efi from the foreman host (supposedly RHEL8 on current foreman) to /var/lib/tftpboot/grub2 provisioning and discovery PXE GRUB2 boot fails. Since foreman in RHEL7 is deprecated the references to "linuxefi"and "initrdefi" should be removed from the templates.
Example patch attached.
Files
Updated by Zailo Leite almost 2 years ago
- File Kickstart_default_PXEGrub2.patch Kickstart_default_PXEGrub2.patch added
- Description updated (diff)
Updated by Ewoud Kohl van Wijngaarden almost 2 years ago
Reading the source, this should automatically happen already if the OS has a proper major version set. Your patch should have no effect on EL7+.
Can you share what the OS major is set to for you?
Updated by Zailo Leite almost 2 years ago
The foreman host is 8.7
I'm not sure if I follow. The default template creates an output like:
=====
if [ ${grub_platform} "pc" ]; then
menuentry 'Foreman Discovery Image' --id discovery {
linux boot/fdi-image/vmlinuz0 ${common}
initrd boot/fdi-image/initrd0.img
}
else
menuentry 'Foreman Discovery Image EFI' --id discovery {
linuxefi boot/fdi-image/vmlinuz0 ${common}
initrdefi boot/fdi-image/initrd0.img
}
fi
===
This will fail with with grubx64.efi from grub2-efi-x64-2.02-142 .
Updated by Zailo Leite almost 2 years ago
Typical error is:
error: …/…/grub-core/script/lexer.c:352:syntax error.
error: …/…/grub-core/script/lexer.c:352:Incorrect command.
Updated by Ewoud Kohl van Wijngaarden almost 2 years ago
I was asking about the Operating System as you have configured it in the application itself. Every host in Foreman is assigned an Operating System and that has a major version.
However, now that I reread it I wonder if the code is correct.
Either way, submitting it as a pull request on GitHub allows for proper discussion. Patches in Redmine typically get lost.