[syslinux] pxelinux search order for configuration file

Schlomo Schapiro schlomo at schapiro.org
Sun Feb 5 06:59:30 PST 2012


Hi,

On 5 February 2012 15:44, Christoph Hanle <christoph.hanle at leinpfad.de>wrote:

> Hi Everyone.
> is there a need to have on searching the configuration file the request
> for the "odd ip addresses" ?
> Let me explain:
> from /doc/pxelinux.txt :
> ...
> Next, it will search for the config file using its own IP address
>  in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B
>  (you can use the included progam "gethostip" to compute the
>  hexadecimal IP address for any host.)
>
>  If that file is not found, it will remove one hex digit and try
>  again.  Ultimately, it will try looking for a file named "default"
>  (in lower case).
>
>  As an example, if the boot file name is /mybootdir/pxelinux.0, the
>  UUID is b8945908-d6a6-41a9-611d-**74a6ab80b83d, the Ethernet MAC
>  address is 88:99:AA:BB:CC:DD and the IP address 192.0.2.91, it will
>  try:
>
>        /mybootdir/pxelinux.cfg/**b8945908-d6a6-41a9-611d-**74a6ab80b83d
>        /mybootdir/pxelinux.cfg/01-88-**99-aa-bb-cc-dd
>        /mybootdir/pxelinux.cfg/**C000025B
>        /mybootdir/pxelinux.cfg/**C000025
>        /mybootdir/pxelinux.cfg/C00002
>        /mybootdir/pxelinux.cfg/C0000
>        /mybootdir/pxelinux.cfg/C000
>        /mybootdir/pxelinux.cfg/C00
>        /mybootdir/pxelinux.cfg/C0
>        /mybootdir/pxelinux.cfg/C
>        /mybootdir/pxelinux.cfg/**default
> ...
> Why is there the need, or is there any practical usage to request for:
> C000025, C0000, C00 an C ?
>

AFAIKT the idea is to have different boot configurations for different
subnets. Indeed, C, C0 etc. might be a bit extreme.

My personal solution to this problem is to always return a valid boot
configuration to the first request (the one with the UUID). If you do HTTP
booting then this is much easier to achieve as you can have a simple CGI or
PHP script determine what to do. With TFTP booting you need a TFTP server
with dynamic content generation. I once found one and decided that this
won't work as well as via HTTP.

Regards,
Schlomo



More information about the Syslinux mailing list