help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Valid grub.conf locations


From: Andrei Borzenkov
Subject: Re: Valid grub.conf locations
Date: Mon, 19 Jun 2023 17:05:36 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

On 19.06.2023 12:46, Ulrich Sibiller wrote:
Hello,

I am wondering where grub is supposed to look for grub.cfg when booted
via PXE as grubx64.efi (or bootx64.efi)?

Background: I have been playing around with running shredos
(https://github.com/PartialVolume/shredos.x86_64) over the network via
PXE. I failed with the bootx64.efi (which is grub2) coming with
shredos because it does not find grub.conf when booted via PXE/tftp.
It just checks /EFI/BOOT/grub.conf in this case. The grub in shredos
is built via GNU's buildroot using the official grub sources.

So I tried with grubx64.efi as delivered by Centos7 and succeeded.
This grubx64.efi loads grub.conf - amongst other locations - from the
same path where the .efi file has been found:

Jun 15 14:10:33 server in.tftpd[31076]: RRQ from 192.168.11.15
filename cluster/shredos/bootx64.efi
Jun 15 14:10:33 server in.tftpd[31076]: Client 192.168.11.15 finished
cluster/shredos/bootx64.efi
...
Jun 15 14:10:40 server in.tftpd[31097]: RRQ from 192.168.11.15
filename cluster/shredos/grub.cfg
Jun 15 14:10:40 server in.tftpd[31097]: Client 192.168.11.15 finished
cluster/shredos/grub.cfg

I think that the centos7 build works because it is patched to check
the fw_path variable. The official sources seem to not contain fw_path
at all.

(if you want to know more details all this is described in some length
at https://github.com/PartialVolume/shredos.x86_64/issues/147)

So is there a way to make the official grub look for grub.conf at the
same dir as the efi file when booting via PXE?


That is exactly what the official grub does when booted via PXE - as long as it was built to include networking support in the first place. And if $prefix is not hardcoded in core.efi. Without knowing how your grub binary is built it is hard to guess what could be wrong.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]