Steve Rikli
2023-Apr-03 20:19 UTC
[syslinux] pxelinux takes too long trying all the config file options
On Mon, Apr 03, 2023 at 12:52:41PM -0400, Rob Roschewsk via Syslinux wrote:> Hi All, > > I have a situation where I want to netboot and ONLY use pxelinux.cfg/default. > > It seems to take FOREVER for pxelinux to try all of the config file > file options before falling through to default .... trying each > possible combination multiple times ... increasing the wait time > everytime it doesn't get a response. > > From my log: > Apr 2 19:53:17 helium tftpd[3372124]: tftpd: trying to get file: /tftpboot/pxelinux.0 > Apr 2 19:54:54 helium tftpd[3372133]: tftpd: trying to get file: /tftpboot/pxelinux.0 > Apr 2 19:54:54 helium tftpd[3372135]: tftpd: trying to get file: /tftpboot/pxelinux.0Agreed, this seems slow. I also wouldn't expect to see it try & re-try multiple times for /tftpboot/pxelinux.0 either.> Apr 2 19:54:54 helium tftpd[3372139]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/44454c4c-4700-104d-805a-cac04f5a4c32 > ...... > Apr 2 19:56:54 helium tftpd[3372496]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/44454c4c-4700-104d-805a-cac04f5a4c32 > Apr 2 19:57:08 helium tftpd[3372505]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/01-d8-9e-f3-13-22-18 > ..... > Apr 2 19:59:08 helium tftpd[3372623]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/01-d8-9e-f3-13-22-18 > Apr 2 19:59:22 helium tftpd[3372626]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/C0A81674 > ..... > Apr 2 20:01:22 helium tftpd[3372784]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/C0A81674 > > That's 16 minutes of waiting and it's still not finished! > > It's been a while since I played with this stuff but it never took > that long to fall through to default before. > > How can I fix this?? Is there some option I can use to speed this up??The multiple retries as tftpd scans for ipv6(?), mac/ethernet address patterns and so on, makes me wonder if some or all of the tftpd directory or contents isn't readable to the service. Some things to check: - perms & owners on /tftpboot/ and subdirs, e.g. /tftpboot/pxelinux.cfg/ typically world-read, write isn't needed - perms & owners for the files and images you're trying to load; typically world-read, write shouldn't be needed for this - double-check your pxelinux.cfg/default file exists, readable, etc. - look for a "tftpboot -> ." symlink in your tftpboot root dir, e.g. $ ls -la /tftpboot/tftpboot lrwxrwxrwx 1 root root 1 Oct 27 2010 /tftpboot/tftpboot -> . - daemon/service args and directory paths for tftpd in your config - tftp daemon startup & config is different circa RHEL7 and prior with xinetd, vs. e.g. RHEL8 and newer, modern Debian et al with systemD For more troubleshooting, maybe add "-v" or "-vv" to your tftpd service, see if a little more syslog verbosity shows anything. I suspect a problem with tftpd (config?) rather than a PXELINUX issue; are you using tftpd from your bootserver's OS, or perhaps some other package or src? Cheers, sr.
Rob Roschewsk
2023-Apr-03 23:03 UTC
[syslinux] pxelinux takes too long trying all the config file options
Hi thanks for replying .... forgot I should have mentioned the version of pxelinux is 6.03 ubuntu netkit-tftp tftpd 0.17-22ubuntu2 Checked all of the items you listed ... all is in order I can't see how it would be the tftp server because when it finds the files to load it has no issue .... it's PXELINUX looking for stuff that is NOT there .... per the boot sequence in the PXELINUX wiki ... ================================snip=========================================Configuration filename For DHCP siaddr "192.168.2.3", file "mybootdir/pxelinux.0", client UUID "b8945908-d6a6-41a9-611d-74a6ab80b83d", ARP hardware type "1" (i.e. "Ethernet") MAC address "88:99:AA:BB:CC:DD" and IPv4 address "192.168.2.91" (in uppercase hexadecimal, "C0A8025B"), the following files will be attempted in this order (after "config-file" options): mybootdir/pxelinux.cfg/b8945908-d6a6-41a9-611d-74a6ab80b83d mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd mybootdir/pxelinux.cfg/C0A8025B mybootdir/pxelinux.cfg/C0A8025 mybootdir/pxelinux.cfg/C0A802 mybootdir/pxelinux.cfg/C0A80 mybootdir/pxelinux.cfg/C0A8 mybootdir/pxelinux.cfg/C0A mybootdir/pxelinux.cfg/C0 mybootdir/pxelinux.cfg/C mybootdir/pxelinux.cfg/default ================================snip========================================= What is taking so long, it tries each one of those options, multiple times, backing off after each failure. It loads pxelinux.0 and ldlinux.c32 instantly without issue If I go in explicitly and create a config file for the GUID for example .... It finds its first try and proceeds. (but that's not what I want) I have not seen this DELAY in earlier versions of pxelinux ... I've seen it rapidly try each one of the above bootfile names and quickly fall through to default. On Mon, Apr 3, 2023 at 4:19?PM Steve Rikli <sr at genyosha.net> wrote:> > On Mon, Apr 03, 2023 at 12:52:41PM -0400, Rob Roschewsk via Syslinux wrote: > > Hi All, > > > > I have a situation where I want to netboot and ONLY use pxelinux.cfg/default. > > > > It seems to take FOREVER for pxelinux to try all of the config file > > file options before falling through to default .... trying each > > possible combination multiple times ... increasing the wait time > > everytime it doesn't get a response. > > > > From my log: > > Apr 2 19:53:17 helium tftpd[3372124]: tftpd: trying to get file: /tftpboot/pxelinux.0 > > Apr 2 19:54:54 helium tftpd[3372133]: tftpd: trying to get file: /tftpboot/pxelinux.0 > > Apr 2 19:54:54 helium tftpd[3372135]: tftpd: trying to get file: /tftpboot/pxelinux.0 > > Agreed, this seems slow. I also wouldn't expect to see it try & re-try > multiple times for /tftpboot/pxelinux.0 either. > > > Apr 2 19:54:54 helium tftpd[3372139]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/44454c4c-4700-104d-805a-cac04f5a4c32 > > ...... > > Apr 2 19:56:54 helium tftpd[3372496]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/44454c4c-4700-104d-805a-cac04f5a4c32 > > Apr 2 19:57:08 helium tftpd[3372505]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/01-d8-9e-f3-13-22-18 > > ..... > > Apr 2 19:59:08 helium tftpd[3372623]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/01-d8-9e-f3-13-22-18 > > Apr 2 19:59:22 helium tftpd[3372626]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/C0A81674 > > ..... > > Apr 2 20:01:22 helium tftpd[3372784]: tftpd: trying to get file: /tftpboot/pxelinux.cfg/C0A81674 > > > > That's 16 minutes of waiting and it's still not finished! > > > > It's been a while since I played with this stuff but it never took > > that long to fall through to default before. > > > > How can I fix this?? Is there some option I can use to speed this up?? > > The multiple retries as tftpd scans for ipv6(?), mac/ethernet address > patterns and so on, makes me wonder if some or all of the tftpd directory > or contents isn't readable to the service. > > Some things to check: > > - perms & owners on /tftpboot/ and subdirs, e.g. /tftpboot/pxelinux.cfg/ > typically world-read, write isn't needed > > - perms & owners for the files and images you're trying to load; > typically world-read, write shouldn't be needed for this > > - double-check your pxelinux.cfg/default file exists, readable, etc. > > - look for a "tftpboot -> ." symlink in your tftpboot root dir, e.g. > > $ ls -la /tftpboot/tftpboot > lrwxrwxrwx 1 root root 1 Oct 27 2010 /tftpboot/tftpboot -> . > > - daemon/service args and directory paths for tftpd in your config > > - tftp daemon startup & config is different circa RHEL7 and prior with > xinetd, vs. e.g. RHEL8 and newer, modern Debian et al with systemD > > For more troubleshooting, maybe add "-v" or "-vv" to your tftpd service, > see if a little more syslog verbosity shows anything. > > I suspect a problem with tftpd (config?) rather than a PXELINUX issue; > are you using tftpd from your bootserver's OS, or perhaps some other > package or src? > > Cheers, > sr.