FAI (Fully Automatic Installation) is a Debian-ecosystem provisioning tool, older and more general than Preseed: rather than answering debian-installer's own question set, FAI boots a live NFS/network environment, then runs its own configuration engine (cfengine/shell scripts, driven by "classes") to partition, install, and configure the target — and it can target Debian, Ubuntu, and (with more setup) other distros, not just plain debian-installer.
The class-based model¶
Every target host is assigned one or more classes (by hostname, IP range, or a custom class/ script's own logic), and each class can contribute partitioning rules, a package list, and shell scripts to the final config — closer to how a config management tool like Puppet groups nodes by role than to a single flat kickstart file.
# fai/class/50-host-classes (example class-assignment script)
#!/bin/bash
echo "DEFAULT"
case "$HOSTNAME" in
web*) echo "WEBSERVER" ;;
db*) echo "DBSERVER" ;;
esac
echo "DEBIAN"
# fai/package_config/WEBSERVER
PACKAGES install
nginx
certbot
# fai/scripts/WEBSERVER/10-setup
#!/bin/bash
$ROOTCMD systemctl enable nginx
A host tagged web01 picks up DEFAULT + WEBSERVER + DEBIAN's combined partitioning, packages, and scripts automatically.
Basic workflow¶
sudo apt-get install fai-server fai-setup-storage
fai-setup # builds the NFS root and install environment FAI boots clients into
fai-chboot -IF -u dhcp <hostname> # register a host to netboot into FAI on its next boot (integrates with the PXE/netboot mechanics on that page)
# or, build a disk image locally rather than provisioning over the network:
fai-diskimage --hostname web01 --size 10G web01.raw
FAI vs Preseed vs Kickstart¶
Preseed answers a fixed set of debian-installer questions in a flat file; FAI replaces the installer's decision logic entirely with its own class-driven scripts, which is more powerful (arbitrary logic, easy host grouping, non-Debian targets with extra work) but has a steeper setup cost and its own NFS/PXE infrastructure to maintain. For a handful of mostly-identical Debian servers, Preseed is usually simpler; for a fleet with real per-role variation, or for building disk images offline (fai-diskimage), FAI's extra structure pays off.