Pressing "provision" and host reboots into discovery again

Problem:
Hi there, I am trying to get a new updated setup of Foreman up and running to deploy machines with UEFI and Windows 10.
The only issue I am facing now is that once pressing “provision” in the GUI the host to be deployed reboots but it just loads the discovery image again, eg nothing is being deployed.

Expected outcome:
Have Foreman start to format disk, deploy the WIM image etc

Foreman and Proxy versions:
3.6.1

Foreman and Proxy plugin versions:
3.6.1

Distribution and version:
Rocky Linux 8.7

Other relevant data:

Did I ask something really stupid here? :smiley:

Nobody with an idea here?

Just one to be sure, this is for discovered hosts, not rebuilding the host, right?

The only issue I am facing now is that once pressing “provision” in the GUI the host to be deployed reboots but it just loads the discovery image again, eg nothing is being deployed.

What’s the content of the GRUB files, are they properly deployed?

I suggest to check Debugging provisioning tutorial, there are some instructions on how to investigate issues with the provisioning

1 Like

OK, seems there was mess with Rocky Linux and paths…
I re-installed the VM with CentOS 8 Stream. Looking better. Now I am only stuck at finding right templates for deployment I guess.

This might be helpful: Types of prov. templates

1 Like

@lstejska this seems to work better already…but not sure what could be causing this now…

Maaaan

I had the same issue, for me it was an issue with unfinished download of <os>-initrd.img and <os>-vmlinuz files in /var/lib/tftpboot/boot/

1 Like

locate *.img
only gives me:

/boot/initramfs-0-rescue-3689499995dc4a5482196936a7ee4ea9.img /boot/initramfs-4.18.0-486.el8.x86_64.img /boot/initramfs-4.18.0-486.el8.x86_64kdump.img /usr/lib/firmware/RTL8192E/boot.img /usr/lib/firmware/RTL8192E/data.img /usr/lib/firmware/RTL8192E/main.img /usr/lib/firmware/mediatek/mt8183/scp.img /usr/lib/firmware/mediatek/mt8186/scp.img /usr/lib/firmware/mediatek/mt8192/scp.img /usr/lib/firmware/mediatek/mt8195/scp.img /usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw-v2.0.img /usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw-v3.0.img /usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw-v4.0.img /usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw-v4.1.img /usr/lib/firmware/mrvl/prestera/mvsw_prestera_fw_arm64-v4.1.img /usr/lib/grub/i386-pc/boot.img /usr/lib/grub/i386-pc/boot_hybrid.img /usr/lib/grub/i386-pc/cdboot.img /usr/lib/grub/i386-pc/diskboot.img /usr/lib/grub/i386-pc/kernel.img /usr/lib/grub/i386-pc/lnxboot.img /usr/lib/grub/i386-pc/lzma_decompress.img /usr/lib/grub/i386-pc/pxeboot.img /usr/lib/grub/x86_64-efi/kernel.img /var/lib/tftpboot/boot/fdi-image/initrd0.img

Am I missing something fundamental (again)?¿

-rw-r–r–. 1 foreman-proxy root 500M Jul 19 2022 /var/lib/tftpboot/boot/fdi-image/initrd0.img

This seems correct? Maybe it’s just the path/name being an issue?

FWIW:

  echo "Trying /EFI/centos/grubx64.efi "
  unset chroot
  # add --efidisk-only when using Software RAID  
  search --file --no-floppy --set=chroot /EFI/centos/grubx64.efi
  if [ -f ($chroot)/EFI/centos/grubx64.efi ]; then   
    chainloader ($chroot)/EFI/centos/grubx64.efi
    echo "Found /EFI/centos/grubx64.efi at $chroot, attempting to chainboot it..."
    sleep 2
    boot
  fi

This is found in the /var/lib/tftpboot/grub2/grub.cfg-ac:1f:6b:70:fb:6d that gets generated for the PC I am trying to boot.

Where is the $chroot here? Because such folder structure can only be found here:
/boot/efi/EFI/centos/grubx64.efi

And this is not the path where TFTP accesses files?!

Sorry for mutliple posts, forums would not let me edit them after a short period of time already

Hi.

The $chroot is set by the search line above to disk+partition identifier (e.g. hd0,gpt1) where a file under /EFI/centos/grubx64.efi was found. This is GRUB2’s way to find & boot installed systems before booting discovery image as fallback. Inside Linux system it’s /boot/efi/EFI/... because this partition is mounted.

So looks like GRUB2 and its configuration file, which was successfully loaded from your TFTP server, has issues finding and booting either the ESP (EFI Service Partition) or the kernel.

Can you directly boot the installed system (no network boot)?