Wrong instructions for tftpd in Ubuntu

  1. 2 years ago


    I think you have a misleading point in the documentation for Ubuntu. You set up tftpd both as a standalone server and as a service through xinetd. I think only one of these is necessary for tftpd to function.


  2. Also, I have notice that the symbolic links should use relative paths.
    Instead of:
    ln -s /tftpboot/images /tftpboot/proxy/bios/images
    ln -s /tftpboot/images /tftpboot/proxy/efi32/images
    ln -s /tftpboot/images /tftpboot/proxy/efi64/images
    ln -s /tftpboot/kernels /tftpboot/proxy/bios/kernels
    ln -s /tftpboot/kernels /tftpboot/proxy/efi32/kernels
    ln -s /tftpboot/kernels /tftpboot/proxy/efi64/kernels

    It should be:
    ln -s ../../images /tftpboot/proxy/bios/images
    ln -s ../../images /tftpboot/proxy/efi32/images
    ln -s ../../images /tftpboot/proxy/efi64/images
    ln -s ../../kernels /tftpboot/proxy/bios/kernels
    ln -s ../../kernels /tftpboot/proxy/efi32/kernels
    ln -s ../../kernels /tftpboot/proxy/efi64/kernels


  3. clonedeploy

    13 Jul 2016 Administrator

    Thanks for the info. When I looked up documentation for tftp servers on Ubuntu nearly every guide shows it coupled with xinetd, so that just the way I did it. I will see if I can spend some more time on that. I believe you are correct about the sym links. I will update the docs. Thanks again.

  4. clonedeploy

    27 Jul 2016 Administrator

    I have updated the docs for the sym links, thanks again for spotting this.

  5. Thank you for your great work!

  6. Hi again!

    you have updated the symlinks part but not the duplicated daemon part. Sorry for the (probably unnecessary) explanation. In linux programs can run as services or daemons in two different ways: Standalone way or xinetd way. In standalone way the program is running all the time waiting for possible petitions from "clients". In xinetd way, the xinet daemon is the one listening for petitions and it's its duty to wake up the services/programs it controls if necessary. Xinetd is preferred when there is few resources in the system.
    In your docs you setup both ways, which is illogical as only one program can be bind to a port. So, in my opinion the correct instruction should be:
    ## If Standalone is used:

    apt-get -y install tftpd-hpa
    echo "TFTP_USERNAME=\"root\"
    TFTP_OPTIONS=\"-s\"" > /etc/default/tftpd-hpa
    service tftpd-hpa restart
    service apache2 restart

    ## If xinetd is used:

    apt-get -y install xinetd tftpd-hpa
    echo "service tftp
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /tftpboot
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }" > /etc/xinetd.d/tftp
    service xinetd restart
    service apache2 restart

    In my opinion in case of doubt, if it is not a very limited server and xinetd is not already in use, Standalone way is the way to go. Hope it helps.


  7. clonedeploy

    4 Aug 2016 Administrator

    Thanks for the explanation. I certainly don't pretend to have all the answers, and help is always welcome. The doc has been updated with your recommendations.

  8. 10 months ago

    ln -s ../../images /tftpboot/proxy/bios/images
    what is pwd before above command entering.


or Sign Up to reply!