Automatically install and configure systems

Mass Production

FAI: Network as Standard

FAI also leverages the ability to boot from the network. The PXE-based boot process is a fixed part of this program, even if it can be bypassed (more on that later). To use FAI, your responsibility is first to appoint a host as the FAI master and run DHCP and TFTP servers on that host. If you already have one or both services on your network, you can reuse them, but make sure the FAI configuration and any existing infrastructure do not trip you up.

For reasons of simplicity, I assume that FAI is used on a single server, where it is responsible for PXE, including DHCP and TFTP itself. The basic system comprises Debian GNU/Linux and the installed fai-quickstart package from the fai directory. I point out explicitly where, if FAI does not exclusively manage the DHCP server, you have to take special precautions.

Ideally, you would want to define at least one deployment network without a VLAN tag, of which all affected network ports are automatically members. Most network cards do not support booting from VLAN-tagged interfaces. Even Intel's chips require special firmware for this, which the manufacturer only releases on request.

After the install, the operating system has to be configured anyway, so any VLAN tags can be configured at the same time. The system installs its operating system in an untagged network and already has the appropriate configuration of the network interfaces at hand when first booting the final operating system.

FAI Configuration

PXE provides DHCP and TFTP for large tasks. The focus is solely on giving the system a bootloader. All other required files need to be sourced elsewhere. If you bear this in mind, the basic design behind FAI becomes apparent very quickly.

The FAI master needs a couple more active services on top of DHCP and TFTP, such as an NFS server with a standard configuration. The NFS server provides various configuration files required by FAI, such as the FAI class configurations, which I will look at later in detail.

NFS is probably not the most popular protocol among admins, and today you might want to use other protocols, but because most of the clients' work is read access, this is ultimately not particularly worrying. Parallel read access to NFS is far less problematic than write access, because locking can be completely ignored.

Once the NFS master has been installed and rolled out, it plays an important role: hosting the FAI configuration files (i.e., the files from which FAI obtains its work instructions). For example, the base files that FAI needs to install an operating system can be found here.

What Happens When?

To visualize the FAI functions, it is useful to visualize the individual work steps. As soon as a server boots into a network boot environment with PXE, it is assigned an IP address by the DHCP server and then, via the next entry, details of the server on which it can use TFTP to search for files.

It is important, depending on the bootloader type used (BIOS or UEFI), that the client search for certain MAC-specific files on the TFTP server. The name of the file contains the MAC address of the network card that makes the request. The PXE standard explicitly provides for this situation, although this statement is not entirely accurate, because the MAC address of the requesting network card plays a second and far more important role in FAI: It ultimately decides whether a server receives an answer to its DHCP question at all.

Admins might also be interested in deploying a server in a PXE environment without immediately rolling out a new operating system with FAI. By default, FAI therefore only takes care of servers that you have expressly added to the DHCP server's database from the command-line interface. In other words, the default DHCP server in FAI lacks the catch-all rule that is usually found in other DHCP configurations. The command

dhcp-edit demohost 01:02:03:AB:CD:EF

demonstrates how a host can be enabled for use in FAI DHCP.

Once the DHCP configuration is done, another important step follows: You need to store a MAC-specific bootloader on the TFTP server so that the client request finds it, instead of falling into a black hole. The command for this is not complicated:

fai-chboot -IFv -u nfs://faiserver/srv/fai/config demohost

The command assumes that it is called on the host with the DHCP configuration, because fai-chboot takes the MAC address from demohost.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs

Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>


		<div class=