Project

General

Profile

Actions

Bug #35917

open

PXE boot with GRUB2 fails, "linuxefi"and "initrdefi" deprecated

Added by Zailo Leite almost 2 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Urgent
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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

Kickstart_default_PXEGrub2.patch Kickstart_default_PXEGrub2.patch 2.16 KB Zailo Leite, 01/10/2023 07:27 PM
Actions #1

Updated by Zailo Leite almost 2 years ago

  • Description updated (diff)
Actions #3

Updated by Zailo Leite almost 2 years ago

  • Description updated (diff)
Actions #4

Updated by Zailo Leite almost 2 years ago

  • Description updated (diff)
Actions #5

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?

Actions #6

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 .

Actions #7

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.

Actions #8

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.

Actions

Also available in: Atom PDF