[gPXE] Using gPXE to parse a text file for information or commands (Static IP PXE boot solution).

DZ dz.internet at live.com
Thu Sep 2 00:31:03 EDT 2010


I wanted to see if it was possible for gPXE to parse a text file to populate
variables that can be used with an "Embedded Image" (ex.
http://etherboot.org/wiki/scripting) or to read and execute gPXE command
lines.  The text file will contain network information.  High level I was
thinking something like this for the text file:

 

Variable Option:

192.168.1.1

255.255.255.0

192.168.1.0

Etc.

 

If gPXE could read these into variables, I believe I could use this ex.
http://etherboot.org/wiki/scripting .  Obviously substituting the network
information out for the variables gPXE read in.

 

-OR-

 

Command Line Option:

set net0/ip 10.0.2.15

set net0/netmask 255.255.255.0

set net0/gateway 10.0.2.2

Etc.

 

If gPXE can parse a line of text and then execute it, I believe this would
solve my issue as well.

 

So why am I trying to do this. DHCP/DNS are tightly controlled by another
organization and still to this day DHCP/PXE will not be provided in a Data
Center environment.  What I want to do is have a static compiled version of
a gPXE ISO where I can programmatically inject a text file into, that
contains the appropriate network information for the server I'm about to
build.  A little background of how we do it now high level.  We have a
website that lists all the servers we own.  A user will select a server to
build and all the network information is pulled from a database.  Then a
script creates a WinPE ISO and injects server specific information (i.e.
network information).  It then injects the WinPE ISO into the out of band
card (ex. iLO), boots/reboots the server, the server boots off the WinPE
ISO, and builds the server.  Basically I want to do the same thing with
gPXE.  Select server; script injects text file into gPXE ISO, ISO is
injected into out of band card, server is powered on/rebooted, and server
PXE boots.

 

Any help would be appreciated!  Thanks.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe/attachments/20100901/57bb555e/attachment.html 


More information about the gPXE mailing list