[syslinux] PXE and Variables ..

Ferenc Wagner wferi at niif.hu
Tue Apr 21 00:48:31 PDT 2015


Bob Davis via Syslinux <syslinux at zytor.com> writes:

> I am trying to produce a standard PXE menu to go around various
> offices, currently i have just given every PXE server the same name on
> the local domain, pxeserver.london pxeserver.new-york etc etc however
> I would prefer to do this by either deriving it from the local
> $hostname value or by reading a configuration file.
>
> so for example this line :
>
> append  initrd=centos/initrd.img method=http://<<some_variable>>/distro
> ks=http://<<some_variable>>/kickstart/test.cfg devfs=nomount ip=dhcp
>
> the kickstart and the distros are on the local pxe server as well ..
>
> Is the only way to have a different file for each location ??

I'm not sure I understand your intent well.  You can load different
configuration files based on DHCP options, see
http://www.syslinux.org/wiki/index.php/PXELINUX#DHCP_Config_-_ISC_dhcpd_options

Variable substitution in configuration files is not supported.

You have the -dhcpinfo option of linux.c32, if you're prepared to
process that info in your initramfs.

Or you can modify linux.c32 to process the DHCP packet itself, see
http://www.syslinux.org/wiki/index.php/Comboot_API.

Or you may use the dhcp.gettable() function under lua.c32.  See
com32/lua/src/dhcp.c for details of the DHCP module.
-- 
Regards,
Feri.


More information about the Syslinux mailing list