NOBODD-TFTPD(1)

πŸ“¦
version 0.5 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

okay bestie, say hi to nobodd-tftpd β€” yes, that's nobodd-tftpd(1), the main character of this whole page πŸ’…

It's a read-only TFTP server that can read FAT boot partitions from inside image files or devices. It's meant to be paired up with a block-device service (like NBD, iykyk) so you can netboot Raspberry Pis πŸ“. That's the whole vibe. Read-only, boot-partition-serving, Raspberry-Pi-feeding. Periodt.


✨ SYNOPSIS ✨

usage: nobodd-tftpd [-h] [--version] [--listen ADDR] [--port PORT]
                    [--board SERIAL,FILENAME[,PART[,IP]]]

πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows the help message and dips. that's it, that's the whole thing πŸ’–
  • --version β€” shows the program's version number and exits. iconic behaviour.
  • --board SERIAL,FILENAME[,PART[,IP]] β€” you can drop this one multiple times to define boards that get served boot images over TFTP 🫢. If you skip PART, it defaults to 1. If you skip IP, then the IP address just... won't be checked. no vibe check, no problem.
  • --listen ADDR β€” the address to listen on for connections. default is "::" which means literally all the addresses 🌈.
  • --port PORT β€” the port to listen on for connections. default is "tftp", which is port 69 😏.

πŸ”§ CONFIGURATION πŸ”§

okay so nobodd-tftpd can be configured two ways: from the command line, or from a bunch of configuration files. The files are INI-style β€” bracketed [sections] holding key=value lines, plus optional #-prefixed comments (very demure, very mindful).

Here's which files get read, and the order they get consulted, fr fr:

  1. /etc/nobodd/nobodd.conf
  2. /usr/local/etc/nobodd/nobodd.conf
  3. $XDG_CONFIG_HOME/nobodd/nobodd.conf (and heads up: $XDG_CONFIG_HOME defaults to ~/.config if it's unset)

Files later in that order override settings from files earlier in that order. later = louder, that's just how it is πŸ’…

the [tftp] section πŸ¦‹

Your config file can have a [tftp] section, and inside it these values can live:

  • listen β€” equivalent to the --listen parameter. It says which address(es) the server listens on for incoming TFTP connections.
  • port β€” equivalent to the --port parameter. It says which UDP port the server listens on for incoming TFTP connections. But bestie, important: only the initial TFTP packet shows up on this port. Every "connection" gets allocated its own ephemeral port (that's the concept at https://en.wikipedia.org/wiki/Ephemeral_port) on the server, and every packet after that first one uses that ephemeral port. no cap.
  • includedir β€” if you set this, it names a directory that gets scanned for files matching the pattern *.conf. Anything matching gets read as extra configuration files, in sorted filename order. cute little conf buffet πŸ“

For example:

[tftp]
listen = 192.168.0.0/16
port = tftp
includedir = /etc/nobodd/conf.d

the [board:SERIAL] sections πŸ‘‘

For every image the TFTP server is supposed to serve to a Raspberry Pi, you define a [board:SERIAL] section. Swap SERIAL out for the actual serial number of that Pi. You can find the serial number in the output of cat /proc/cpuinfo at runtime. Like so:

$ grep ^Serial /proc/cpuinfo
Serial          : 100000001234abcd

Now here's the little trick: if the serial number starts with 10000000 (exactly like the example above), you drop the initial one and all the leading zeros. So that Pi up there actually has a serial number of 1234abcd (in hexadecimal). slay ✨

Inside that section, these values are valid:

  • image β€” the full path to the operating system image to serve to the specified Pi. Presumably it was prepped with nobodd-prep.
  • partition β€” optionally, the number of the boot partition. If you don't specify it, it defaults to 1.
  • ip β€” optionally limits serving any files from this image unless the client's IP address matches. If you don't specify it, any IP address at all can pull files from this share. (chaotic, but valid.)

For example:

[board:1234abcd]
image = /srv/images/ubuntu-24.04-server.img
partition = 1
ip = 192.168.0.5

In practice, what all that means is: requests from a client with the IP address "192.168.0.5" for files under the path "1234abcd/" get served from the FAT file-system on partition 1 of the image stored at /srv/images/ubuntu-24.04-server.img. like, it just works πŸ’–

And guess what β€” nobodd-prep can produce these definitions for you when you hand it the nobodd-prep --serial option.

Boards can also be defined right on the command line with the --board option. Those definitions augment the ones from your configuration files β€” and where the serial number is identical, they override them. command line stays winning, as always πŸ‘‘


🫢 SYSTEMD/INETD USAGE 🫢

The server can inherit its listening socket from a managing process. two scenarios, both valid:

  • With inetd(8) (https://manpages.ubuntu.com/manpages/noble/en/man8/inetd.8.html), where the listening socket is traditionally passed as stdin (that's fd 0), you pass "stdin" as the value of --listen β€” or as the listen option inside the [tftp] section of the config file. same thing, different font.
  • With systemd(1) (https://manpages.ubuntu.com/manpages/noble/en/man1/systemd.1.html), where the listening socket(s) get passed via the environment, you specify "systemd" as the value of --listen β€” or as the listen option inside the [tftp] section of the config file. Then the service expects to find a single socket passed in LISTEN_FDS. This happens implicitly if the service is declared as socket-activated. However β€” and bestie listen to me on this one β€” the service must not use Accept=yes, because the TFTP protocol is connection-less. The example units shipped in the source code show how to do socket-activation with the server. copy them, don't freestyle 😭
In both of these cases, the service manager sets the port the service listens on β€” so the --port option (and the port option in the [tftp] section of the config file) is silently ignored. it's giving "we don't take input on this". πŸ’€

πŸ’œ SEE ALSO πŸ’œ

nobodd-sh(1) (https://manpages.ubuntu.com/manpages/noble/en/man1/nobodd-sh.1.html), nobodd-prep(1) (https://manpages.ubuntu.com/manpages/noble/en/man1/nobodd-prep.1.html), nbd-server(1) (https://manpages.ubuntu.com/manpages/noble/en/man1/nbd-server.1.html)


πŸ™ˆ BUGS πŸ™ˆ

Found something cursed? Please report bugs at: https://github.com/waveform80/nobodd/issues β€” the maintainer wants to know, fr fr πŸ›


πŸ‘‘ Author πŸ‘‘

Dave Jones

2023-2026 Dave Jones


and that's the whole page, bestie! 🌈 this was nobodd-tftpd version 0.5, dated Feb 19, 2026 β€” go netboot something iconic πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from