Score:1

Why do I get an error when connecting to a tftp server PXE-T00 pxelinux.0 filename too long?

om flag

As a DHCP server, I have a Mikrotik configured with options 66 and 67.

/ip dhcp-server option
add name="option66" code=66 value="s'10.10.14.200'"
add name="option67" code=67 value="'pxelinux.0'"
/ip dhcp-server option sets
add name="set-pxe" options=option66,option67

The TFTP server is dnsmasq

port=0
dhcp-boot=pxelinux.0,servername,10.10.14.200
enable-tftp
tftp-root=/var/tftp
tftp-no-fail

When trying to connect as a client, in the server logs

pxe dnsmasq-tftp[34708]: cannot read /var/tftp/pxelinux.0: File name too long

If you log in with a tftp client from a remote host, you can download any file, including pxelinux.0

jp flag
Try to compare with `tcpdump` TFTP traffic when you are trying to boot with PXE and when you are connecting with a normal TFTP client. I suspect that the filename is transferred differently.
in flag
I notice that you have s' for option66 but no s for 67 in your dhcp config. you should probably avoid to configure the same options in both dnsmasq and dhcp, you can usually do without dnsmasq when you are in control of main dhcp, which can simplify your setup.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.