Deploying Debian systems with FAI

Your Own Taste

The files/ directory stores by class all the files that FAI will copy to the target system. The hierarchy below files/ is based on the Debian directory tree. To illustrate this point: If you select the CC_HPCOMPAQ class, you will expect to find the menu.lst file in the client's /boot/grub directory later. For this to happen, you need to copy the contents of menu.lst into the files/boot/grub/menu.lst/CC_HPCOMPAQ/ directory. FAI does not automatically copy user-defined files below files/ to the target system; this only happens if the configuration script contains an fcopy command.

The command

fcopy -iM /boot/grub/menu.lst

copies the GRUB bootloader configuration file menu.lst to the client. It is part of the BC_LINUX class.

The /hooks directory contains programs or scripts for customizing the installation process. Finally, the scripts/ directory contains the scripts that FAI runs during the install. You can easily use fcopy to copy files on the basis of the client class or as a local command with the ${ROOTCMD} command.

In typical Unix style, FAI offers a number of scripting options. Besides legacy shell scripts, FAI will also run Perl or Cfengine scripts. Cfengine is a good choice for modifying configuration files.

Diagnostics

After planning, collating, and configuring installation files and scripts, you are finally ready to use FAI to automate the installation process on a large number of computers. The last step is to extend the DHCP and TFTP configurations in a way that will allow the new clients to boot off the network and automatically launch into the FAI installation. To do so, you just need to apply the settings for the first test run. Once the FAI client has completed the installation, it will display a summary onscreen and wait for somebody to press Return to trigger a reboot (see Figure 3).

The FAI deployment framework stores all installation processes in logfiles on the server. If necessary, you can evaluate the files in the /-var/log/fai/ directory and check them for errors.

Remote Control

FAI is a versatile tool for automating the installation of DEB-based Linux distributions. In addition to x86, the automatic installer also supports Sparc and PowerPC architectures. The FAI installation solution is ideal for many situations, from computer clusters to heterogeneous IT infrastructures in enterprises. Once you have negotiated the learning curve, FAI provides a powerful tool capable of automating almost any Debian-based installation.

Listing 6

Hard Disk Partitioning

01 disk_config disk1 preserve_always:1 bootable:2
02 primary   /boot 200        ext2    rw
03 logical   swap  4000       swap    rw
04 logical   /tmp  10000      ext2    defaults
05 logical   /var  5000       ext3    defaults
06 logical   /     3000-      ext3    defaults,errors=remount-ro

Listing 7

Partitioning for a RAID 1 System

01 disk_config sda
02 primary  -    256   -           -
03 primary  swap 1024  swap        sw
04 primary  -    0-    -           -
05
06 disk_config sdb
07 primary  -    256   -           -
08 primary  -    1024  -           -
09 primary  -    0-    -           -
10
11 disk_config raid bootable:1
12 raid1  /boot   sda1,sdb1  ext2   rw,errors=remount-ro
13 raid2  swap    sda2,sdb2  swap   rw
14 raid3  /       sda3,sdb3  ext3   rw

Infos

  1. Fully Automatic Installation (FAI): http://www.informatik.uni-koeln.de/fai/
  2. FAI wiki entry on setup-storage: http://faiwiki.informatik.uni-koeln.de/index.php/Setup-storage

The Author

Christoph Karg is a professor of computer science at Aalen University, Germany, and has been interested in Linux and open source since his days as student.

Steffen Bornemann has worked for Aalen University as a computer scientist for three years. At the Faculty of Electronics and Computer Science, he is responsible for managing Linux computers and the Linux network.

Buy this article as PDF

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

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Router as a Mini-Server

    Many devices now run Linux – but mostly as a closed source firmware that you cannot access. We show how to use OpenWrt to free the TL-MR3020 router from its proprietary firmware and convert it into an all-around server for your home network.

  • Puppet

    Learn how to save time and streamline your system administration with the help of Puppet, a centralized configuration management tool.

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of the LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

  • Manjaro and Antergos

    Manjaro and Antergos put the power of Arch Linux in a beginner-friendly form.

  • Cfengine 3

    Automate admin tasks with the powerful Cfengine framework.

comments powered by Disqus

Direct Download

Read full article as PDF:

066-071_FAI.pdf  (774.99 kB)

News