[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]

FAI Guide (Fully Automatic Installation)
Chapter 4 Overview of the installation sequence


Following steps are performed during an installation after the linux kernel has booted on the install clients.

  1. Set up FAI
  2. Load kernel modules
  3. Define classes
  4. Define variables
  5. Partition local disks
  6. Create and mount local filesystems
  7. Install software packages
  8. Call site specific configuration scripts
  9. Save log files
  10. Reboot the new installed system

You can also define additional programs or scripts, that will be run on particular occasions. They are called hooks. Hooks can add additional functions to the installation process or replace the default subtasks of FAI. So it's very easy to customize the whole installation process. Hooks are explained in detail in Hooks, Section 6.11.

The installation time is mainly determined by the amount of software that will be installed. A dual Pentium II, 400 MHZ with 128 MB RAM and a 10 Mbit network card needs about 11 min when installing 520 MB of software to local disk. An installation with 90 MB software (a dataless client) only needs two minutes. The checking for bad blocks on a 4 GB partition needs additional 6 minutes. Using a 100 Mbit LAN does not decrease the installation time considerable, so the network will not be the bottleneck when installing several clients simultaneously.


4.1 Set up FAI

After the install client has booted, only the script /sbin/rcS_fai[14] is executed. This is the main script, that controls the sequence of tasks for FAI. No other scripts in /etc/init.d/ are executed.

A ramdisk is created and mounted to /tmp, which is the only writable directory, until local filesystems are mounted. Additional parameters are received from the BOOTP or DHCP daemon and the configuration space if mounted via NFS from the install server to /fai. The setup is finished after additional virtual terminals are created and the secure shell daemon for remote access is started on demand.


4.2 Defining classes, variables and loading kernel modules

Now scripts in /fai/class/ are executed to define classes and variables that are later used in the site specific configuration scripts. All scripts matching S[0-9]*.{sh,pl} are executed in alphabetical order. Every word that these scripts print to the standard output are interpreted as class names. These classes are defined for this install client. You can also say this client belongs to these classes. A class is defined or undefined and has no value. Only defined classes are of interest for an install client. A description of all classes can be found in /usr/share/doc/fai/classes_description.txt. It is advisable to document the job a new class performs. Then, this documentation is the base for composing a configuration from classes.

The scripts S05modules.sh loads kernel modules on demand. So you can use classes when loading modules and also define more classes after the kernel has loaded modules and recognized new hardware. A complete description of all these scripts can be found in Scripts in /fai/scripts, Section 6.9.

After defining the classes, every file matching *.var, which prefix is a defined class, is executed to define variables.


4.3 Partitioning local disks, creating filesystems

Then exactly one disk configuration file from /fai/disk_config is selected using classes. It's the description how all the local disks will be partitioned, which filesystems should be created and how they are mounted. It's also possible to preserve the disk layout or to preserve the data on a partition. It's done by the command setup_harddisks, which uses sfdisk for partitioning. The format of the configuration file is described in /usr/share/doc/fai/README.disk_config.

During the installation process all local filesystems are mounted relative to /tmp/target . So, for e.g. /tmp/target/home will become /home in the new installed system.


4.4 Installing software packages

When local filesystems are created, they are all empty (except for preserved partitions). Now the Debian base system and all requested software packages are installed on the new filesystems. First the base archive is unpacked, then the command install_packages installs all packages using apt-get(8) without any manually interaction needed. If a packages requires an other packages it resolves this dependency by installing the required package.

Classes are also used when selecting the configuration files in /fai/package_config/ for software installation. The format of the configuration files is described in Software package configuration, Section 6.8.


4.5 Site specific configuration

After all requested software packages are installed, the system is nearly ready to go. But not all default configurations of the software packages will meet your site specific needs. So you can call arbitrary scripts, which adjust the system configuration. Therefore scripts, that match a class name in /fai/scripts[15] will be executed. FAI comes with some templates for these scripts, but you can write your own Bourne, bash, perl, cfengine or expect scripts.

These important scripts are described in detail in Scripts in /fai/scripts, Section 6.9.


4.6 Save log files

When all installation tasks are finished, the log files are written to /var/log/fai/$HOSTNAME/install/ [16] on the new system and to the a account on the install server, if $LOGUSER is defined in /etc/fai.conf.


4.7 Reboot the new installed system

At least the system is automatically rebooted if the flag reboot is set [17]. This is only useful if booting from network card or if you can change the boot device using the command bootsector. Otherwise, you have to remove the floppy disk and type return or call faireboot from a remote login. You must change the boot device, to boot the new installed system otherwise the installation would be performed again. Read Changing the boot device, Section 6.10 how to change the boot device.


[ previous ] [ Abstract ] [ Copyright Notice ] [ Contents ] [ next ]
FAI Guide (Fully Automatic Installation)
Version 1.3.1 for FAI version 2.2.3, 15 november 2001
Thomas Lange lange@informatik.uni-koeln.de