May 16, 2025

Sun 3/280 - running tftpd on my linux machine

I have been doing this for a long time to support network booting of various ARM boards I have been working with.

The first important thing to know is that Fedora uses the directory /var/lib/tftpboot rather than the old and venerable /tftpboot. This should be invisible to clients, but rarpd needs to be informed.

The Sun 3/280 gets its IP address from rarpd, then converts it into a filename that it tries to fetch via tftp.
In our case that filename is C0A8001E (for 192.168.0.30).

You stop and start tftpd using:

systemctl status tftp.service
systemctl stop tftp.service
When I stop it, I get the warning:
Stopping 'tftp.service', but its triggering units are still active:
tftp.socket
I give it some file (any file) in the following way:
cd /var/lib/tftpboot
cp /etc/hosts C0A8001E
So far the Sun has been unable to get this file via tftp, although wireshark shows me the requests asking for it. Wireshark sees broadcast requests aimed at port 69.

I see the following running before I stop the service:

ps -alx | grep tftp
4     0  187297       1  20   0   2836  1788 do_sel Ss   ?          0:00 /usr/sbin/in.tftpd -s /var/lib/tftpboot
I try running it by hand to see if I can get it to be verbose and give me more information:
cd /usr/sbin
./in.tftpd -L -v -v
Not matter what I do, tftpd will not stay running in the foreground giving me information.

Check the logfile

I check /var/log/messages and see many things that do not look good:
May 16 18:18:13 trona systemd[1]: Started tftp.service - Tftp Server.
May 16 18:18:14 trona in.tftpd[193249]: connect: Invalid argument
May 16 18:19:17 trona in.tftpd[193303]: connect: Invalid argument
May 16 18:19:17 trona in.tftpd[193304]: connect: Invalid argument
May 16 18:20:21 trona in.tftpd[193350]: connect: Invalid argument
May 16 18:21:25 trona in.tftpd[193390]: connect: Invalid argument
May 16 18:22:29 trona in.tftpd[193434]: connect: Invalid argument
May 16 18:23:33 trona in.tftpd[193474]: var/lib/tftpboot: No such file or directory
Just for starters, why has it stripped the leading "/" from the directory path?

Now it works!

I did nothing more than press the reset button on the Sun 3/280.

I did launch a special rarpd with the "-e" switch by hand, and I will need to find a way to get that into the Fedora service scripts.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org