[ipxe-devel] Chainloading from iPXE to other PXE servers

Michael Brown mbrown at fensystems.co.uk
Fri Mar 25 21:19:40 UTC 2011


On Friday 25 Mar 2011 18:14:11 Mike Sollanych wrote:
> I'm working on a project that aims to centralize deployment methods at a
>  university. iPXE is going to be the cornerstone of this effort.
> 
> One thing we'd like to be able to do is to allow various other IT
>  departments to use this central iPXE menu to boot to their existing PXE
>  servers (i.e. FOG, Ghost, Cobbler, etc). It seems like this should be
>  possible with chain command, and indeed it will go ahead and load a
>  PXELINUX image from another TFTP server, but when that image is launched,
>  it appears to be looking at the iPXE server to get the new pxelinux.cfg
>  file, not the newly supplied other PXE server.
> 
> Is there a good way to "bounce" off of iPXE and over to another PXE server?

You may need to override the DHCP-provided "next server" address in order to 
persude the subsequent pxelinux (or other NBP) that it should refer to a 
different server.  You can do this using the "set" command 
(http://ipxe.org/cmd/set) to set the "next-server" and/or "filename" variables, 
e.g.

  set next-server 192.168.0.1
  set filename boot/pxelinux.0
  chain tftp://${next-server}/${filename}

When the new NBP queries iPXE to establish where server it was loaded from, it 
will see the overridden values from next-server and filename, rather than the 
original DHCP-provided values.

For pxelinux (and only pxelinux), you can use DHCP options 209 and 210 to 
control the location of the pxelinux.cfg file.

> Alternately, we may be able to solve *most* of this problem if we could use
>  iPXE variables (i.e. ${hostname}, ${mac}) inside of vesamenu.c32, so that
>  pointing at things like our FOG server (which generates MAC-specific
>  pxelinux.cfg files to perform 'tasks') could be done in a dynamic fashion.
> 
> If there's a way to do either of these, please let me know.

There isn't yet, but it sounds useful.  We currently perform settings 
expansion when parsing the DHCP-provided filename and root-path.  We could 
pretty easily also expand filenames received via the PXE FILE API.  Could you 
try the attached (untested) patch, and see if it does what you need?

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipxe-expand-pxe-file.patch
Type: text/x-patch
Size: 1478 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20110325/a2a9005b/attachment.bin>


More information about the ipxe-devel mailing list