FAI Guide (Fully Automatic Installation)

Revision History
Revision 3.0Mon, 02 Nov 2009 14:45:42 +0100TL

Table of Contents

1. Introduction
1.1. Availability
1.2. Motivation
1.3. Overview and concepts
1.4. How does FAI work
1.5. Features
2. Quickstart - For the impatient user
3. Installing FAI
3.1. Requirements
3.2. How to create a local Debian mirror
3.3. Setting up FAI
3.4. Troubleshooting the setup
4. Preparing booting
4.1. Enabling PXE on a 3Com network card with boot PROM
4.2. Booting from network card with a PXE conforming boot ROM
4.3. Creating a boot floppy
4.4. Booting from a CD-ROM
4.5. Booting from USB stick
4.6. Collecting Ethernet addresses
4.7. Configuration of the DHCP daemon
4.8. Boot messages
4.9. Collecting other system information
4.10. Checking parameters from DHCP servers
4.11. Rebooting the computer
5. Overview of the installation sequence
5.1. Monitoring the installation
5.2. Booting the kernel
5.3. Start and setup FAI
5.4. Defining classes, variables and loading kernel modules
5.5. Partitioning local disks, creating file systems
5.6. Installing software packages
5.7. Site specific customization
5.8. Automated tests
5.9. Save log files
5.10. Reboot the new installed system
6. Plan your installation, and FAI installs your plans
7. Installation details
7.1. The configuration space
7.2. The default tasks
7.3. The setup routines of the install clients
7.4. The class concept
7.5. Defining classes
7.6. Defining variables
7.7. Hard disk configuration
7.8. Software package configuration
7.9. Customization scripts in $FAI/scripts
7.10. Changing the boot device
7.11. Hooks
7.12. Looking for errors
7.13. Log files
8. How to build a Beowulf cluster using FAI
8.1. Planning the Beowulf setup
8.2. Set up the master server
8.3. Tools for Beowulf clusters
8.4. Wake on LAN with 3Com network cards
9. FAI on other architectures
9.1. How to install i386 systems from an amd64 system
9.2. FAI on PowerPC
9.3. FAI on IA64
9.4. Installing other distributions using a Debian nfsroot
9.5. FAI for Ubuntu, Suse, Redhat and Gentoo
9.6. FAI on SUN SPARC hardware running Linux
9.7. FAI for Solaris
10. Advanced FAI
10.1. Creating chroot and virtualization environments
10.2. Using FAI for updates
11. Various hints

Abstract. FAI is a non-interactive system to install, customize and manage Linux systems and software configurations on computers as well as virtual machines and chroot environments, from small networks to large infrastructures and clusters.

This manual describes the Fully Automatic Installation package. This includes the installation of the package, planning and creating of the configuration and how to deal with errors.

(c) 2000-2009 Thomas Lange

(c) 2005 Henning Glawe

Copyright. This manual is free software; you may redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

A copy of the GNU General Public License is available as /usr/share/common-licenses/GPL in the Debian GNU/Linux distribution or on the World Wide Web at the GNU website You can also obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA

1. Introduction

1.1. Availability

Homepage
http://www.informatik.uni-koeln.de/fai
FAI wiki
http://faiwiki.informatik.uni-koeln.de
Download
http://www.informatik.uni-koeln.de/fai/download
Entry for sources.list
http://www.informatik.uni-koeln.de/fai/download lenny koeln
Mailing list
https://lists.uni-koeln.de/mailman/listinfo/linux-fai
Feedback
Send feedback and comment to fai@informatik.uni-koeln.de or to the mailing list.
Bugs
Use the Debian bug tracking system (BTS) http://bugs.debian.org for reporting errors.
User visible changes
http://www.informatik.uni-koeln.de/fai/NEWS
Source tree
You can access the subversion repository containing the newest developer version of FAI using the following commands svn co svn://svn.debian.org/svn/fai/trunk fai
Source tree via http
http://svn.debian.org/wsvn/fai/

Now read this manual, then enjoy the fully automatic installation and your saved time.

1.2. Motivation

Have you ever performed identical installations of an operating system several times? Would you like to be able to install a Linux cluster with dozens of nodes single handedly?

Repeating the same task again and again is boring — and will surely lead to errors. Also a whole lot of time could be saved if the installations were done automatically. An installation process with manual interaction does not scale. But clusters have the habit of growing over the years. Think long-term rather than planning just a few months into the future.

