Grub2 (EFI) boot via PXE - Load Config File

Hello,

I´ve got a Problem booting my OS via Grub2 and don´t know where to address my problem, so I will describe it here.

Environment:
I´ve got a PXE-Boot Infrastructure and want to test PXE-Booting Grub2.efi via Network (TFTP).

Downloading the efi-file to the client works and grub gets loaded on the machine. - I can see the grub prompt “grub>” - I´m using Grub Version 2.00

I´ve created a Configfile (grub.cfg) and placed it in the same TFTP-Directory as the grub.efi file.
I can see from the TFTP-logs that grub gets downloaded - and obviously loaded on the client - and afterwards the grub.cfg get downloaded by grub.

My grub.cfg looks as follows:
set root=(hd0,gpt1)
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
boot

Minimalistically I just want to boot Windows by grub. - Please don´t ask why, that takes too long to describe…

I would expect that grub “finds” the downloaded grub.cfg file and loads the Windows-OS.

What happens: I just get thrown to the grub-prompt…

When I load the grub.cfg from the grub-prompt via
configfile /grub.cfg

the OS gets loaded perfectly. - So the seems to be OK so far.

So my problem is, how can I say grub to load the configfile? - Do you have any hint? - I´m stuck right now…

I just could isolate the problem a little bit more.

As I assumed, the configfile doesn´t get loaded. When I try to show the contents of the grub.cfg with cat in the grub shell, nothing is displayed.

Hey,

did you put it into the correct directory? Pastebin the whole TFTP log from the transaction. Can you download the file using TFTP client? What happens when you manually try to do configfile grub.cfg (without the slash character).