[syslinux] Chainloading from one PXELINUX to another (with some iPXE in the mix)?

Mike Sollanych msollany at sfu.ca
Thu Jun 9 09:51:19 PDT 2011


----- Original Message -----
> From: "Andrew Stuart" <andrew at shopcusa.com>
> To: syslinux at zytor.com
> Sent: Wednesday, June 8, 2011 5:45:40 PM
> Subject: Re: [syslinux] Chainloading from one PXELINUX to another (with some iPXE in the mix)?
> 
> Out of curiosity, Have you looked at gpxecmd.c32? I haven't
> personally used it (yet), but from my understanding it is supposed to be 
> able to use and gpxe command. I read on the mailing list (I believe) that 
> it appears to be compatible with iPXE as well.

Very cool, did not know about this. It seems to work to some extent, but not
far enough with what I've tried yet anyway.

> Assuming all the above is correct you should be able to do something
> like (untested):
> 
> set 209:string pxelinux.0
> set 210:string tftp://[some server]
> chain pxelinux.0

I set this up as the following line at the boot: prompt:
(all on one line)

gpxecmd.c32 set 209:string pxelinux.0 && 
set 210:string tftp://[FOG server IP] && 
chain pxelinux.0

I don't think the 'set' lines are working, though, because the PXELINUX
that then starts is actually the PXELINUX 4.x from our master server
and not the older 3.8x from the FOG server. Also, the PXELINUX boot messages
show that it's still searching on the original master TFTP server for config 
files. Finally, it just dies out after the first config file load attempt
without even going down the precedence order to land on the 'default' file.

So, not quite.

Attempt 2 was to use the FOG 'shim' I mentioned in a previous message that
runs on the FOG server and translates the MAC-address specific PXELINUX
config file generated by FOG to an iPXE script that should boot the same thing.

I ran this at the boot: prompt like so:
gpxecmd.c32 chain http://[FOG FQDN]/tftpboot/fog-ipxe.php?mac=${mac}

and iPXE did indeed go and fetch the script and execute it. If run with 
no current FOG task, the script outputs commands to display a nice error;
works great. If run with a task, the script outputs commands to get
a kernel and initrd, and run it with a whole pile of parameters.

On Virtualbox (obviously not the best testing environment, but...) this 
only works as far is loading the bzImage and initrd, and then execution
halts with no error message. 

On a physical machine, it gets further - Linux executes, but complains
that it can't mount the root FS on unknown-block. I suppose that could
be some kind of initrd problem, but I'm not sure. Either way, no dice.

Any suggestions as to why that might be occurring or where to begin
debugging it would be helpful.

> As another possibility, Can you run a pre-menu from iPXE to split
> your requests? iPXE can call syslinux 3.x com32 modules directly, so 
> you could run vesamenu.c32 with a configuration file that gives your
> users two choices, new server / old server ?

That's kinda what this menu is supposed to be. To be honest, I'm not sure
why we're running Syslinux on top of iPXE if iPXE can display the menu
by itself; I'll have to wait for my colleague to get back from vacation
so I can ask him what the rationale was. He's a pretty wise fellow,
though, so I imagine there's some reason for it.

If there isn't, though, then I'll see if we can try that out.

Thanks,
Mike Sollanych




More information about the Syslinux mailing list