UNSOLVED Cannot get TFTP File not found using dnsmasq

  • I am setting up FOG at home to make a second job I have easier. Setting up new computers for the company my wife works for’s customers. I have Ubuntu 14.04 installed and the latest SVN of FOG, 3443. I have dnsmasq installed and systems boot to the Network fine and are looking on the correct system for the file. I have gone through the troubleshooting at, https://wiki.fogproject.org/wiki/index.php/Troubleshoot_TFTP, and everything checks out fine other than tftp get from my windows machine… When I try I get C:\WINDOWS\system32>tftp get undionly.kpxe, tftp: can’t write to local file ‘undionly.kpxe’. See below my lstp.conf and output of ls -laR /tftpboot.


    pxe-prompt="Press F8 for boot menu", 0
    pxe-service=X86PC, "Boot from network", undionly.kpxe
    pxe-service=X86PC, "Boot from local hard disk", 0

    ls -laR /tftpboot

    tim@Linux-Ubuntu:~$ ls -laR /tftpboot
    total 3964
    drwxr-xr-x  4 fog  root   4096 May 20 22:41 .
    drwxr-xr-x 25 root root   4096 May 20 22:41 ..
    -rw-r--r--  1 fog  root    840 May 20 22:41 boot.txt
    -rw-r--r--  1 root root    401 May 20 22:41 default.ipxe
    drwxr-xr-x  2 fog  root   4096 May 20 22:41 i386-efi
    -rw-r--r--  1 fog  root 171296 May 20 22:41 intel.efi
    -rw-r--r--  1 fog  root  89067 May 20 22:41 intel.kkpxe
    -rw-r--r--  1 fog  root  89115 May 20 22:41 intel.kpxe
    -rw-r--r--  1 fog  root  89113 May 20 22:41 intel.pxe
    -rw-r--r--  1 fog  root 892000 May 20 22:41 ipxe.efi
    -rw-r--r--  1 fog  root 329667 May 20 22:41 ipxe.kkpxe
    -rw-r--r--  1 fog  root 329715 May 20 22:41 ipxe.kpxe
    -rw-r--r--  1 fog  root 329164 May 20 22:41 ipxe.krn
    -rw-r--r--  1 fog  root 329823 May 20 22:41 ipxe.pxe
    -rw-r--r--  1 fog  root 123448 May 20 22:41 ldlinux.c32
    -rw-r--r--  1 fog  root  26140 May 20 22:41 memdisk
    -rw-r--r--  1 fog  root  29208 May 20 22:41 menu.c32
    -rw-r--r--  1 fog  root  43210 May 20 22:41 pxelinux.0
    -rw-r--r--  1 fog  root  43210 May 20 22:41 pxelinux.0.old
    drwxr-xr-x  2 fog  root   4096 May 20 22:41 pxelinux.cfg
    -rw-r--r--  1 fog  root 170912 May 20 22:41 realtek.efi
    -rw-r--r--  1 fog  root  90005 May 20 22:41 realtek.kkpxe
    -rw-r--r--  1 fog  root  90053 May 20 22:41 realtek.kpxe
    -rw-r--r--  1 fog  root  90119 May 20 22:41 realtek.pxe
    -rw-r--r--  1 fog  root 170112 May 20 22:41 snp.efi
    -rw-r--r--  1 fog  root 170272 May 20 22:41 snponly.efi
    -rw-r--r--  1 fog  root  88766 May 20 22:41 undionly.kkpxe
    -rw-r--r--  1 fog  root  88814 May 20 22:41 undionly.kpxe
    -rw-r--r--  1 fog  root  88882 May 20 22:41 undionly.pxe
    -rw-r--r--  1 fog  root  29728 May 20 22:41 vesamenu.c32
    total 1348
    drwxr-xr-x 2 fog root   4096 May 20 22:41 .
    drwxr-xr-x 4 fog root   4096 May 20 22:41 ..
    -rw-r--r-- 1 fog root 137344 May 20 22:41 intel.efi
    -rw-r--r-- 1 fog root 814368 May 20 22:41 ipxe.efi
    -rw-r--r-- 1 fog root 137664 May 20 22:41 realtek.efi
    -rw-r--r-- 1 fog root 137088 May 20 22:41 snp.efi
    -rw-r--r-- 1 fog root 137216 May 20 22:41 snponly.efi
    total 12
    drwxr-xr-x 2 fog root 4096 May 20 22:41 .
    drwxr-xr-x 4 fog root 4096 May 20 22:41 ..
    -rw-r--r-- 1 fog root  160 May 20 22:41 default

  • Thanks for the starting place. I was just gonna experiment when I got home tonight.

  • @Timtrag12

    With the dnsmasq issue, I bet its because of the way it seems to kill dns lookups. In short, you just have to change the order of interfaces in /etc/resolvconf/interface-order - just put eth* first in that list. Give that a go, restart the server, and see what happens.

  • Okay, I will check when I get home. I am in Eastern time zone and my wife showed me the time right after my last post last night so I went to bed.

    I also found an issue with dnsmasq on my Linux box that was causing me to not have an internet connection. I don’t think it was the cause since my test system was going to the correct system to try and grab the file, but I havn’t fixed it yet.

    I will fix the dnsmasq issue and test tftp as admin on my Windows box.

  • @Wayne-Workman

    or Link the file

    sudo ln -s -r undionly.kpxe undionly.0

    But that shouldn’t be the problem, since you’re explicitly stating the file you want via TFTP. I’ll go with the idea its a permissions problem on the Windows side.

    Running as a regular user:

    C:\Users\Trevelyan>cd C:\Windows\System32
    C:\Windows\System32>tftp get undionly.kpxe
    tftp: can't write to local file 'undionly.kpxe'

    Running as admin:

    C:\Windows\system32>tftp get undionly.kpxe
    Transfer successful: 103273 bytes in 1 second(s), 103273 bytes/s

  • Oh… (it’s been a long day)

    about the file not found error on booting to network via FOG using dnsmasq,

    I think you just need to copy undionly.kpxe to undionly.0

    dnsmasq adds a .0 to the end. This is dnsmasq’s thing, FOG doesn’t maintain dnsmasq, it just uses it. so…
    [CODE]cp /tftpboot/undionly.kpxe /tftpboot/undionly.0[/CODE]

    It’s highly annoying, it’s also well known about.
    It’s mentioned here: https://wiki.fogproject.org/wiki/index.php/Using_FOG_with_an_unmodifiable_DHCP_server/_Using_FOG_with_no_DHCP_server#DNSMASQ_settings_for_iPXE

  • Can you try this?

    [CODE]tftp get undionly.kpxe %HOMEPATH%\Downloads\undionly.kpxe[/CODE]

    I’m not positive, but the command you’re running might be trying to put the file into system32 (because that’s your current directory), and Windows might be stopping that. You’re error “can’t write to local file ‘undionly.kpxe’” suggests this, so better to use an explicit destination path.

  • Yes, TFTP is running. Linux and Windows Firewalls are off.

    The command I am using is exactly what you posted and is in the screenshot below, I just Marked the whole line since the error was on the next line under the Windows Shell Path.


  • What concerns me is why can’t you get a file through TFTP using windows.

    You verified that TFTP is running? Firewall is off (on Ubuntu and Windows) ?

    Just to clarify and make sure, the command shouldn’t include that path into system32… you just need to use the last part of what you posted:
    [CODE]tftp get undionly.kpxe[/CODE]

    Can you post a picture of the exact error you’re seeing? Thank you.