Christoph Hanle
2012-Feb-05 14:44 UTC
[syslinux] pxelinux search order for configuration file
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 ? I have added in my pxe.c at line 500 a second <last--:> and changed <int tries = 4> This reduces the requests to the tftp server and reduces also the entries in the log. bye Christoph
Schlomo Schapiro
2012-Feb-05 14:59 UTC
[syslinux] pxelinux search order for configuration file
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
Christoph Hanle
2012-Feb-05 15:29 UTC
[syslinux] pxelinux search order for configuration file
On 05.02.2012 15:59 Schlomo Schapiro wrote:> AFAIKT the idea is to have different boot configurations for different > subnets. Indeed, C, C0 etc. might be a bit extreme. >I know, I need to have different boot configurations for different subnets.> My personal solution to this problem is to always return a valid boot > configuration to the first request (the one with the UUID).This is no option for me. bye Christoph
Ferenc Wagner
2012-Feb-06 12:42 UTC
[syslinux] pxelinux search order for configuration file
Christoph Hanle <christoph.hanle at leinpfad.de> writes:> is there a need to have on searching the configuration file the > request for the "odd ip addresses" ? > [...] > This reduces the requests to the tftp server and reduces also the > entries in the log.What about using the pxelinux.configfile DHCP option? -- Regards, Feri.