[syslinux] Chainload pxelinux from pxelinux and pass parameters or change root dir?

Alexander Perlis aperlis at math.lsu.edu
Mon Jun 16 07:23:17 PDT 2014


When chainloading one pxelinux from another (e.g., chainloading from say 
pxelinux 4.07 to pxelinux 6.02), can one pass parameters or somehow 
control the root directory and/or server IP address?

Here's the need: we have a loaded-up PXE server working great under 
4.07, and I'm not prepared to just switch the entire setup to a newer 
version of pxelinux, too many folks depending on a working setup. 
However, if I could chainload to 6.02, then I could have a menu entry 
that allows us to go to 6.02 for testing purposes, or to deploy a 
particular thing that actually requires 6.02. Thus I would like to have 
a menu entry under pxelinux 4.07 that says something like:

LABEL chainloadtopxe6
KERNEL /syslinux6/gpxelinux.0
APPEND root=/syslinux6

Note the APPEND. The idea is that the gpxelinux.0 would then in turn 
fetch its *.c32 and pxelinux.cfg from the /syslinux6 subtree, so that 
those files can be different than the versions from pxelinux4.

Is something like that possible? If not, how hard to add support for 
that? (That is, support for passing a parameter to a chainloaded 
pxelinux?) If totally impossible, is a possible workaround to dedicate 
another IP address, and do something like

LABEL chainloadtopxe6
KERNEL http://some.new.ip/gpxelinux.0

Will that invocation of gpxelinux.0 then set the environment 
appropriately to pull the *.c32 and pxelinux.cfg from that new IP address?


I suppose my real quandary is my lack of understanding of how pxelinux.0 
is executed: the DHCP server returns the IP and base image name, the 
ethernet card pulls down that image, so pxelinux.0 is just some binary 
code loaded into memory and executed, but how does that code then know 
the IP and path for pulling down additional components? That is, how 
does pxelinux.0 gain access to the DHCP parameters that tell it the root 
path and host IP address? Do those get passed dynamically on the stack, 
or are they stored ahead of time at some hardcoded fixed memory 
locations, or how does it work? And can those values later be changed on 
a reinvocation of pxelinux.0?

Thanks,
Alex


More information about the Syslinux mailing list