-
Notifications
You must be signed in to change notification settings - Fork 92
Installing Netatalk on NetBSD
NetBSD is one out of a handful of distributions that still actively maintain an AppleTalk kernel module.
Additionally, it has both a Netatalk 3.x as well as a Netatalk 2.x package in the pkgsrc repository that work out of the box.
For building and installing from source yourself, find links to the official documentation below.
- Compile Netatalk from Source: NetBSD in the Manual
- INSTALL.md in the source tree
Before starting, make sure you have a working pkgsrc environment.
Install the packages that netatalk22 depends on:
pkg_add \
git \
mozilla-rootcerts-openssl \
gcc13 \
autoconf \
libtool \
pkg-config \
db5 \
libgcrypt \
libressl \
gmake \
cups \
cracklib
Install netatalk22 itself:
pkg_add netatalk22
In older versions of Netatalk, you had to enable the NetBSD init script with the --enable-netbsd
or equivalent compile time flag.
Once installed, you can control the netatalk service as any other NetBSD service.
If needed, copy the installed netatalk initscripts to the /etc/rc.d
directory.
NetBSD comes with an AppleTalk kernel module which Netatalk can use for DDP transport protocol out of the box on most configurations. Source for this module is available under /usr/src/sys/netatalk
in the source tree.
Some NetBSD ports, notably evbarm (arm64), are built with the NETATALK kernel module disabled by default. To test this, try running the atalkd service. If you get the following error messages, it means that your kernel was not built with netatalk support:
# service atalkd onestart
Starting atalkd.
socket: Address family not supported by protocol family
socket: Address family not supported by protocol family
atalkd: can't get interfaces, exiting.
If you see these "Address family not supported by protocol family" errors, you can try building your own kernel with NETATALK enabled. First, you'll need to download the kernel source. This is the syssrc.tgz
file that can be found online in the /source/sets
directory for your build version (e.g. https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.0/source/sets/syssrc.tgz
). Extract the source tarball as root:
# cd /
# tar xzf /path/to/syssrc.tgz
This puts the source code under /usr/src. Look for your architecture under /usr/src/sys/arch/
, then find the configuration file in the conf
directory that was used to build your kernel. You can find which configuration was used by running uname -a
:
# uname -a
NetBSD arm64 10.0 NetBSD 10.0 (GENERIC64) #0: Thu Dec 12 16:59:45 PST 2024 root@arm64:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
In this example, our kernel was built for the evbarm
architecture using the GENERIC64
configuration. Inspecting the file /usr/src/sys/arch/evbarm/conf/GENERIC64
does not show any instances of the string NETATALK
, but we see it includes three other files:
include "arch/evbarm/conf/std.generic64"
include "arch/evbarm/conf/files.generic64"
include "arch/evbarm/conf/GENERIC.common"
and in GENERIC.common
, the following line is commented out:
#options NETATALK # AppleTalk networking
Uncomment the line by removing the leading #
, save the file, and you are ready to follow the instructions for rebuilding and installing the new kernel..
In order to register with the AppleTalk protocols, the /etc/services
file must contain proper protocol definitions. Make sure the following entries are present on your installation:
rtmp 1/ddp # Routing Table Maintenance Protocol
nbp 2/ddp # Name Binding Protocol
echo 4/ddp # AppleTalk Echo Protocol
zip 6/ddp # Zone Information Protocol
afpovertcp 548/tcp # AFP over TCP
afpovertcp 548/udp
From: https://github.com/Netatalk/netatalk/blob/main/config/services.atalk
Resources
OS Specific Guides
- Installing Netatalk on Alpine Linux
- Installing Netatalk on Debian Linux
- Installing Netatalk on Fedora Linux
- Installing Netatalk on FreeBSD
- Installing Netatalk on macOS
- Installing Netatalk on NetBSD
- Installing Netatalk on OmniOS
- Installing Netatalk on OpenBSD
- Installing Netatalk on OpenIndiana
- Installing Netatalk on openSUSE
- Installing Netatalk on Solaris
- Installing Netatalk on Ubuntu
Technical Docs
- CatalogSearch
- Kerberos
- Special Files and Folders
- Spotlight
- AppleTalk Kernel Module
- Print Server
- MacIP Gateway
Development