Once I got tftp working on IPv4, I still couldn’t get the Macbook client to download the boot or image files. Wireshark showed that the client didn’t get any file when it sent “acknowledge data block 0″. Nothing. So I installed tftp-hpa from Macports, hoping that would solve my problem, which it didn’t. But a few tips on that:
Install tftp-hpa using the “server” variant like so:
sudo port install tftp-hpa +server
Then go into the preference file (which isn’t in the same place as most plist files):
sudo pico /Library/LaunchDaemons/org.macports.tftpd.plist
…and remove the “-s” command line parameter, while changing the path to “/private/tftpboot/”. The “-s” parameter forced a chroot which won’t allow tftp to follow symlinks outside the given path, making netbooting impossible.
Then, and this is the crucial step, change the block size to max 512 by adding the “-B” option with the value “512”. What seemed to be happening in my installation is that the client requested a block size of 8192, the server approved it, and things just stopped working. Probably something to do with the switches I have, but crimping it to 512 fixed the problem. Of course, if you’re doing netbooting on a regular basis, or run diskless workstations, 512 may be intolerably slow, so then it could be worth experimenting with higher values.
I ended up with a plist file for tftp-hpa looking like this:
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" > <plist version='1.0'> <dict> <key>Label</key><string>org.macports.tftpd</string> <key>ProgramArguments</key> <array> <string>/opt/local/bin/daemondo</string> <string>--label=tftpd</string> <string>--start-cmd</string> <string>/opt/local/sbin/tftpd</string> <string>-B</string> <string>512</string> <string>-L</string> <string>/private/tftpboot/</string> <string>;</string> <string>--pid=exec</string> </array> <key>Debug</key><false/> <key>Disabled</key><true/> <key>OnDemand</key><false/> </dict> </plist>
After modifying the file, stop and restart tftp-hpa by:
sudo launchctl unload /Library/LaunchDaemons/org.macports.tftpd.plist sudo launchctl load -F /Library/LaunchDaemons/org.macports.tftpd.plist
It’s entirely possible I never needed to switch tftp servers from the default to tftp-hpa, but now I did, I don’t know if I’ve got the courage to switch back to try the original. Checking the man pages for the original tftpd server, I can find no setting for max block-size, so maybe tftp-hpa is necessary after all, just to be able to crimp the blocks enough.