Wrong instructions for tftpd in Ubuntu



  • Hi,

    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.

    Thanks.



  • 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

    Christian.



  • 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.



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



  • Thank you for your great work!



  • 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:

    [code]
    apt-get -y install tftpd-hpa

    echo "TFTP_USERNAME="root"
    TFTP_DIRECTORY="/tftpboot"
    TFTP_ADDRESS="0.0.0.0:69"
    TFTP_OPTIONS="-s"" > /etc/default/tftpd-hpa

    service tftpd-hpa restart

    service apache2 restart
    [/code]

    If xinetd is used:

    [code]
    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
    [/code]

    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.

    Thanks.



  • 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.



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