Provisioning laptop

Problem:
I am trying to install an OS using Foreman. I set up a DHCP server on Mikrotik by setting Boot File Name: grub2/grubx64.efi. The laptop boots into grub2, but I don’t understand what to do after that. I created an operating system in Foreman and linked it to all pxegrub2 templates, and registered the laptop in Foreman by entering the Mac address
Expected outcome:
How Provisioning OS
Foreman and Proxy versions:
Version 3.4.0
Foreman and Proxy plugin versions:
|foreman_discovery|21.0.1|
|foreman_puppet||4.0.1|

have you configured foreman to provision the host ? what OS are you trying to provision onto the laptop ? what are the menu options you see in grub2 ?

Thank you, ikonia

What is mean configure foreman to provision? I install tftp-module, and make associations OS with all PXEGrub2 template.
I trying provisioning Debian 11.
In grub2 menu i see:
Chainload Grub2 EFI from ESP
Chainload into BIOS bootloader on first disk
Chainload into BIOS bootloader on second disk
Foreman Discovery Image EFI

and what happens when you select chainload Grub2 EFI

When I select it
Cainloading Grub2 EFI from ESP, enabled devices for booting:
(hd0) (hd0.gpt4) …
Trying /EFI/fedora/shim.efi.
error: no such device:/EFI/fedora/shim.efi.

Trying /EFI/Microsoft/boot/bootmgfw.efi
/EndEntire

so there is your problem, the EFI shim for booting your OS (to staart the installation is missing) in the tftp root does that file exist, if so what is the location

this is also worth reading too - I’m suffering a similar problem with a slightly different use case, but I suspect you may be impacted by this also

I thought these files were created by Foreman. There is no /efi directory in the /srv/tftp/ directory

user@foreman:~# ls -la /srv/tftp/
total 15064
drwxrwxrwx 8 root nogroup 4096 Oct 4 09:40 .
drwxr-xr-x 3 root root 4096 Sep 29 17:04 …
drwxr-xr-x 2 foreman-proxy root 4096 Sep 29 17:04 boot
-rw-r–r-- 1 foreman-proxy root 25128 Sep 29 17:04 chain.c32
drwxr-xr-x 2 foreman-proxy root 4096 Sep 29 17:06 grub
drwxr-xr-x 2 foreman-proxy root 4096 Sep 29 17:04 grub2
-rw-rw-rw- 1 tftp tftp 1110 Sep 29 18:08 known_hosts
-rw-r–r-- 1 foreman-proxy root 119524 Sep 29 17:04 ldlinux.c32
-rw-r–r-- 1 foreman-proxy root 169552 Sep 29 17:04 libcom32.c32
-rw-r–r-- 1 foreman-proxy root 23524 Sep 29 17:04 libutil.c32
-rw-rw-rw- 1 tftp tftp 14917897 Sep 29 18:09 mainsw
-rw-r–r-- 1 foreman-proxy root 10972 Sep 29 17:04 mboot.c32
-rw-r–r-- 1 foreman-proxy root 26792 Sep 29 17:04 memdisk
-rw-r–r-- 1 foreman-proxy root 26228 Sep 29 17:04 menu.c32
drwxr-xr-x 2 foreman-proxy root 4096 Sep 29 17:04 poap.cfg
-rw-r–r-- 1 foreman-proxy root 42430 Sep 29 17:04 pxelinux.0
drwxr-xr-x 2 foreman-proxy root 4096 Sep 29 17:06 pxelinux.cfg
drwxr-xr-x 2 foreman-proxy root 4096 Sep 29 17:04 ztp.cfg