grub-devel
[Top][All Lists]
Advanced

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

Re: Using network informations from PXE as grub2 enviroment variables


From: Seth Goldberg
Subject: Re: Using network informations from PXE as grub2 enviroment variables
Date: Fri, 16 Oct 2009 14:16:43 -0700 (PDT)
User-agent: Alpine 2.00 (GSO 1167 2008-08-23)



Quoting Vladimir 'phcoder' Serbinenko, who wrote the following on Fri, 16...:

Seth Goldberg wrote:
Hi,

Quoting Pavel Pisa, who wrote the following on Fri, 16 Oct 2009:

Nobody can't use options 150 from DHCP, because GRUB2 don't have any
driver for network adapters. Network task are done only through
adapters PXE firmware. PXE passes informations only about IP
addresses, but no DHCP options.

  Not true -- all DHCP options are available by inspecting the cached
DHCPACK that is available from a call to PXE firmware.  This is a
stable interface and works quite well.  In fact, we enhanced the
Legacy GRUB we use in Solaris to pass the entire DHCPACK via the
multiboot structure (albeit in a non-standard way -- and I'd like to
rectify that by including the DHCPACK in the multiboot structure
explicitly) so it can be used by the kernel.
Since you are familiar with networking and PXE could you make a
multiboot amendment proposal? It has to be
(a) expandable to new network interfaces (not only PXE), it includes the
necessity of passing info pertatining to multiple adapters and a way to
match this info to adapters (I think MAC is good for this)
(b) possibility to add custom information, not only what is specified by
DHCP standard. Vendor info encapsulation is perhaps a way. I'm not sure
we'll ever need this but I would like to have this possibility if we
ever need it

We'll need a flag bit indicating the presence of network boot information. After that, define a field that's a pointer to a structure of the form:

struct netbootinfo {
        int     type;   /* 0 = PXE; 1 = RARP/BOOTP */
        void    *data;  /* Pointer to the boot-protocol-specific data */
                        /* In the PXE case, that's a DHCPACK frame; */
                        /* In the RARP/BOOTP case, it's a BOOTP reply */

        struct netbootinfo *next;       /* Link to next netbootinfo structure */
};

I know you don't like linked lists/pointers in the multiboot structure, so we can specify an array of these structures, but that's a bit inefficient (and embedding a union of types could waste even more space).

 --S




reply via email to

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