[syslinux] Chainload pxelinux from pxelinux and pass parameters or change root dir?
Alexander Perlis
aperlis at math.lsu.edu
Mon Jun 16 14:57:04 PDT 2014
On 06/16/2014 10:41 AM, Gene Cumm wrote:
> [...] Initially I wrote pxechn.c32 to allow further
> modifications of the DHCP data [...]
Awesome! In fact, this might allow us to install an automatic 'http'
prefix on all subsequent requests, to avoid slow tftp --- or is that a
bad idea, and/or is there a way to default all transfers to http without
using pxechn and without prefixing every filename in the *.cfg files
with http://my.ip/ ? (We don't control our DHCP server so can't easily
experiment with the 210 option. Chainloading just to get that prefix
installed is itself a slowdown, so I'd love to know a better way.)
Here's what I mean by 'chainloading to install an automatic http prefix':
pxelinux.cfg:
------------
DEFAULT switch-to-lpxe-with-http-default
TIMEOUT 0
LABEL switch-to-lpxe-with-http-default
KERNEL http://my.ip/syslinux/pxechn.c32
http://my.ip/syslinux/lpxelinux.0 -p http://my.ip/ -c nextstage.cfg
nextstage.cfg:
-------------
Former contents of pxelinux.cfg
I tried this with 6.02. After some unexplained delays in the
chainloading, my graphical menu does show up! Unfortunately, the host
locks up at that point --- doesn't respond to keypress, nor is the
countdown timeout changing values. Ctrl-Alt-Del doesn't work either. How
can I debug that?
If I change lpxelinux.0 above to gpxelinux.0, then the boot doesn't even
make it to the graphical menu. gpxelinux.0 seems to correctly load
nextstage.cfg (from my -c option above) but then also tries to load
pxelinux.cfg, which would be an infinite loop since that's the previous
stage's configuration. Actually it doesn't get into an infinite loop, as
it only tries "syslinux/pxelinux.cfg" and a few other paths that don't
work, and then exits with an error.
I also tried plain pxelinux.0 (no -p parameter), and it too behaves like
gpxelinux.0 first loading nextstage.cfg but then going back and trying
to load pxelinux.cfg and failing.
Only lpxelinux.0 seems to correctly honor the -c parameter from
pxechn.c32. (But then, as reported above, my host hangs.)
I'm stuck. What am I doing wrong?
I also tried all of this under 5.10, but ran into the 'netconn_write
failed' error, so I can't use version 5 at all. I wonder whether the
patch in 6.02 that fixes that error could be backported to 5? Or am I
wrong to assume that 5.10 is otherwise more stable than 6.02?
More information about the Syslinux
mailing list