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: Mon, 19 Oct 2009 12:59:46 -0700 (PDT)
User-agent: Alpine 2.00 (GSO 1167 2008-08-23)

Hi,

  Solaris has adopted the following search path for configuration files:

 (1) DHCP Option 150
 (2) menu.lst.01<MACADDR> (i.e. menu.lst.01XXXXXXXXXXXX)
 (3) menu.lst.<BootFile> (where BootFile is the DHCP server-specified BootFile
     option)
 (4) menu.lst

This has served use and our customers very well and it would be great if GRUB2 could adopt this scheme as well (I'm working on a patch).

 Thanks,
 --S

Quoting Brendan Trotter, who wrote the following on Tue, 20 Oct 2009:

Hi,

On Sat, Oct 17, 2009 at 4:42 AM, Pavel Pisa <address@hidden> wrote:
As for scalability, I agree, that use of single config file with checking
for each IP is horrible hack, but there is no problem to source
to another IP specific file (menu-xxx.xxx.xxx.xxx.lst) with separate
menu configuration when own IP is known and if file is not found
switch do default one.

So I strongly vote for a way to be able to use server IP provided
by DHCP/PXE.

I vote for using the ethernet card's MAC address (which never changes)
instead of whatever IP address the DHCP server felt like *dynamically*
assigning...

GRUB could (should?) download a configuration file from the TFTP
server that's called "123456789ABC.cfg" or "123456789ABC/grub.cfg"
(where "123456789ABC" is the ethernet card's MAC address) ; and if
that's not found it should try something like "default.cfg".

Putting the ethernet card's MAC address and the current IP address
into an environment variable (e.g. for use in command line parameters)
might be fun too.

Note 1: the easiest way to find the ethernet card's MAC address and
the computer's IP address is to use the "GET_CACHED_INFO" function
(opcode 7), with the Packet type field set to 2 (DHCP ACK from
server); because you need to use this function to find the IP address
of the TFTP server anyway.

Note 2: the name "your_ip" probably came from the PXE specification.


Cheers,

Brendan


_______________________________________________
Grub-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/grub-devel





reply via email to

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