TFTP, or Trivial File Transfer Protocol is a relatively lightweight protocol used for transferring single files at a timewithout the bulk of the massive capabilities of FTP. TFTP is used most often with embedded devices for firmware updates, or VoIP phones to get the latest configuration. Today, I ran into the desire to upgrade some firmware on the DRAC-III device in my Dell PowerEdge 1650 that I just bought on EBay. After gaining access to the embedded web server’s firmware update page I found that it required a tftpd server to pull firmware images from. So, I began to deploy one here at the house for firmware updates I’ll undoubtedly need in the coming months as my home infrastructure grows.
After some searching across the web I found that there wasn’t a very good write up on the step by step procedure to enable a TFTP daemon on Ubuntu (my choice for linux servers). I had actually messed around with the tftpd package, but in the little bit I was able to find I determined I wanted to use the ‘atftp’ and ‘atftpd’ packages available in Ubuntu’s universe repositories due to more adoption in instructions that were available. In what I’ve been able to determine, both the server daemon (atftpd) and the client program (atftp) are necessary on the server (computer). The reasoning, as best as I’ve been able to determine, is that the server (daemon) only makes the files available. The client (program) does all of the “work” in negotiating connections between each other, so a client (program) is necessary on both the server (computer) and the client (computer). I hope that made sense.
So that you have a baseline of expectations, I’ll be open with the specs and configuration of the server I’m using:
- Ubuntu Server 10.4 Lucid Lynx x86 (32 bit)
- Dual 1.4Ghz Pentium3 CPUs
- 512MB RAM
- Running as Guest OS on VMWare ESXi 3.5 Update5
Now, let’s get atftpd installed.
- Get Root.
- sudo -i
- Install atftpd.
- apt-get install atftpd
- Edit atftpd’s configuration.
- pico -w /etc/default/atftpd
- change “USE_INETD=true” to “USE_INETD=false”
- ctrl+x, enter, y
- Start atftpd.
- invoke-rc.d atftpd start
- Add the tftp directory.
- cd /srv
- mkdir tftp
- chmod 777 tftp
- chown nobody:nogroup tftp
- Restart atftpd.
- /etc/init.d/atftpd restart
- Install the client (program).
- apt-get install atftp
At this point, use your favorite SCP client (program) to upload any firmware files to the /srv/tftp folder. Once it is uploaded, point the tftp location in your firmware update process to your newly deployed tftpd server. Easy enough!
Thanks for visiting, if you have any questions feel free to comment below and I’ll do my best to reply and help you out.