If you’re anything like me and you have to print to an old AppleTalk printer, server, or RIP, -my condolences- keeping up-to-date and bridging that old connection becomes more difficult every decade. You are left with two choices; Keep an oldish Mac on hand capable of running Mac OS X 10.5 or earlier (a Power PC (PPC) is best in order to run the only browser using a modern cipher suite, TenFourFox from the brilliant and beautiful people at floodgap.com) or you can run an OS built on GNU+Linux, even as virtual machine, and have a fully modern desktop OS. Although in a VM a headless console will have a smaller footprint.
I’m comfortable on the command line under OS X. I’ve really enjoyed it since starting on 10.1. But these days macOS Meaningless Nickname leaves something to be desired. At any rate, if you, a Mac user like me, can make your way around a terminal you can get what you need for AppleTalk in short order. I won’t be going into which OS to choose other than to say that while highly customized and configured OSes like PuppyLinux and TinyCore are appealing due to being lightweight, they are more difficult to work with and have too many of their own quirks that will use time you could be spending achieving what you really came for.
I also will not be delving into Netatalk other than to state the newest version you can use for AppleTalk is 2.2.6. Be sure to search the repository of the OS you choose to find a pre-3.0 version of Netatalk. If it’s not there you can still download the source and compile it yourself, but you will also need to get Berkley DB from Oracle, which requires an account with them. Boo!
The Linux kernel supports DDP, the protocol AppleTalk uses for transport. That is the part missing from the mach.o kernel under OS X 10.6 and later. However, other than Raspbian, you probably aren’t going to find a Linux kernel OS that has AppleTalk support pre-compiled. Luckily just about every GNU+Linux desktop OS includes the pre-compiled modules for it. You just have to load them to get things working. Also included should be CUPS and the Avahi mdns library and that’s all you need to build your bridge.
Module loading was the tricky part for me. No matter what I tried I couldn’t get the appletalk.ko module to load. Turns out it has dependencies that need to be loaded first. I won’t tell you how long I spent stuck at this point. To find the dependencies of this (or a) module run:
grep 'appletalk' /lib/modules/`uname -r`/modules.dep
If modules.dep doesn’t exist you will need to run
depmod. According to the output of the above, appletalk needs psnap and llc. Important to note that the load order is listed in reverse in modules.dep.
You can load those modules using
insmod <file path> or
modprobe <module name> and start configuring netatalk (ProTip: netatalk 2.2.5 and probably others don’t seem to read /etc/netatalk/netatalk.conf despite what the man page says, so just edit /etc/default/netatalk), but you will want these modules to load at boot. This can be done by inserting an appropriately named .conf file into /etc/modules-load.d/ with the contents:
# Modules to support AppleTalk. llc psnap appletalk
That’s about it. Once netatalk is configured to start atalkd and papd you can run
nbplkup to discover AppleTalk devices. Although I’m not sure if you have to configure atalkd to be on the same network. I copied an old config from a Raspberry Pi I used at one point for AppleTalk.
Last note about VirtualBox: You need to set the VM’s network adapter to “bridged” to get bidirectional traffic flowing.