Hi, we also observed this behavior on a HP ProBook 450 G8 laptop with FDI v4.1.0.
With the default GRUB2 from CentOS7 (v2.02) we also got “can’t allocate initrd”, with a more recent version of GRUB2 (v2.06, Ubuntu) we got “out of memory”. Booting Ubuntu 20.04 kernel+initrd worked with both.
According to Bug #1970402 “Initrd out of memory error after upgrade to 22.04” : Bugs : initramfs-tools package : Ubuntu it looks like initrd is too big and GRUB2 does not allocate enough space for it. The size of the initrd is that big (~500M) because it contains the roofs.
As workaround could be to use rootfs-less initrd and load rootfs separately from webserver:
# wget https://downloads.theforeman.org/discovery/releases/latest/fdi-4.1.0-24d62de.iso
# mount fdi-4.1.0-24d62de.iso /mnt/
# mkdir /var/lib/tftpboot/boot/fdi-image-slim
# cp /mnt/isolinux/{vmlinuz,initrd.img} /var/lib/tftpboot/boot/fdi-image-slim/
# umount /mnt
# mkdir /var/www/html/pub/fdi-image-slim
# cp fdi-4.1.0-24d62de.iso /var/www/html/pub/fdi-image-slim
# ln -sr /var/www/html/pub/fdi-image-slim/fdi-4.1.0-24d62de.iso /var/www/html/pub/fdi-image-slim/fdi.iso
# cat >> /var/lib/tftpboot/grub2/grub.cfg <<'EOF'
common_slim="rootflags=loop root=live:http://<foreman-fqdn>/pub/fdi-image-slim/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nokaslr nomodeset proxy.url=https://<foreman-fqdn> proxy.type=foreman BOOTIF=01-$net_default_mac ip=dhcp"
menuentry 'Foreman Discovery Image EFI Slim' --id discovery {
linuxefi boot/fdi-image-slim/vmlinuz ${common_slim}
initrdefi boot/fdi-image-slim/initrd.img
}
EOF
Replace <foreman-fqdn>
accordingly. ISO can only be fetched via HTTP (missing CA in the initrd). The parameter ip=dhcp
is mandatory to bring up network for fetching the ISO. The plain initrd has a size of ~43M which looks promising.