[syslinux] Can PXElinux be used to dynamically pass DHCP option 252 to a PXE client?

Shao Miller Shao.Miller at yrdsb.edu.on.ca
Mon Mar 8 07:17:13 PST 2010


Martijn Olivier Tigchelaar wrote:
>
> Here is what I do whilst i'm still testing and trying to figure out 
> how to automate this...
>
> -- kernel pxeboot.0 (this file was renamed from "pxeboot..n12")
>

gPXE doesn't care about file extensions.  You could leave this as 
pxeboot.n12 if you like.

> ...Now - how do I do all of this WITHOUT having to type these commands 
> in manually?
>

gPXE can have embedded scripts.  If you look at ROM-O-Matic, you can 
customize your download to include an embedded script.  You could thus 
make a gPXE for each of your boot choices and chain to them from PXELINUX.

#!gpxe
# Change this line and build for each menu option
set 252:string foo
# This should avoid a second DHCP transaction
set use-cached 1
dhcp net0
# And finally over to Microsoft
chain tftp://server/pxeboot.n12

You might want to use the undionly.kkpxe build target for gPXE if you 
use the example script above.  You PXELINUX config-file can then include:

LABEL win1
  PXE win1.kkpxe
LABEL win2
  PXE win2.kkpxe

where those are renamed undionly.kkpxes that you customized and 
downloaded from ROM-O-Matic.

> ...
>

- Shao Miller



More information about the Syslinux mailing list