Discovery 4.1.0 fails with can't allocate initrd

Problem:

Foreman discovery version 4.1.0 (same when testing 4.0.3) fails with:

image

And finally ends with:

Grub2 files are well uploaded:

PXE-menu:

image

Edit:

image

OS (Rocky), Foreman and Katello have been upgraded 1 month ago to version 3.5 / 4.7.

This is running on a Rocky Linux 8:
Rocky Linux release 8.7 (Green Obsidian)

Kernel-version:
4.18.0-425.10.1.el8_7.x86_64

The package-version for grub2-efi-x86 and grub2-efi-x64-modules are (updated today):

grub2-efi-x64-modules-2.02-142.el8_7.3.rocky.0.2.noarch
grub2-efi-x64-2.02-142.el8_7.3.rocky.0.2.x86_64

Expected outcome:

Working discovery

Foreman and Proxy versions:

Foreman 3.5 / Katello 4.7

Foreman and Proxy plugin versions:

Distribution and version:

Rocky Linux release 8.7 (Green Obsidian)
Kernel:
4.18.0-425.10.1.el8_7.x86_64

Other relevant data:

Update:

Just tried the use of the image fdi-4.1.0-24d62de.iso, and then it works well.

Anyone who can help me to fix the PXE Discovery?

Hi,

the following workaround might help you:

@Jan ,
Thnx.

As we also upgraded Rocky to version 8.7 the grub464.efi was also changed which I copied to /var/lib/tftpboot/grub2/

This new grubx64.efi has a different size then the one in Index of /pub/rocky/8/BaseOS/x86_64/kickstart/EFI/BOOT/

Rocky 8.7 grubx64.efi:
-rwx------. 1 root root 2214336 Feb 21 21:58 grubx64.efi
from the URL:
-rw-r–r–. 1 foreman-proxy root 2211776 Mar 28 09:53 /var/lib/tftpboot/grub2/grubx64.efi

So I replaced it with the one from the URL and then the PXE-discovery works again.

Conclusion, the discovery image version 4.1.0 does not work anymore with the new grubx64.efi after upgrading Rocky to version 8.7.

Yeah, replacing GRUB2 binary can help here. That was also my first approach but I wasn’t lucky with latest Ubuntu one instead of old CentOS7 GRUB2.

Keep in mind that whenever you call foreman-installer the /var/lib/tftpboot/grub2/grubx64.efi will be replaced again by the one of the system (in your case Rocky 8.7).

@Jan ,
Indeed.
I hope a new fixed version of the discovery iso will follow soon.
And that it will work also for Rocky/Alma 9.

Meanwhile I have a workaround to apply when we upgrade to the latest OS/Foreman version(s).

This is not really a FDI issue rather than a GRUB2 issue.

The problem with FDI over network is, that by default initrd contains rootfs and becomes bigger and bigger over time/version. And from several bugreports I read that GRUB2 has problems when allocating memory for huge files.

You could now start to slim down the rootfs of the FDI in order to shrink initrd size. But this approach would limit the service because of missing drivers etc.

Therefor I came up with this workaround where initrd only is loaded by GRUB2 and the rootfs is then loaded separately by the Linux system.