grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] Allow protocol to be separated from host with a semicolo


From: Matthew Garrett
Subject: Re: [PATCH 4/4] Allow protocol to be separated from host with a semicolon
Date: Wed, 25 Jan 2017 01:00:32 -0800

On Tue, Jan 24, 2017 at 11:37 PM, Andrei Borzenkov <address@hidden> wrote:
> On Wed, Jan 25, 2017 at 10:16 AM, Matthew Garrett <address@hidden> wrote:
>> My experience is that configfile (http,example.com)grub/config works
>> as you'd expect it to, and that set
>> endpoint=$net_efinet0_dhcp_boot_file; configfile $endpoint does the
>> same. Am I hitting some corner case where things are being incorrectly
>> parsed and so giving me unintended functionality?
>>
>
> When grub starts it tries to determine device and path it was booted
> from. For network boot it currently means examining DHCP ACK packet
> that is normally provided by firmware and setting device to
> tftp,$next_ip and path to $bootfile. There is no provision to set
> protocol to anything else nor to parse $bootfile to extract
> protocol/server.
>
> If you speak about "configfile something" you are past this point so
> DHCP $bootfile option is not relevant at all.

The variable is accessible to any configuration file that was built
into the grub binary, so it's still very relevant. Our flow is to have
the firmware DHCP and obtain grub, then have grub send a new DHCP
request with a different user agent (see previous patch) and obtain a
new bootfile.

>> How are custom DHCP options handled? I can't find anything in the
>> documentation about them being interpreted, and a quick look at the
>> code only shows it setting known variables.
>
> You have net_get_dhcp_option to fetch arbitrary option value from DHCP
> ACK packet and put it in variable for further processing. I'm
> definitely open to improving this command to make it more useful if it
> turns out lacking something.

Hm. In theory sticking everything in option 43 and parsing it out in
the config is possible - in practice the only reason that would be
necessary right now is that grub uses the same separator as dnsmasq,
and a trivial patch to grub would make it much easier to provide
configuration on the dnsmasq command line.



reply via email to

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