Bug #35917
Updated by Zailo Leite over 2 years ago
"linuxefi"and "initrdefi" are not avaliabel 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 teh templates. Example patch: ======== --- 1 2023-01-10 10:50:43.638865537 -0800 +++ 2 2023-01-10 10:53:52.863340608 -0800 @@ -20,19 +20,6 @@ - host6static -%> # This file was deployed via '<%= template_name %>' template -<% - rhel_compatible = @host.operatingsystem.family == 'Redhat' && @host.operatingsystem.name != 'Fedora' - os_major = @host.operatingsystem.major.to_i - - if (rhel_compatible && os_major < 7) || !@host.pxe_loader_efi? - # Grub EFI commands are RHEL7+ only (prevents "Kernel is too old") or for non-EFI arch - linuxcmd = "linux" - initrdcmd = "initrd" - else - linuxcmd = "linuxefi" - initrdcmd = "initrdefi" - end --%> set default=<%= host_param('default_grub_install_entry') || 0 %> set timeout=<%= host_param('loader_timeout') || 10 %> @@ -53,8 +40,8 @@ -%> <% if proxy_http_port -%> menuentry '<%= template_name %> EFI HTTP' --id efi_http { - <%= linuxcmd %> (http,<%= proxy_host %>:<%= proxy_http_port %>)/httpboot/<%= @kernel %> <%= pxe_kernel_options %> <%= snippet("kickstart_kernel_options").strip %> - <%= initrdcmd %> (http,<%= proxy_host %>:<%= proxy_http_port %>)/httpboot/<%= @initrd %> + linux (http,<%= proxy_host %>:<%= proxy_http_port %>)/httpboot/<%= @kernel %> <%= pxe_kernel_options %> <%= snippet("kickstart_kernel_options").strip %> + initrd (http,<%= proxy_host %>:<%= proxy_http_port %>)/httpboot/<%= @initrd %> } <% else -%> # Smart proxy does not have HTTPBoot feature with HTTP port enabled, skipping EFI HTTP boot menu entry @@ -62,8 +49,8 @@ <% if proxy_https_port - %> -%> menuentry '<%= template_name %> EFI HTTPS' --id efi_https { - <%= linuxcmd %> (https,<%= proxy_host %>:<%= proxy_https_port %>)/httpboot/<%= @kernel %> <%= pxe_kernel_options %> <%= snippet("kickstart_kernel_options").strip %> - <%= initrdcmd %> (https,<%= proxy_host %>:<%= proxy_https_port %>)/httpboot/<%= @initrd %> + linux (https,<%= proxy_host %>:<%= proxy_https_port %>)/httpboot/<%= @kernel %> <%= pxe_kernel_options %> <%= snippet("kickstart_kernel_options").strip %> + initrd (https,<%= proxy_host %>:<%= proxy_https_port %>)/httpboot/<%= @initrd %> } <% else -%> # Smart proxy does not have HTTPBoot feature with HTTPS port enabled, skipping EFI HTTPS boot menu entry ========