[ipxe-devel] ipxe configuration files, forum

Michael Brown mbrown at fensystems.co.uk
Thu Mar 31 16:53:39 UTC 2011

On Thursday 31 Mar 2011 16:00:52 AT - HE wrote:
> can ipxe the ability to read and interpret a text config file during
> execution time ? .. this way you can, say, compile with
> <snip>
> (client screen)
> pxe loader
> requesting ip from dhcp
> found, assigned ip
> retrieving file undionly.kpxe ... ok
> running
> welcome to ipxe blah blah
> requesting config file default.ipxe ... ok
> requesting config file 2nd_stage.ipxe ... ok
> etc.

There is no "include" command, but the "chain" command will do pretty much 
what you want, since it allows you to run a script from inside another script.  
See http://ipxe.org/cmd/chain for details.

One thing to watch out for is that the script will remain loaded after it 
returns.  You may need to use the "imgfree" command 
(http://ipxe.org/cmd/imgfree) to free up the script after it returns, so that 
it doesn't confuse later stages of booting.

I might add a "--free" option to "chain" at some point, so that it 
automatically frees the chained script when it returns, but for now you must 
use "imgfree".

> can ipxe the ability to handle variables names in real time ? ... this way
> you can do
> # cat myboot.ipxe
> #!ipxe
> dhcp
> chain http://${TFTP_IP}/ipxeboot

Yes.  The TFTP server address is available as ${next-server}.  The list of 
settings supported by iPXE is available at


though most of the individual settings within this list are not yet 
documented.  You can use the "config" command (http://ipxe.org/cmd/config) to 
browse the available settings interactively.  For example, if you type

  iPXE> dhcp
  DHCP (net0 52:54:00:12:34:56)... ok
  iPXE> config

then you will see a screen such as


where you can explore all of the available settings.

> - what are http headers (or querystring) sended by ipxe? .. mac address?,
> client ip, ipxe version, machine achitecture? (i.e.: to handle with server
> scripting)

You can include whatever information you want within the HTTP query string.  
For example, if you want to pass the MAC address to the server, you could 
direct iPXE to fetch the URL


There is an example of this in the online documentation at


> - what are response headears handled by ipxe? .. "301 location moved"?
> (i.e.: to do redirections, chainloads)

iPXE should correctly handle any response that you are likely to see in 
practice, including redirections.

> i am trying to boot an iso image with pxe but is sooo damn slow .. i would
> like to do with pxe to load ipxe first, and then doing with http .. but i
> would like to ipxe become easier to use, fast, and flexible, avoiding the
> need to recompile with every change

If you configure your DHCP server to direct iPXE to boot from a script, then 
you can change the script without having to recompile iPXE.  For example, if 
your DHCP server is configured to do something like:

  if exists user-class and option user-class = "iPXE" {
      filename "http://${next-server}/default.ipxe";
  } else {
      filename "undionly.kpxe";

then you can just use the standard prebuilt iPXE binary from


You should find that PXE chainloads into iPXE (undionly.kpxe), which then 
downloads and runs the script "default.ipxe" via HTTP.  You can edit the 
contents of default.ipxe in a text editor, with no need to recompile the iPXE 

> please consider to implement a forum .. all we have always access to web,
> but not all have access to email all the time, is slower and less massive
> though.. web is more accessible and popular than irc, and if you are not
> online you can read messages later (or get alerted by email) .. there are
> plenty of oss forum engines, like smf and phpbb, or forum server hosts

You should be able to access the iPXE mailing list via Gmail or any other web-
based e-mail client.  The list is archived online in several places, including


There is a web-based interface to the Freenode IRC network at


I wouldn't personally monitor a web-only forum, because it doesn't fit into my 
way of working.  If you can point me at any forum software that provides two-
way integration with a mailman mailing list (and which would provide 
equivalent spam protection), then I'll take a look at setting it up.


More information about the ipxe-devel mailing list