[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ next ]

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


The following tasks are performed during an installation after the linux kernel has booted on the install clients.

  1. Set up FAI
  1. Load kernel modules
  1. Define classes
  1. Define variables
  1. Partition local disks
  1. Create and mount local filesystems
  1. Install software packages
  1. Call site specific configuration scripts
  1. Save log files
  1. Reboot the new installed system

You can also define additional programs or scripts which 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 determined by the amount of software but also by the speed of the processor and hard disk. Here are some sample times. All install clients have an 100Mbit network card installed. Using a 10 Mbit LAN does not increase the installation time considerably, so the network will not be the bottleneck when installing several clients simultaneously.

     Athlon XP1600+    , 896MB,SCSI disk,   1 GB software  6 min
     AMD-K7, 500MHz    , 320MB, IDE disk, 780 MB software 12 min
     PentiumPro 200MHz , 128MB, IDE disk, 800 MB software 28 min
     Pentium III 850MHz, 256MB, IDE disk, 820 MB software 10 min
     Pentium III 850MHz, 256MB, IDE disk, 180 MB software  3 min

4.1 Monitoring the installation

You can monitor the installation of all install clients with the command faimond(8). All clients check if this daemon is running on the install server (or the machine defined by the variable monserver. Then, a message is sent when a task starts and ends. The fai monitor daemon prints this messages to standard output. In the future, there will be a graphical frontend available.


4.2 Set up FAI

After the install client has booted, only the script /sbin/rcS_fai[11] is executed. This is the main script which 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.3 Defining classes, variables and loading kernel modules

Now the script fai-class(1) is used to define classes. Therefore several scripts in /fai/class/ are executed to define classes. All scripts matching [0-9]* (they start with a digit) are executed in alphabetical order. Every word that these scripts print to the standard output are interpreted as class names. Scripts ending in .source are sourced, so they can define new classes by adding these classes to the variable newclasses (see 06hwdetect.source for an example). The output of these scripts is ignored. These classes are defined for the 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. The 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 the whole configuration from classes. The scripts 06hwdetectsource loads kernel modules on demand. The complete description of all these scripts can be found in Scripts in /fai/scripts, Section 6.9.

The script 30menu.source pops up a little menu and asks the user which kind of installation should be performed (e.g. CAD workstation, notebook, scientific workstation, work group server, Gnome desktop...). Keep in mind that this won't lead to a fully automatic installation ;-)

After defining the classes, every file matching *.var with a prefix which matches a defined class is executed to define variables. There, you should define the variable FAI_ACTION and others. By default, FAI_ACTION is defined via the command fai-chboot(8).


4.4 Partitioning local disks, creating filesystems

For disk partitioning exactly one disk configuration file from /fai/disk_config is selected using classes. It's the description of how all the local disks will be partitioned, where filesystems should be created (and their types like ext2, ext3, reiserfs), and how they are mounted. It's also possible to preserve the disk layout or to preserve the data on certain partitions. 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. For example /tmp/target/home will become /home in the new installed system.


4.5 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(8) installs all packages using apt-get(8) without any manual interaction needed. If a packages requires an other package, apt-get(8) 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.6 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 which match a class name in /fai/scripts will be executed. If /fai/scripts/classname/ is a directory, all scripts that match S[0-9]* in this directory are executed. So it is possible to have several scripts of different types (shell, cfengine, ...) to be executed for one class. FAI comes with some examples 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.7 Save log files

When all installation tasks are finished, the log files are written to /var/log/fai/$HOSTNAME/install/ [12] on the new system and to the account on the install server if $LOGUSER is defined in /etc/fai/fai.conf. It is also possible to specify another host as destination of the log saving by in a file in /fai/class/. Additionally, two symlinks will be created to indicated the last directory written. This method uses rsh/rcp or ssh/scp and is default.

You can use other methods to save logs to the remote server. The currently selected method is defined by the $FAI_LOGPROTO variable in file /etc/fai/fai.conf:

ftp
This option saves logs to the remote FTP server defined by the $LOGSERVER variable ($SERVER value is used if not set). Connection to the FTP server is done as user $LOGUSER using password $LOGPASSWD. The FTP server log directory is defined in $LOGREMOTEDIR. These variables are also defined in file /etc/fai/fai.conf. You need write access for the $LOGREMOTEDIR on the FTP server.

All files in the directory /tmp/fai are copied to the FTP server following this example: ftp://$LOGUSER:$LOGPASSWD@$LOGSERVER/$LOGREMOTEDIR/.

none
Don't save the log file to the install server.

4.8 Reboot the new installed system

At least the system is automatically rebooted if "reboot" was added to FAI_FLAGS. Normally this should boot the new installed system from its second boot device, the local hard disk. To skip booting from network card, you can use the command fai-chboot(8) to enable localboot. If using a boot floppy you have to remove the floppy from the floppy drive. Otherwise the installation would be performed again. Read Changing the boot device, Section 6.10 for how to change the boot device.


4.9 For the impatient user

So, you do not like to read the whole manual? You like to try an installation without reading the manual? OK. Here's how to succeed in a few minutes.

But now don't forget to read the next chapter Plan your installation, and FAI installs your plans, Chapter 5!


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ next ]

FAI Guide (Fully Automatic Installation)

FAI Guide version 2.4.5, 23 oct 2004 for FAI package version 2.6

Thomas Lange lange@informatik.uni-koeln.de