All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Matthew Garrett <mjg59@coreos.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 4/4] Allow protocol to be separated from host with a semicolon
Date: Wed, 25 Jan 2017 10:37:09 +0300	[thread overview]
Message-ID: <CAA91j0XHgMG++HVA7D907HrVrgtY6ZcjjUERo56_+Rev+PW44g@mail.gmail.com> (raw)
In-Reply-To: <CAPeXnHvdiFSV39LhHbLKsZghm-2rVMu-as7fmeuZKJbXq4JiyA@mail.gmail.com>

On Wed, Jan 25, 2017 at 10:16 AM, Matthew Garrett <mjg59@coreos.com> wrote:
> On Tue, Jan 24, 2017 at 10:56 PM, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>> On Wed, Jan 25, 2017 at 7:25 AM, Matthew Garrett <mjg59@coreos.com> wrote:
>>> If prefix isn't set then won't bootfile be interpreted as the device plus file?
>>>
>>
>> No. That would mean "parsing URI" that I mentioned.
>
> 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.

>>> We need the ability to pass port as well, so that would still be insufficient.
>>
>> Good. So start with design proposal that is extensible enough.
>>
>> But TBH - all of this can already be implemented using grub scripting.
>> Use custom DHCP options or parse bootfile using regex. No code changes
>> is needed - we support generic scripting for a reason.
>
> 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.


  reply	other threads:[~2017-01-25  7:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24  0:35 Misc network boot patches Matthew Garrett
2017-01-24  0:35 ` [PATCH 1/4] Allow non-default ports for HTTP requests Matthew Garrett
2017-01-29  6:50   ` Andrei Borzenkov
2017-01-24  0:35 ` [PATCH 2/4] Send a user class identifier in bootp requests and tag it as DHCP discover Matthew Garrett
2017-01-24  6:09   ` Michael Marineau
2017-01-24  0:36 ` [PATCH 3/4] Don't allocate a new address buffer if we receive multiple DNS responses Matthew Garrett
2017-01-24  3:55   ` Andrei Borzenkov
2017-01-24 20:52     ` Matthew Garrett
2017-01-24  0:36 ` [PATCH 4/4] Allow protocol to be separated from host with a semicolon Matthew Garrett
2017-01-24  4:02   ` Andrei Borzenkov
2017-01-24 20:50     ` Matthew Garrett
2017-01-25  3:48       ` Andrei Borzenkov
2017-01-25  4:06         ` Matthew Garrett
2017-01-25  4:15           ` Andrei Borzenkov
2017-01-25  4:25             ` Matthew Garrett
2017-01-25  6:56               ` Andrei Borzenkov
2017-01-25  7:16                 ` Matthew Garrett
2017-01-25  7:37                   ` Andrei Borzenkov [this message]
2017-01-25  9:00                     ` Matthew Garrett
2017-01-25  6:18       ` Michael Chang
2017-01-25  6:21         ` Matthew Garrett
2017-01-25  8:35           ` Michael Chang
2017-01-25  9:02             ` Matthew Garrett
2017-01-25 17:30       ` Andrei Borzenkov
2017-01-25 23:33         ` Matthew Garrett
  -- strict thread matches above, loose matches on Subject: below --
2017-01-23 23:45 [PATCH 1/4] Allow non-default ports for HTTP requests Matthew Garrett
2017-01-23 23:45 ` [PATCH 4/4] Allow protocol to be separated from host with a semicolon Matthew Garrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA91j0XHgMG++HVA7D907HrVrgtY6ZcjjUERo56_+Rev+PW44g@mail.gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=mjg59@coreos.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.