In 1999, I had to perform an installation of a Linux cluster with one server and 16 clients. Since I had much experience doing automatic installations of Solaris operating systems on SUN SPARC hardware, the idea to build an automatic installation for Debian was born. Solaris has an automatic installation feature called JumpStart [1]. In conjunction with the auto-install scripts from Casper Dik [2], I could save a lot of time not only for every new SUN computer, but also for re-installation of existing workstations. For example, I had to build a temporary LAN with four SUN workstations for a conference, which lasted only a few days. I took these workstations out of our normal research network and set up a new installation for the conference. When it was over, I simply integrated the workstations back into the research network, rebooted just once, and after half an hour, everything was up and running as before. The configuration of all workstations was exactly the same as before the conference, because everything was performed by the same installation process. I also used the automatic installation for reinstalling a workstation after a damaged hard disk had been replaced. It took two weeks until I received the new hard disk but only a few minutes after the new disk was installed, the workstation was running as before. And this is why I chose to adapt this technique to a PC cluster running Linux.

1.3. Overview and concepts

FAI is a non-interactive system to install, customize and manage Linux systems and software configurations on computers as well as virtual machines and chroot environments, from small networks to large infrastructures and clusters. You can take one or more virgin PCs, turn on the power and after a few minutes Linux is installed, configured and running on the whole cluster, without any interaction necessary. Thus, it's a scalable method for installing and updating a cluster unattended with little effort involved. FAI uses the Debian GNU/Linux distribution and a collection of shell and Perl scripts for the installation process. Changes to the configuration files of the operating system can be made by cfengine, shell, Perl and expect scripts.

FAI's target group are system administrators who have to install Linux onto one or even hundreds of computers. Because it's a general purpose installation tool, it can be used for installing a Beowulf cluster, a rendering farm or a Linux laboratory or a classroom. Also large-scale Linux networks with different hardware or different installation requirements are easy to establish using FAI. But don't forget to plan your installation. Chapter [plan] has some useful hints for this topic.

First, some terms used in this manual are described.

install server
The host where the package fai-server is installed. It provides several services and data for all install clients. In the examples of this manual this host is called faiserver.
install client
A host which will be installed using FAI and a configuration provided by the install server. Also called client for short. In this manual, the example hosts are called demohost, nucleus, atom01, atom02,…
configuration

The details of how the installation of the clients should be performed. All configuration data is stored in a certain directory structure and is also called configuration space or config space for short. It includes information about:

  • Hard disk layout
  • Local file systems, their types, mount points and mount options
  • Software packages
  • Keyboard layout, time zone, NIS, Xorg configuration, remote file systems, user accounts,printers …
nfsroot
A file system located on the install server. It's the complete file system for the install clients during the installation process. All clients share the same nfsroot, which they mount read only.

1.4. How does FAI work

The install client which will be installed using FAI, is booted via network card or from CD or USB stick. It gets an IP address and boots a Linux kernel which mounts its root file system via NFS from the install server. After the kernel is loaded, the FAI startup script performs the automatic installation which doesn't need any interaction. First, the hard disks will be partitioned, file systems are created and then software packages are installed. After that, the new installed operating system is configured to your local needs using some scripts. Finally the new operating system will be booted from the local disk.

The details of how to install the computer (the configuration) are stored in the configuration space on the install server. Configuration files are shared among groups of computers if they are similar using the class concept. So you need not create a configuration for every new host. Hence, FAI is a scalable method to install a big cluster with a great number of nodes.

FAI can also be used as a network rescue system. You can boot your computer, but it will not perform an installation. Instead it will run a fully functional Debian GNU/Linux without using the local hard disks. Then you can do a remote login and backup or restore a disk partition, check a file system, inspect the hardware or do any other task.

1.5. Features

  • A fully automated installation can be performed.
  • Very quick unattended installation.
  • Update of running systems without re-installation.
  • Easy creation of a virtualization environment or a chroot
  • Hosts can boot from network card, CD, USB stick.
  • Simple creation of the CD and USB stick.
  • PXE with DHCP and BOOTP boot methods are supported.
  • Lilo and grub support.
  • ReiserFS, ext3 and XFS file system support.
  • Software RAID and LVM support.
  • Automatic hardware detection.
  • Remote login via ssh during installation process possible.
  • Two additional virtual terminals available during installation.
  • All similar configurations are shared among all install clients.
  • Log files for all installations are saved to the installation server.
  • Shell, Perl, expect and cfengine scripts are supported for the configuration setup.
  • Access to a Debian mirror via NFS, FTP or HTTP.
  • Can be used as a rescue system.
  • Flexible system through easy class concept.
  • Diskless client support.
  • Easily add your own functions via hooks.
  • Easily change the default behavior via hooks.


[1] Solaris 8 Advanced Installation Guide at http://docs.sun.com

[2] ftp://ftp.wins.uva.nl:/pub/solaris/auto-install