[ipxe-devel] Problem chainloading iPXE from inside iPXE

Mike Sollanych msollany at sfu.ca
Thu Jun 9 16:25:32 UTC 2011


Hello again folks, 

Quick recap: running Syslinux on top of iPXE, wanting to chainload to
a FOG server running PXELINUX so as to boot a MAC-address specific config
file found in its tftproot/pxelinux.cfg directory.

My current attempt is to use SYSLINUX's 'pxechain' module.

After some talk with the SYSLINUX mailing list, here's what I've discovered,
thanks to Jeffrey Hutzelman:

> It's a little more complicated. 
> The response from the DHCP server doesn't contain a TFTP server _name_; 
> it contains the _address_ of the server to use. PXECHAIN does the 
> following: 

> - Parse the server::path you gave it 
> - Look up the server's address, if you gave a name 
> - Ask the PXE stack for the cached DHCP response 
> - Rewrite the next-server and bootfile fields in that response with 
> the new server address and filename 
> - Fetch the file you named and boot it (actually, we ask PXE to do this) 

> That last step does _not_ use the cached DHCP response -- it uses the 
> values you provided, passed in separately to the PXE "Restart TFTP" 
> call. However, the next NBP (in this case, another PXELINUX) _does_ use 
> the cached response to find out where to look for its config file. 

> In the Intel reference PXE stack and many others, the "Get Cached DHCP 
> Response" call returns a pointer to the actual buffer in which the 
> received BOOTP/DHCP packet was stored, and returns the _same_ pointer 
> every time. So simply overwriting parts of that buffer works fine. 

> Other stacks (IIRC, gpxe has this problem) return a pointer to a _copy_, 
> so changing it has no effect." 

So, it looks like we're not quite able to use the full functionality
of this PXECHAIN module because the iPXE stack isn't handling
things the same way as the Intel stack.

Any hope for a patch of some kind that could address this so that
PXE chainloading to another server from Syslinux on top of iPXE could 
work? It would make my day, that's for sure.

Thanks,
Mike Sollanych



More information about the ipxe-devel mailing list