Hmm can you do the search and then echo $chroot? It looks like the search command is not setting the variable correctly? The last time you executed it returned it twice. I am going to test this locally in libvirt just to see if it returns the same thing.
TODO: Need to reinstall my “centos8-efi-default” VM it no longer works
That’s exactly what the teamplate does. Try this yourself, edit the template in /var/lib/tftpboot/grub2/grub.cfg-MAC_ADDRESS to this contents. Our default template is little bit more complex - it tries to find different OSes… but it does the same thing.
One of these which I don’t remember is relevant for your version. So probably both.
But your chainloader command does not work, which is weird. It works for me. I am out of ideas. I asked our grub2 engineer but I can’t reproduce this so I can’t help you.
Here more details to report :
guestOS : rhel 8.5
Foreman 3.2
vmware 7
templates used : PXEGrub2 UEFI
The guest build is Ok and it goes to net boot with the pxegrub2_chainload which fails : error: ../../grub-core/commands/search.c296:no such device:
if i change the boot order to disk : system boot is Ok
if i test in grub shell everything is fine looks ok but cant boot.
if i do a build of a guest on vmware 6.5 : chainload is Ok and system boot.
Sorry for the delay, this is a known issue in VMWare’s QuickBoot feature that was enabled by default in v7. Red Hat engineers are already working on a workaround for Grub2, it will be part of the next Fedora/RHEL versions, upstream users need to wait a bit longer as its slower to get patches in. Debian/Ubuntu users as well, in that case report this to those OSes to get patches in.
We are implementing a warning that will show up on the screen so people are aware:
echo "VMWare hosts with QuickBoot feature enabled may not find the local ESP"
echo "partition due to not initializing all the EFI devices. To workaround, upgrade"
echo "to the latest grub2 (*) and uncomment "connectefi scsi" statement in the"
echo "grub2_chainload template."
echo
echo "Virtual or physical hosts using Software RAID for the ESP partition may try"
echo "booting on the Software RAID, which will fail. To workaround, upgrade to the"
echo "latest grub2 (*) and add "--efidisk-only" argument to the "search" command in"
echo "the grub2_chainload template."
echo
echo "(*) grub2-efi-x64-2.02-122.el8 (upstream doesn't have the patches yet)"