{"id":399,"date":"2025-01-30T21:15:21","date_gmt":"2025-01-30T21:15:21","guid":{"rendered":"https:\/\/www.aran.cat\/wp\/?p=399"},"modified":"2025-01-30T21:22:27","modified_gmt":"2025-01-30T21:22:27","slug":"fai-guide-fully-automatic-installation","status":"publish","type":"post","link":"https:\/\/www.aran.cat\/wp\/?p=399","title":{"rendered":"FAI Guide (Fully Automatic Installation)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\">https:\/\/fai-project.org\/fai-guide<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thomas Lange<br><code>&lt;<a href=\"mailto:lange@debian.org\">lange@debian.org<\/a>><\/code><br>version 6.0, 17 Jan 2024<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An older French version of this guide is available at <a href=\"https:\/\/fai-project.org\/fai-guide-fr\">https:\/\/fai-project.org\/fai-guide-fr<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_abstract\">Abstract<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This manual describes the Fully Automatic Installation software. This includes the installation of the packages, setting up the server, creating of the configuration and how to deal with errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(c) 2000-2024 Thomas Lange<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Copyright<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is distributed in the hope that it will be useful, but <strong>without any warranty<\/strong>; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A copy of the GNU General Public License is available as <em>\/usr\/share\/common-licenses\/GPL<\/em> in the Debian GNU\/Linux distribution or on the World Wide Web at <a href=\"https:\/\/www.gnu.org\/copyleft\/gpl.html\">the GNU website<\/a> You can also obtain it by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_introduction_a_introduction\">Introduction<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_availability_a_availability\">Availability<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Homepage<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\">https:\/\/fai-project.org<\/a> FAI wiki<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/wiki.fai-project.org\">https:\/\/wiki.fai-project.org<\/a> Download<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/download\">https:\/\/fai-project.org\/download<\/a> Entry for <em>sources.list<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>deb https:\/\/fai-project.org\/download bookworm koeln<\/code> Manual pages<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/doc\/man\/\">https:\/\/fai-project.org\/doc\/man\/<\/a> Mailing list<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/lists.uni-koeln.de\/mailman\/listinfo\/linux-fai\">https:\/\/lists.uni-koeln.de\/mailman\/listinfo\/linux-fai<\/a> Feedback<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Send feedback and comments to <a href=\"mailto:fai@fai-project.org\">fai@fai-project.org<\/a> or to the mailing list. Bugs<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Debian bug tracking system (BTS) <a href=\"https:\/\/bugs.debian.org\/src:fai\">https:\/\/bugs.debian.org\/src:fai<\/a> User visible changes<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/NEWS\">https:\/\/fai-project.org\/NEWS<\/a> Source tree via git<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">git clone git:\/\/github.com\/faiproject\/fai.git View source tree via https<\/p>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/github.com\/faiproject\/fai\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The man pages always include up-to-date information and a lot of details of all FAI commands. So, don\u2019t forget to read them carefully. Now read this manual, then enjoy the fully automatic installation and your saved time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_motivation_a_motivation\">Motivation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Repeating the same task again and again is boring\u2009\u2014\u2009and 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_1\">1<\/a>]. In conjunction with the auto-install scripts from Casper Dik [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_2\">2<\/a>], 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 choose to adapt this technique to a PC cluster running Linux.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_work_a_how_does_fai_work\">How does FAI work<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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 (the nfsroot) from the install server. After the kernel is started, the FAI startup script performs the automatic installation which doesn\u2019t 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 even if their configuration is not identical.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">FAI can also be used as a rescue system or for hardware inventory. 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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_features_a_features\">Features<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A fully automated installation can be performed.<\/li>\n\n\n\n<li>Very quick unattended installation.<\/li>\n\n\n\n<li>Flexible system through easy class concept.<\/li>\n\n\n\n<li>Update of running systems without re-installation.<\/li>\n\n\n\n<li>Cloud images for virtualization environment.<\/li>\n\n\n\n<li>Hosts can boot from network card, CD, USB stick.<\/li>\n\n\n\n<li>Simple creation of an installation or live ISO.<\/li>\n\n\n\n<li>PXE with DHCP boot method is supported.<\/li>\n\n\n\n<li>ReiserFS, ext3\/ext4, btrfs and XFS file system support.<\/li>\n\n\n\n<li>Software RAID and LVM support. LUKS support.<\/li>\n\n\n\n<li>Automatic hardware detection.<\/li>\n\n\n\n<li>You can deploy Debian, Ubuntu, Rocky Linux, CentOS, AlmaLinux, SuSE<\/li>\n\n\n\n<li>Remote login via ssh during installation process possible.<\/li>\n\n\n\n<li>All similar configurations are shared among all install clients.<\/li>\n\n\n\n<li>Log files for all installations are saved to the installation server.<\/li>\n\n\n\n<li>Shell, Perl, Python, Ruby, expect and CFEngine scripts are supported during the customization step.<\/li>\n\n\n\n<li>Support for many protocols like NFS, FTP, HTTPS, git.<\/li>\n\n\n\n<li>Can be used as a rescue system and for hardware inventory.<\/li>\n\n\n\n<li>Diskless client support.<\/li>\n\n\n\n<li>Cross-architecture support e.g. for embedded devices.<\/li>\n\n\n\n<li>Easily add your own functions via hooks or change the default behavior.<\/li>\n\n\n\n<li>Cloning machines using disk images is supported.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_installation_times\">Installation times<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The installation time is determined by the amount of software and the speed of the hard disk. Here are some sample times. All install clients had a 1Gbit network card installed.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>CPU<\/th><th>RAM<\/th><th>Disk<\/th><th>Software installed<\/th><th>time<\/th><\/tr><\/thead><tbody><tr><td>i7-3770T 2.50GHz<\/td><td>8GB<\/td><td>SSD<\/td><td>6 GB software<\/td><td>8.5 min<\/td><\/tr><tr><td>Core-i7 3.2GHz<\/td><td>6GB<\/td><td>SATA disk<\/td><td>4.3GB software<\/td><td>7 min<\/td><\/tr><tr><td>Core-i7 3.2GHz<\/td><td>6GB<\/td><td>SATA disk<\/td><td>471 MB software<\/td><td>77sec<\/td><\/tr><tr><td>Intel Core2 Duo<\/td><td>2GB<\/td><td>SATA disk<\/td><td>3 GB software<\/td><td>14 min<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_impatient_a_quickstart_for_the_impatient_user\">Quickstart &#8211; For the impatient user<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_first_a_my_first_installation\">My first installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Without further ado, this section will provide a quick and easy demonstration of a fully automatic installation using the FAI CD and a virtual machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Just download the CD ISO image from <a href=\"https:\/\/fai-project.org\/fai-cd\">https:\/\/fai-project.org\/fai-cd<\/a> and boot your VM using this CD. You will see a grub menu where you can select from different installation types.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This installation will run without an install server. The CD installation is the same as when run in a network environment using the FAI install server and can also be used from USB stick on a real computer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also create yourself a custom fully automated installation image on the webpage <a href=\"https:\/\/fai-project.org\/FAIme\">https:\/\/fai-project.org\/FAIme<\/a> without the need of installing FAI on your computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_cdserver_a_my_first_server_installation\">My first server installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We will create a private network and start two virtual machines. One will become your own FAI server, the other will be an install client.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you intend to use VMware or VirtualBox, ensure that your client uses a bridged network connection. A detailed description is in the FAI wiki [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_3\">3<\/a>]. Also, it is not possible to use bridged network interfaces over wireless, as most WiFi network cards do not support this feature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When using Qemu\/KVM and the <code>fai-kvm<\/code> wrapper you can create the network using the command <code>fai-mk-network<\/code>. First install some packages<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt-get install qemu-system-gui qemu-kvm qemu-utils<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The next command sets up a private network with a software bridge with several tap devices that belong to the user <code>&lt;username&gt;<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fai-mk-network &lt;username&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that, you can use fai-kvm (-h will give you some help) for starting virtual machines using KVM that are connected to this private network. Be careful. By default, fai-kvm will create the disk images for the virtual machines in <code>\/tmp<\/code>, which is a RAM disk on most systems. It\u2019s no problem to create an empty 20G disk image in \/tmp (even if this partition is of 4GB size), but while the VM is writing data to its disk, this will start to consume space in <code>\/tmp<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start the first virtual host, which will become the FAI server [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_4\">4<\/a>]:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fai-kvm -Vn -s20 -u 1 cd faicd64-small.iso<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the grub menu select <code>faiserver, using internal DHCP and a fixed IP<\/code>. This will install a host called faiserver with IP 192.168.33.250 which contains all software needed for a FAI server. It will also set up a local package cache (using apt-cacher-ng). Once the installation is finished, reboot the machine. During the first boot of the new system, it will automatically set up the nfsroot. This may take some minutes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that you can start additional hosts using network boot. For every new host, you have to use a different value for <code>-u<\/code>, which will be used for generating different MAC addresses and using different disk image file names.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fai-kvm -Vn -u 2 pxe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Those install clients will show you a menu, where you can select which type of installation you like to perform. If the install client does not find the server, it is usually because fai-monitor is no longer running on it. This can happen, if you reboot the faiserver after the installation. To remedy this, simply run fai-monitor on the faiserver and re-attempt the client boot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another client could be started with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fai-kvm -Vn -u 3 pxe<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can start as many machines in the network as tap devices are available. All these machines can connect to the outside internet but are only reachable from your host machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_overview_a_overview_and_concepts\">Overview and Concepts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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\u2019s a scalable method for installing and updating a cluster unattended with little effort involved. FAI uses the Linux operating system 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 (bash and zsh), Perl, Python, Ruby and expect scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">FAI\u2019s target group are system administrators who have to install Linux onto one or even hundreds of computers. Because it\u2019s 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\u2019t forget to plan your installation. Chapter <a href=\"https:\/\/fai-project.org\/fai-guide\/#plan\">[plan]<\/a> has some useful hints for this topic.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_terms_a_important_terms\">Important Terms<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, some terms used in this manual are described. install server<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It provides DHCP, TFTP and NFS services and the configuration data for all install clients. In the examples of this manual this host is called <em>faiserver<\/em>. The host where the package <em>fai-server<\/em> is installed. install client<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 <em>demohost, xfcehost, gnomehost \u2026<\/em> This computer should boot from its network interface using PXE. configuration space<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A subdirectory structure containg several files. Those files describe the details of how the installation of the clients will be performed. All configuration data is stored here. It\u2019s also called config space for short. It includes information about:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hard disk layout in a format similar to fstab<\/li>\n\n\n\n<li>Local file systems, their types, mount points and mount options<\/li>\n\n\n\n<li>Software packages<\/li>\n\n\n\n<li>Keyboard layout, time zone, Xorg configuration, remote file systems, user accounts, printers \u2026<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The package <em>fai-doc<\/em> includes a sample configuration space including examples for hosts using the XFCE and GNOME environment amongst other examples. Calling <code>fai-mk-configspace<\/code> copies these examples to <em>\/srv\/fai\/config<\/em>. It\u2019s recommended to study those config files and scripts for easier understanding how FAI works. nfsroot, NFS-Root<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A file system located on the install server. During the installation process it\u2019s the complete file system for the install clients. All clients share the same nfsroot, which they mount read only. The nfsroot needs about 1.1GB of free disk space. TFTP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Serves clients the initrd and kernel that is used for the installation process. Along with the file system served by NFS, these two make up a temporary OS in which the installations are performed. FAI classes<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Classes are names which determine which configuration file is selected. If a client belongs to class WEBSERVER, it will be configured as a webserver, the class DESKTOP for e.g. determines which software packages will be installed. profile<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A FAI profile is just a list of FAI classes assiged to a profile name, which is extended by a description of this profile. I.e. one could have two \u00abWebserver\u00bb profiles, one including the APACHE class another including the NGINX class, to then install the respective webserver solution. tasks<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The installation of a client consists of several parts, which are called tasks. Tasks are predefined subroutines which perform a certain part of the FAI. The following FAI tasks are performed during an installation on the install clients.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>confdir               # get the config space\nsetup                 # some initialization, start sshd on demand\ndefclass              # define FAI classes\ndefvar                # define variables\naction                # evaluate FAI_ACTION\ninstall               # Start the installation\npartition             # partition the harddisks, create file systems\nmountdisks            # mount the file systems\nextrbase              # extract the base.tar.xz\ndebconf               # do the Debian debconf preseeding\nrepository            # prepare access to the package repository\nupdatebase            # Set up package tools and update packages\ninstsoft              # install software packages\nconfigure             # call customization scripts\nfinish                # do some cleanup, show installation statistics\ntests                 # call tests if defined\nchboot                # call fai-chboot on the install server\nsavelog               # save log files to local and remote location\nfaiend                # reboot host, eject CD if needed<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These are tasks, which are only executed when a different action is performed<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dirinstall           # install a chroot environment\nsoftupdate           # only do the system configuration\nsysinfo              # print detailed system information\ninventory            # print short hardware inventory list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For a more in-depth description of <em>tasks<\/em> , see <a href=\"https:\/\/fai-project.org\/fai-guide\/#tasks\">[tasks]<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that you are not limited to the FAI tasks. You can also define additional programs or scripts which will be run on particular occasions. They are called <em>hooks<\/em>. hooks<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hooks are plugins, they can add additional functionality to the installation process or even replace entire tasks of FAI. Hooks are explained in detail in <a href=\"https:\/\/fai-project.org\/fai-guide\/#hooks\">[hooks]<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_classc_a_the_class_concept\">The class concept<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Classes are used in nearly all tasks of the installation. Classes determine which configuration files to choose from a list of available alternatives. To determine which config files to use, FAI searches the list of defined classes and uses all configuration files that match a class name [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_5\">5<\/a>]. The following loop implements this function in pseudo shell code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for class in $all_classes; do\n   if &#91; -r $config_dir\/$class ]; then      # if a file with name $class exists\n      your_command $config_dir\/$class      # call a command with this file name\n      # exit if only the first matching file is needed\n   fi\ndone<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The very nice feature of this is that you can add a new configuration alternative and it will automatically be used by FAI without changing the code, if the configuration file uses a class name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is because the loop automatically detects new configuration files that should be used. The idea of using classes in general and using certain files matching a class name for a configuration is adopted from the installation scripts by Casper Dik for Solaris. This technique proved to be very useful and easy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can group multiple hosts that share the same configuration files by using the same class. You can also split the whole configuration data for all clients into several classes and use them like lego bricks and build the entire configuration for a single client by assembling the bricks together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a client belongs to class <em>A<\/em>, we say the class <em>A<\/em> is defined for this client. A class has no value, it is just defined or undefined.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Classes determine how the installation is performed. For example, an install client can be configured to get the XFCE desktop by just adding the class <em>XFCE<\/em> to it. Naturally, also more granular configurations are possible. For instance, classes can describe how the hard disk should be partitioned, they can define which software packages will be installed, or which customization steps are performed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Often, a client configuration is created by only changing or appending the classes to which this client belongs, making the installation of a new client very easy. Thus no additional information needs to be added to the configuration space if the existing classes suffice for your needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, classes are a central pillar of customizing your configuration space and with that your client installation. On how to define your own classes, refer to <a href=\"https:\/\/fai-project.org\/fai-guide\/#defining classes\">[defining classes]<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_setup_a_setup_your_faiserver\">Setup your faiserver<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s how to set up the install server in a few minutes. Following steps are needed:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Set up the install server\n<ol class=\"wp-block-list\">\n<li>Install FAI packages<\/li>\n\n\n\n<li>Create the nfsroot<\/li>\n\n\n\n<li>Copy the examples to the config space<\/li>\n\n\n\n<li>Configure network daemons<\/li>\n\n\n\n<li>Create the PXELINUX configurations<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>Boot and install clients<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_install_the_fai_packages\">Install the FAI packages<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install the key of the FAI project package repository.<\/li>\n\n\n\n<li>Add the URL of the package repository of the FAI project.<\/li>\n\n\n\n<li>Install the package <em>fai-quickstart<\/em> on your install server.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Use these commands for installing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># wget -O \/etc\/apt\/trusted.gpg.d\/fai-project.gpg https:\/\/fai-project.org\/download\/2BF8D9FE074BCDE4.gpg\n# echo \"deb http:\/\/fai-project.org\/download bookworm koeln\" &gt; \/etc\/apt\/sources.list.d\/fai.list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt install extrepo ; extrepo enable fai<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and then<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt-get update\n# aptitude install fai-quickstart<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will also install the packages for DHCP, TFTP and NFS server daemons.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_create_the_nfsroot\">Create the nfsroot<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Also enable the package repository of the FAI project in a different <em>sources.list<\/em> file which is used when building the nfsroot. Then, enable the log user for FAI.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># sed -i -e 's\/^#deb\/deb\/' \/etc\/fai\/apt\/sources.list\n# sed -i -e 's\/#LOGUSER\/LOGUSER\/' \/etc\/fai\/fai.conf<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>By default, FAI uses <a href=\"http:\/\/deb.debian.org\">http:\/\/deb.debian.org<\/a> as package mirror, which should attempt to find a fast package repository for you. [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_6\">6<\/a>] Now, we can run <code>fai-setup(8)<\/code> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_7\">7<\/a>] and check if everything went well. The log file is written to \/var\/log\/fai\/fai-setup.log.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># fai-setup -v<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>These are some of the lines you will see at the end of <em>fai-setup<\/em>. A complete example of <em>fai-setup.log<\/em> is available on the FAI web page at <a href=\"https:\/\/fai-project.org\/logs\/fai-setup.log\">https:\/\/fai-project.org\/logs\/fai-setup.log<\/a>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>FAI packages and related packages inside the nfsroot:\ndracut             059-4\ndracut-live        059-4\ndracut-network     059-4\ndracut-squash      059-4\nfai-client         6.2\nfai-nfsroot        6.2\nfai-setup-storage  6.2\nWaiting for background jobs to finish\nfai-make-nfsroot finished properly.\nLog file written to \/var\/log\/fai\/fai-make-nfsroot.log\nAdding line to \/etc\/exports: \/srv\/fai\/config 192.168.33.250\/24(async,ro,no_subtree_check)\nAdding line to \/etc\/exports: \/srv\/fai\/nfsroot 192.168.33.250\/24(async,ro,no_subtree_check,no_root_squash)\nReloading nfs-kernel-server configuration (via systemctl): nfs-kernel-server.service.\n\nYour initial config space is now located in \/srv\/fai\/config\nPlease don't forget to fill out the FAI questionnaire after you've finished your project with FAI.\n\nFAI setup finished.\nLog file written to \/var\/log\/fai\/fai-setup.log<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>fai-setup has created the LOGUSER, the nfsroot and has added additional lines to <em>\/etc\/exports<\/em>. The subdirectories added to <em>\/etc\/exports<\/em> are exported via NFS v3, so all install clients in the same subnet can mount them via NFS.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_creating_the_configuration_space\">Creating the configuration space<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install the simple examples into the configuration space [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_8\">8<\/a>].<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ fai-mk-configspace<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These examples contain configuration for some sample hosts. Depending on the host name used, your computer will be configured as follows: demohost<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A machine which needs only a small hard disk. This machine is configured with network as DHCP client, and an account demo is created. xfcehost<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A XFCE desktop is installed, using LVM, and the account demo is created. gnomehost<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A GNOME desktop is installed, and the account demo is created. ubuntuhost<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A Ubuntu desktop will be installed, and the account demo is created. other host names<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hosts with another host name will most notably use the classes FAIBASE, DHCPC and GRUB.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All hosts will have an account called <em>demo<\/em> with password <em>fai<\/em>. The root account also has the password <em>fai<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the FAI flag <code>menu<\/code> is added, instead of using the host name for determing the type of installation, a menu is presented, and the user can choose a profile for the installation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_configure_the_network_daemons\">Configure the network daemons<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For booting the install client via PXE, the install server needs a DHCP and a TFTP daemon running. The package <em>fai-quickstart<\/em> has already installed the software packages for those daemons. Additionally the package of the NFS server for exporting the nfsroot and the config space was installed.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_a_id_bootdhcp_a_configuration_of_the_dhcp_daemon\">Configuration of the DHCP daemon<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Ideally, your faiserver should also be your DHCP server. If that is not the case, instruct the admin responsible of the DHCP server to configure it according to this section. Optionally, it is possible to avoid that by using the <a href=\"https:\/\/fai-project.org\/fai-guide\/#autodiscover\">[autodiscover]<\/a> feature released in FAI 5.0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An example for <code>dhcpd.conf(5)<\/code> is provided with the <em>fai-doc<\/em> package. Start using this example and look at all options used therein.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cp \/usr\/share\/doc\/fai-doc\/examples\/etc\/dhcpd.conf \/etc\/dhcp\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The only FAI specific information inside this configuration file is to set <code>filename<\/code> (DHCP option 67) to <code>fai\/pxelinux.0<\/code> and to set <code>next-server<\/code> (DHCP option 66, also called TFTP server name) and <code>server-name<\/code> to the name of your install server. All other information is only network related data, which is used in almost all DHCP configurations. Adjust these network parameters to your local needs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>deny unknown-clients;\noption dhcp-max-message-size 2048;\nuse-host-decl-names on;\n\nsubnet 192.168.33.0 netmask 255.255.255.0 {\n   option routers 192.168.33.250;\n   option domain-name \"my.example\";\n   option domain-name-servers 192.168.33.250;\n   option time-servers faiserver;\n   option ntp-servers faiserver;\n   server-name faiserver;\n   next-server faiserver;\n   filename \"fai\/pxelinux.0\";\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you make any changes to the DHCP configuration, you must restart the daemon.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># invoke-rc.d isc-dhcp-server restart<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you have multiple network interfaces, you can define on which interface the server will listen in <em>\/etc\/default\/isc-dhcp-server<\/em>. By default, the DHCP daemon writes its log messages to <em>\/var\/log\/daemon.log<\/em>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_adding_a_host_entry_to_dhcp\">Adding a host entry to DHCP<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The MAC address is given by the hardware of the network card. For each install client you collect its MAC address and to map it to an IP address and to a host name. First, we add the IP address and the hostname to <em>\/etc\/hosts<\/em> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_9\">9<\/a>].<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>192.168.33.100    demohost<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The mapping from the MAC address to the IP address is done in the <em>dhcpd.conf<\/em> file. Here, we add a host entry using the command <code>dhcp-edit(8)<\/code>. Here you have to replace 01:02:03:AB:CD:EF ith the MAC you have found.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># dhcp-edit demohost 01:02:03:AB:CD:EF<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After calling this command, this is what the host entry in <em>dhcpd.conf<\/em> will look like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>host demohost {hardware ethernet 01:02:03:AB:CD:EF;fixed-address demohost;}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_tftp\">TFTP<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Normally, you do not need any changes to the TFTP dameon configuration. The files which are provided by TFTP are located in <em>\/srv\/tftp\/fai<\/em>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_nfs\">NFS<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The command <code>fai-setup<\/code> has already set up the NFS daemon and added some lines to the configuration file <em>\/etc\/exports<\/em>. It exports the directories using NFS v3.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_creating_the_pxelinux_configuration\">Creating the PXELINUX configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The last step before booting your client for the first time is to specify what configuration the client should boot when doing PXE boot. We use the command <code>fai-chboot(8)<\/code> to create a pxelinux configuration for each install client. This includes information about the kernel, the initrd, the config space and some boot parameters. You should read the manual page, which gives you some good examples. Here\u2019s the command for starting the installation for the host demohost.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ fai-chboot -IFv -u nfs:\/\/faiserver\/srv\/fai\/config demohost\n\nBooting kernel vmlinuz-4.19.0-5-amd64\n append initrd=initrd.img-4.19.0-5-amd64 ip=dhcp\n   FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs:\/\/faiserver\/srv\/fai\/config\n\ndemohost has 192.168.33.100 in hex C0A82164\nWriting file \/srv\/tftp\/fai\/pxelinux.cfg\/C0A82164 for demohost<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, you should have a working faiserver setup and your clients should boot into FAI and be able to install one of the examples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the following section, you can read about planning your installation, tailoring your configuration space to your particular needs and extending FAI using hooks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_custom_server_a_custom_server\">Custom server<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The faiserver and its setup is by no means static. It is possible to customize and extend your server. For this, please refer to the <a href=\"https:\/\/fai-project.org\/fai-guide\/#Customizing your install server setup\">[Customizing your install server setup]<\/a> section in <a href=\"https:\/\/fai-project.org\/fai-guide\/#advanced\">[advanced]<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_plan_a_plan_your_installation\">Plan your installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before starting your installation, you should invest a lot of time into planning your installation. Once you\u2019re happy with your installation concept, FAI can do all the boring and repetitive tasks to turn your plans into reality. FAI can\u2019t do good installations if your concept is imperfect or lacks some important details. Start planning the installation by answering the following questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Will I create a Beowulf cluster, or do I have to install some desktop machines?<\/li>\n\n\n\n<li>What does my LAN topology look like?<\/li>\n\n\n\n<li>Do I have uniform hardware? Will the hardware stay uniform in the future?<\/li>\n\n\n\n<li>Does the hardware need a special kernel?<\/li>\n\n\n\n<li>How should the hosts be named?<\/li>\n\n\n\n<li>How should the local hard disks be partitioned?<\/li>\n\n\n\n<li>Which applications will be run by the users?<\/li>\n\n\n\n<li>Do the users need a queuing system?<\/li>\n\n\n\n<li>What software should be installed?<\/li>\n\n\n\n<li>Which daemons should be started, and what should the configuration for these look like?<\/li>\n\n\n\n<li>Which remote file systems should be mounted?<\/li>\n\n\n\n<li>How should backups be performed?<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You also have to think about user accounts, printers, a mail system, cron jobs, graphic cards, dual boot, NIS, NTP, timezone, keyboard layout, exporting and mounting directories via NFS and many other things. So, there\u2019s a lot to do before starting an installation. And remember that knowledge is power, and it\u2019s up to you to use it. Installation and administration is a process, not a product. FAI can\u2019t do things you don\u2019t tell it to do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You don\u2019t need to start from scratch. Look at the files and scripts in the configuration space. There are a lot of things you can use for your own installation. A good paper called \u00abBootstrapping an Infrastructure\u00bb with more aspects of building an infrastructure is available at <a href=\"http:\/\/www.infrastructures.org\/papers\/bootstrap\/bootstrap.html\">http:\/\/www.infrastructures.org\/papers\/bootstrap\/bootstrap.html<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_c3_a_the_configuration_space_and_its_subdirectories\">The configuration space and its subdirectories<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The configuration space is the collection of information about how exactly to install a client. The central configuration space for all install clients is located on the install server in <em>\/srv\/fai\/config<\/em> and its subdirectories. This will be mounted by the install clients to <em>\/var\/lib\/fai\/config<\/em>. The main installation command <code>fai(8)<\/code> uses all these subdirectories in the order listed except for hooks.<em>class\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Scripts and files to define classes and variables. <em>disk_config\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configuration files for disk partitioning, software RAID, LVM and file system creation. <em>basefiles\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Normally the file <em>base.tar.xz<\/em> (located inside the nfsroot) is extracted on the install client after the new file systems are created and before package are installed. This is a minimal base image, created right after calling debootstrap during the creation of the nfsroot on the install server. If you want to install another distribution than the nfsroot is, you can put a tar file into the subdirectory <em>basefiles\/<\/em> and name it after a class. Then the command <code>ftar(8)<\/code> is used to extract the tar file based on the classes defined. Thus the file has to be named <em>CLASS.tar.xz<\/em> not <em>CLASS.base.tar.xz<\/em>. This is done in task <em>extrbase<\/em>. Use this if you want to install another distribution or version than that running during the installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This basefile can also be received based on FAI classes via HTTP\/HTTPS or FTP by defining the variable <code>FAI_BASEFILEURL<\/code>. FAI will download a file CLASSNAME.tar.xz (or tgz, or tar.gz,\u2026) from this URL, if <code>CLASSNAME<\/code> matches a FAI class.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FAI_BASEFILEURL=https:\/\/fai-project.org\/download\/basefiles\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The folder must support directory listing. FAI will not probe for potentially matching files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See chapter <a href=\"https:\/\/fai-project.org\/fai-guide\/#otherdists\">[otherdists]<\/a> for how to install different distributions.<em>debconf\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This directory holds all <code>debconf(7)<\/code> data. The format is the same that is used by <code>debconf-set-selections(1)<\/code>. <em>package_config\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Files with class names contain lists of software packages to be installed or removed by <code>install_packages(8)<\/code>. Files named <em>&lt;CLASS&gt;.gpg<\/em> are added to the list of keys used by apt for trusted package repositories. <em>pkgs\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This directory can contain subdirectories named by classes. You can put <em>.deb<\/em> or <em>.rpm<\/em> files into these subdirectories. FAI will then install these packages without the need of creating the metadata of a package repository. <em>scripts\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Scripts for your local site customization. Used by <code>fai-do-scripts(1)<\/code>. <em>files\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Files used by customization scripts. Most files are located in a subtree structure which reflects the ordinary directory tree. For example, the templates for <em>nsswitch.conf<\/em> are located in <em>$FAI\/files\/etc\/nsswitch.conf<\/em> and are named according to the classes that they should match: <em>$FAI\/files\/etc\/nsswitch.conf\/NIS<\/em> is the version of <em>\/etc\/nsswitch.conf<\/em> to use for the NIS class. Note that the contents of the files directory are not automatically copied to the target machine, rather they must be explicitly copied by customization scripts using the <code>fcopy(8)<\/code> command. <em>hooks\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hooks are user defined programs or scripts, which are called during the installation process. They can extend or replace the default tasks. The file name must be of format <em>taskname.CLASSNAME[.sh]<\/em>. A hook called <code>updatebase.DEBIAN<\/code> is executed prior to the task <code>updatebase<\/code> and only if the install client belongs to the class DEBIAN.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_defining_classes_a_defining_classes\">Defining classes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">There are different possibilities to define classes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Some default classes are defined for every host: DEFAULT, LAST and its host name.<\/li>\n\n\n\n<li>Classes may be listed within a file (by default in <em>class\/&lt;hostname><\/em>)<\/li>\n\n\n\n<li>Classes may be dynamically defined by scripts.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The last option is a very nice feature, since these scripts will define classes in a very flexible way. For example, several classes may be defined only if certain hardware is identified or a class is defined depending on the network subnet information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All names of classes, except the host name, are written in uppercase. They must not contain a hyphen, a hash, a semicolon or a dot, but may contain underscores and digits.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The task <em>defclass<\/em> calls the command <code>fai-class(1)<\/code> to define classes. All scripts matching <em>^[0-9][0-9]*<\/em> (they start with two digits) in the subdirectory <em>$FAI\/class<\/em> are executed for defining classes. Everything that is printed to STDOUT is automatically defined as a class. For more information on defining class, read the manual pages for <code>fai-class(1)<\/code>. The script <em>50-host-classes<\/em> (see below a stripped version) is used to define classes depending on the host name.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># use a list of classes for our demo machines\ncase $HOSTNAME in\n    demohost)\n        echo \"FAIBASE GRUB DEMO\" ;;\n    xfcehost)\n        echo \"FAIBASE GRUB DEMO XORG XFCE LVM\";;\n    faiserver)\n        echo \"FAIBASE DEBIAN DEMO FAISERVER\" ;;\n    ubuntuhost)\n        echo \"FAIBASE DEBIAN DEMO UBUNTU JAMMY JAMMY64 XORG\";;\n    *)\n        echo \"FAIBASE DEBIAN DEMO\" ;;\nesac<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Host names should rarely be used for the configuration files in the configuration space. Instead, a class should be defined and then added for a given host. This is because most of the time the configuration data is not specific for one host, but can be shared among several hosts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The order of the classes is important because it defines the priority of the classes from low to high.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_classvariables_a_defining_variables\">Defining variables<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The task <em>defvar<\/em> defines the variables for the install client. Variables are defined by scripts in <em>class\/*.var<\/em>. All global variables can be set in <em>DEFAULT.var<\/em>. For groups of hosts use a class file. For a single host use the file <code>$HOSTNAME<\/code> <em>.var<\/em>. Also here, it\u2019s useful to study all the examples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The following variables are used in the examples and may also be useful for your installation: FAI_ACTION<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set the action FAI should perform. Normally this is done by <code>fai-chboot(8)<\/code>. If you can\u2019t use this command, define this variable i.e. in the script <em>LAST.var<\/em>. FAI_ALLOW_UNSIGNED<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If set to 1, FAI allows the installation of packages from unsigned repositories. CONSOLEFONT<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Is the font which is loaded during installation by <code>setfont(8)<\/code>. KEYMAP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Defines the keyboard map files in <em>\/usr\/share\/keymaps<\/em> and <em>$FAI\/files<\/em>. You don\u2019t need to specify the full path, since this file will be located automatically. ROOTPW<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The encrypted root password for the new system. You can use <code>crypt(3)<\/code>, md5 and other hash types for the password. Use <code>mkpasswd(1)<\/code> for creating the hash for a certain password. For example, to generate a md5 hash for the password use<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ echo \"yoursecrectpassword\" | mkpasswd -m yescrypt -s<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">UTC<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set hardware clock to UTC if <em>UTC=yes<\/em>. Otherwise set clock to local time. See <code>clock(8)<\/code> for more information. TIMEZONE<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Is the file relative to <em>\/usr\/share\/zoneinfo\/<\/em> which indicates your time zone. E.g.: <em>TIMEZONE=Europe\/Berlin<\/em>. MODULESLIST<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A list of kernel modules which are loaded during boot of the new system (written to \/etc\/modules).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_diskconfig_a_hard_disk_configuration\">Hard disk configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The tool <code>setup-storage(8)<\/code> reads a file in <em>$FAI\/disk_config<\/em> for the disk configuration. This file describes how all the local disks will be partitioned, which file system types should be created (like ext3\/4, xfs, btrfs), and where they are mounted to. You can also create software RAID and LVM setups using this config file. It\u2019s also possible to preserve the disk layout or to preserve the data on certain partitions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During the installation process all local file systems are mounted relative to <em>\/target<\/em>. For example if you specify the mount point <em>\/home<\/em> in a disk configuration file this will be the directory <em>\/target\/home<\/em> during the installation process and will become <em>\/home<\/em> for the new installed system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_extrbase_a_extract_base_file\">Extract base file<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A base file is only needed when installing a distribution which is different from the one in the nfsroot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_debconf_a_debconf_preseeding\">Debconf preseeding<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can use the format described in <code>debconf-set-selections(1)<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_repository_a_access_to_the_package_repository\">Access to the package repository<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">FAI supports http, https and NFS for accessing the package mirror. Set the variable <em>$FAI_DEBMIRROR<\/em> for using NFS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_packageconfig_a_software_package_configuration\">Software package configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before installing packages, FAI will add the content of all files named <em>package_config\/class.gpg<\/em> to the list of apt keys. If your local repository is signed by your keyid AB12CD34 you can easily add this key, so FAI will use it during installation. Use this command for creating the <em>CLASS.gpg<\/em> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver$ gpg --export AB12CD34 &gt; \/srv\/fai\/config\/package_config\/MYCLASS.gpg<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The script <code>install_packages(8)<\/code> installs the selected software packages. It reads all configuration files in <em>$FAI\/package_config<\/em> whose file name matches a defined class. The syntax is very simple.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># an example package class\n\nPACKAGES taskinst\ngerman\n\nPACKAGES install-norec\nadduser nmap\nless zstd\n\nPACKAGES remove\ngpm xdm\n\nPACKAGES install GRUB_PC\ngrub-pc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Comments are starting with a hash (#) and are ending at the end of the line. Every package command begins with the word <em>PACKAGES<\/em> followed by a command name, which maps to a different package tool like apt-get, aptitude or dnf for e.g. The command defines which command will be used to install the packages named after this command. The list of all available commands can be listed using <em>install_packages -H<\/em>. Supported package tools are: <em>apt, apt-get, aptitude, smart, yast, dnf, rpm, zypper<\/em> hold<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Put a package on hold. This package will not be handled by dpkg, e.g not upgraded. install<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install all packages (using <code>apt-get<\/code>) that are specified in the following lines. If a hyphen is appended to the package name (with no intervening space), the package will be removed, not installed. All package names are checked for misspellings. Any package which does not exist, will be removed from the list of packages to install. So be careful not to misspell any package names. install-norec<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Like install but without installing the recommended packages. remove<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Remove all packages that are specified in the following lines. Append a + to the package name if the package should be installed. taskinst<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install all packages belonging to the tasks that are specified in the following lines using <code>tasksel(1)<\/code>. You can also use <em>aptitude<\/em> for installing tasks. aptitude<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install all packages with the command <code>aptitude<\/code>. This will be the default in the future and may replace apt-get and taskinst. Aptitude can also install task packages. aptitude-r<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Same as aptitude with option <em>&#8211;with-recommends<\/em>. unpack<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Download package and unpack only. Do not configure the package. dselect-upgrade<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set package selections using the following lines and install or remove the packages specified. These lines are the output of the command <em>dpkg &#8211;get-selections<\/em>. It\u2019s not recommended to use this format, since you are also specifying all packages which are only installed because of a dependency or a recommends. It\u2019s better just to specify the pacakge you like to have, and to let FAI (and apt-get) resolve the dependencies.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Multiple lines with lists of space separated names of packages follow the PACKAGES lines. All dependencies are resolved. Packages with suffix <em>&#8211;<\/em> (eg. <em>lilo-<\/em>) will be removed instead of installed. The order of the packages doesn\u2019t matter. If you like to install packages from another release than the default, you can append the release name to the package name like in <em>openoffice.org\/etch-backports<\/em>. You can also specify a certain version like <em>apt=0.3.1<\/em>. More information on these features are described in <code>aptitude(8)<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can specify additional parameters for the package manager adding <em>key=value<\/em> after <em>PACKAGES &lt;command&gt;<\/em>. Currently we support <em>release=&lt;name&gt;<\/em> which will add <em>-t &lt;name&gt;<\/em> when installing packages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PACKAGES install-norec release=testing\nnvidia-smi<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will install the nvidia-smi package from the testing release, including the dependencies. Don\u2019t forget to add an entry into <em>sources.list<\/em>. You may also want to adjust the apt pinning (see <em>apt_references(5)<\/em>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A line which contains the <em>PRELOADRM<\/em> commands, downloads a file using <code>wget(1)<\/code> into a directory before installing the packages. Using the <em>file:<\/em> URL, this file is copied from <code>$FAI_ROOT<\/code> to the download directory. For example the package <code>realplayer<\/code> needs an archive to install the software, so this archive is downloaded to the directory <em>\/root<\/em>. After installing the packages this file will be removed. If the file shouldn\u2019t be removed, use the command <em>PRELOAD<\/em> instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s possible to append a list of class names after the command for apt-get. So this <em>PACKAGES<\/em> command will only be executed when at least one of the corresponding classes is defined (logical OR). So you can combine many small files into the file DEFAULT. WARNING! Use this feature only in the file DEFAULT to keep everything simple. See this file for some examples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to remove a package name from a certain class was part of this class before, you should not remove the package name from the class file, but instead append a dash (-) to it. This will make sure that the package is removed during a softupdate on hosts which were installed using the old class definition which included this package name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you specify a package that does not exist this package will be removed automatically from the installation list only if the command <em>install<\/em> is used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The concept of classes priority allows a higher priority class (one that comes later in the sequence of classes) to override the selection of packages of a lower priority class. For this to work correctly, the higher priority class must use the same <em>PACKAGES<\/em> command (e.g. <em>PACKAGES install-norec<\/em> instead of just <em>PACKAGES install<\/em>) as the one used by the class it is trying to override. This is useful to suppress installation of a package, for example, to avoid installing the <em>linuxlogo<\/em> package installed by class FAIBASE:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># example of how to override:\n#\n# On FAIBASE we have:\n#    PACKAGES install-norec\n#    linuxlogo\n#\n# We want to _not_ install linuxlogo, and it is in a\n# install-norec section, so we must also use install-norec.\n\nPACKAGES install-norec\nlinuxlogo-<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_cscripts_a_customization_scripts\">Customization scripts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The command <code>fai-do-scripts(1)<\/code> is called to execute all scripts in this directory. If a directory with a class name exists, all scripts matching <em>^[0-9][0-9]*<\/em> are executed in alphabetical order. So it\u2019s possible to use scripts of different languages (shell, cfengine, Perl, Python, Ruby, expect,..) for one class.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thoses scripts write their output to sripts.log. The file status.log contains the names of all scripts executed and their exit status.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_a_id_shell_a_shell_scripts\">Shell scripts<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Most scripts are Bourne shell scripts. Shell scripts are useful if the configuration task only needs to call some shell commands or create a file from scratch. In order not to write many short scripts, it\u2019s possible to use the <code>ifclass<\/code> command for testing if certain classes are defined.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ifclass -o A B C<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">checks if one of classes A, B or C are defined. Using -a (logical AND) checks if all classes of a list are defined. The command <em>ifclass C<\/em> checks if only class C is defined.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For copying files with classes, use the command <code>fcopy(8)<\/code>. If you want to extract an archive using classes, use <code>ftar(8)<\/code>. For appending lines to a configuration file use <code>ainsl(1)<\/code> instead of just <code>echo string &gt;&gt; filename<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">FAI also supports <em>zsh(1)<\/em> scripts during the customization task. Within scripts, the variable <code>$classes<\/code> holds a space separated list with the names of all defined classes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_a_id_cfengine_a_cfengine_scripts\">Cfengine scripts<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">CFEngine has a rich set of functions to edit existing configuration files, e.g <em>LocateLineMatching, ReplaceAll, InsertLine, AppendIfNoSuchLine, HashCommentLinesContaining<\/em>. But it can\u2019t handle variables which are undefined. If a variable is undefined, the whole cfengine script will abort.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More information can be found in the manual page <code>cfengine(8)<\/code> or at the cfengine homepage <a href=\"https:\/\/www.cfengine.com\">https:\/\/www.cfengine.com<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_hooks_a_hooks\">Hooks<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Hooks let you specify functions or programs which are run at certain steps of the installation process. Before a task is called, FAI searches for existing hooks for this task and executes them. As you might expect, classes are also used when calling hooks. Hooks are executed for every defined class. You only have to create the hook with the name for the desired class and it will be used. If several hooks for a task exists, they are called in the order defined by the classes. If <em>debug<\/em> is included in <code>$FAI_FLAG<\/code> the option <em>-d<\/em> is passed to all hooks, so you can debug your own hooks. If some default tasks should be skipped, use the subroutine <em>skiptask<\/em> and a list of default tasks as parameters. In the examples provided, the hooks of the class CENTOS skips some Debian specific tasks.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The directory <em>$FAI\/hooks\/<\/em> contains all hooks. A hook is an executable file following the naming scheme <em>taskname.CLASSNAME[.sh]<\/em> (e.g. <em>repository.CENTOS<\/em> or &#8216;savelog.LAST.sh). The task name specifies which task to precede executing this hook, if the specified class is defined for the installing client. See section <a href=\"https:\/\/fai-project.org\/fai-guide\/#tasks\">[tasks]<\/a> for a complete list of default tasks that can be used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A hook of the form <em>hookprefix.classname<\/em> can\u2019t define variables for the installation script, because it\u2019s a subprocess. But you can use any binary executable or any script you wrote. Hooks that have the suffix <em>.sh<\/em> (e.g. <em>partition.DEFAULT.sh<\/em>) must be Bourne shell scripts and are sourced. So it\u2019s possible to redefine variables for the installation scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the first part of FAI, all hooks with prefix <em>confdir<\/em> are called. Those hooks can not be located in the config space, since it\u2019s not yet available. Therefore these hooks are the only hooks located in <code>$nfsroot<\/code><em>\/$FAI\/hooks<\/em> on the install server. All other hooks are found in <em>$FAI_CONFIGDIR\/hooks<\/em> on the install server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All hooks that are called before classes are defined can only use the following classes: <em>DEFAULT $HOSTNAME LAST<\/em>. If a hook for class <em>DEFAULT<\/em> should only be called if no hook for class <code>$HOSTNAME<\/code> is available, insert these lines to the default hook:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hookexample.DEFAULT:\n\n#! \/bin\/sh\n\n# skip DEFAULT hook if a hook for $HOSTNAME exists\nscriptname=$(basename $0 .DEFAULT)\n&#91;-f $FAI\/hooks\/$scriptname.$HOSTNAME ] &amp;&amp; exit\n# here follows the actions for class DEFAULT\n.\n.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Some examples for what hooks could be used:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Load kernel modules before classes are defined in <em>$FAI\/class<\/em>.<\/li>\n\n\n\n<li>Send an email to the administrator if the installation is finished.<\/li>\n\n\n\n<li>Install a diskless client and skip local disk partitioning.<\/li>\n\n\n\n<li>Have a look at <code>hooks\/debconf.IMAGE<\/code> for how to clone a machine using a file system image.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_faiflags_a_fai_flags\">FAI flags<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The variable <code>$FAI_FLAGS<\/code> contains a space separated list of flags. Flags are normally defined in the pxelinux.cfg file which should be created by <em>fai-chboot(1)<\/em>. The following flags are known: verbose<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create verbose output during installation. This should always be the first flag, so consecutive definitions of flags will be verbosely displayed. debug<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create debug output. No unattended installation is performed. During package installation you have to answer all questions of the postinstall scripts on the client\u2019s console. A lot of debug information will be printed out. This flag is only useful for FAI developers. sshd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start the ssh daemon to enable remote logins. You can then log in as <em>root<\/em> to all install clients during the installation. The default password is <em>fai<\/em> and can be changed by setting <code>FAI_ROOTPW<\/code> in <code>nfsroot.conf(5)<\/code>. To log in from your server to the install client (named demohost in this example) use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ssh root@demohost\nWarning: Permanently added 'demohost,192.168.33.100' to the list of known hosts.\nroot@demohost's password:<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is only the root password during the installation process, not for the new installed system. You can also log in without a password when using <code>$SSH_IDENTITY<\/code>. createvt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create two virtual terminals and execute a bash if <em>ctrl-c<\/em> is typed in the console terminal. The additional terminals can be accessed by typing <em>Alt-F2<\/em> or <em>Alt-F3<\/em>. Otherwise, no terminals are available and typing <em>ctrl-c<\/em> will reboot the install client. Setting this flag is useful for debugging. If you want an installation which should not be interruptible, do not set this flag. menu<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This enables a user menu for selecting a profile. All files <code>class\/*.profile<\/code> are read and a curses based menu will be created. screen<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run FAI inside a <code>screen(1)<\/code> session. The session is called FAI. If you log in via ssh from remote you can attach to the session using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ screen -x<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">tmux<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run FAI inside a <code>tmux(1)<\/code> session. The session is called FAI. If you log in via ssh from remote you can attach to the session using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ tmux attach<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">reboot<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reboot the install client after installation is finished without typing RETURN on the console. If this flag is not set, and error.log contains anything, the install client will stop and wait that you press RETURN. If no errors occurred, the client will always reboot automatically. halt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Halt the install client at the end of the installation, instead of rebooting into the new system. initial<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Used by <code>setup-storage(8)<\/code>. Partitions marked with <code>preserve_reinstall<\/code> are preserved unless this flag is set. Often, this flag is set in a file <em>class\/*.var<\/em> by using setting <em>flag_initial=1<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_install_a_fai_installs_your_plan\">FAI installs your plan<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_the_early_part_of_an_installation\">The early part of an installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After the kernel has booted, it mounts the root file system via NFS from the install server and starts the script <em>\/usr\/sbin\/fai<\/em> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_10\">10<\/a>]. This script controls the sequence of the installation. No other scripts in <em>\/etc\/init.d\/<\/em> are used.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The configuration space is made available via the configured method (an NFS mount by default) from the install server to the path defined in <em>$FAI<\/em> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_11\">11<\/a>]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_bootmesg_a_boot_messages\">Boot messages<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When booting the install client from network card with PXE you will see some messages like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Managed PC Boot Agent (MBA) v4.00\nPre-boot eXecution Environment (PXE) v2.00\nDHCP MAC ADDR: 00 A2 A3 04 05 06\nDHCP...\/\n\nCLIENT MAC ADDR: 00 A2 A3 04 05 06  GUID: 3D6C4552\nCLIENT IP: 192.168.33.100 MASK: 255.255.255.0  DHCP IP: 192.168.33.250\nGATEWAY IP: 192.168.33.1\n\n!PXE entry point found (we hope) at 9854:0106 via plan A\nUNDI code segment at: 9854 len 5260\nUNDI data segment at: 921D len 63A2\nGetting cached packet  01 02 03\nMy Ip address seems to be C0A82164 192.168.33.100\nip=192.168.33.100:192.168.33.250:192.168.33.1:255.255.255.0\nBOOTIF=01-00-A2-A3-04-05-06\nSYSUUID=\nTFTP prefix: fai\/\nTrying to load pxelinux.cfg\/C0A82164\n\nLoading vmlinuz-6.1.0-17-amd64..................\nLoading initrd.img-6.1.0-17-amd64......................ready.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this point the install client has successfully received the network config via DHCP and the kernel and initrd via TFTP. It now boots the Linux kernel and the initrd. If everything went right, the initrd mounts the nfsroot [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_12\">12<\/a>] and the FAI scripts are started. The first thing you see is the red FAI copyright message.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>             -------------------------------------------------\n                   Fully Automatic Installation  -  FAI\n\n                   6.2           (c) 1999-2024\n                   Thomas Lange  &lt;lange@cs.uni-koeln.de&gt;\n             -------------------------------------------------\n\nCalling task_confdir\nKernel currently running: Linux 6.1.0-17-amd64 x86_64 GNU\/Linux\nKernel parameters: BOOT_IMAGE=vmlinuz-6.1.0-17-amd64 initrd=initrd.img-6.1.0-17-amd64 \\\n  ip=dhcp rw root=192.168.33.250:\/srv\/fai\/nfsroot:vers=3 rootovl FAI_FLAGS=verbose,sshd,createvt\n  FAI_ACTION=install FAI_CONFIG_SRC=nfs:\/\/faiserver\/srv\/fai\/config\nReading \/tmp\/fai\/boot.log\nFAI_FLAGS: verbose sshd createvt\nMonitoring to server faiserver enabled.\nFAI_CONFIG_SRC is set to nfs:\/\/faiserver\/srv\/fai\/config\nConfiguration space faiserver:\/srv\/fai\/config mounted to \/var\/lib\/fai\/config\nSource hook: setup.DEFAULT.sh\nsetup.DEFAULT.sh     OK.\nCalling task_setup\nFAI_FLAGS: verbose sshd createvt\nPress ctrl-c to interrupt FAI and to get a shell\nStarting FAI execution - 20240117_194012\nCalling task_defclass\nfai-class: Defining classes.\nExecuting \/var\/lib\/fai\/config\/class\/01-classes.\n01-classes           OK.\nExecuting \/var\/lib\/fai\/config\/class\/10-base-classes.\n10-base-classes      OK.\nExecuting \/var\/lib\/fai\/config\/class\/20-hwdetect.sh.\nens3             UP             52:54:00:11:23:01 &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt;\nens3             UP             192.168.33.101\/24 fe80::5054:ff:fe11:2301\/64\nNew disklist: vda\n20-hwdetect.sh       OK.\nExecuting \/var\/lib\/fai\/config\/class\/40-parse-profiles.sh.\n40-parse-profiles.sh OK.\nExecuting \/var\/lib\/fai\/config\/class\/41-warning.sh.\n41-warning.sh        OK.\nExecuting \/var\/lib\/fai\/config\/class\/50-host-classes.\n50-host-classes      OK.\nExecuting \/var\/lib\/fai\/config\/class\/60-misc.\n60-misc              OK.\nExecuting \/var\/lib\/fai\/config\/class\/85-efi-classes.\n85-efi-classes       OK.\nList of all classes:  DEFAULT LINUX AMD64 DHCPC FAIBASE DEBIAN DEMO GRUB_PC demohost2 LAST<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can also see the list of FAI classes, that are defined for this host. This list is very important for the rest of the installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The first task is called <em>confdir<\/em>, which is responsible for getting access to the config space. Here, we use an NFS mount from the install server as you can see on the console (and later in the logs).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FAI_CONFIG_SRC is set to nfs:\/\/faiserver\/srv\/fai\/config\nConfiguration space faiserver:\/srv\/fai\/config mounted to \/var\/lib\/fai\/config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Before the installation is started (<code>$FAI_ACTION=install<\/code>) the computer beeps three times. So, be careful when you hear three beeps but you do not want to perform an installation and let FAI erase all yout data on the local disk!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_reboot_a_rebooting_the_computer_into_the_new_system\">Rebooting the computer into the new system<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For rebooting the computer during or at the end of the installation you should use the command <code>faireboot<\/code> in favour of the normal reboot command. Use <code>faireboot<\/code> also if logged in from remote. If the installation hasn\u2019t finished, use <em>faireboot -s<\/em>, so the log files are also copied to the install server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the installation has finished successfully, the computer should boot a small Debian system. You can login as user <em>demo<\/em> or <em>root<\/em> with password <em>fai<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_isetup_a_starting_fai_task_confdir\">Starting FAI (task confdir)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After the install client has booted only the script <em>\/usr\/sbin\/fai<\/em> is executed. It will do some minimal initialization. The variable <code>$FAI_CONFIG_SRC<\/code> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_13\">13<\/a>] is used to get access to the FAI configuration space which is then available in the directory <code>$FAI<\/code> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_14\">14<\/a>]. FAI will not proceed without the config space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can access the config space using different methods. Supported methods are: nfs:, file:, cvs:, svn: git:, hg:, http: and detect:. See <code>fai.conf(5)<\/code> for a detailed description of these methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_iclass_a_defining_classes_and_variables_tasks_defclass_and_defvar\">Defining classes and variables (tasks defclass and defvar)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The command <code>fai-class(1)<\/code> executes scripts in <em>$FAI\/class<\/em> for defining classes. If the scripts write a string to stdout, this will be defined as a class. Read all the details in the man page of <code>fai-class(1)<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After defining the classes, every file matching <em>.var<\/em> with a prefix which matches a defined class is sourced to define variables. It must contain valid shell code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_ipartition_a_partitioning_local_disks_creating_file_systems_task_partition\">Partitioning local disks, creating file systems (task partition)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For the disk partitioning exactly one disk configuration file from <em>$FAI\/disk_config<\/em> is selected using classes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The format of the disk configuration is similar to a fstab file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The partitioning tool <code>setup-storage(8)<\/code> performs all commands necessary for creating the disk partition layout, software RAID, LVM and for creating the file systems. Disks and partitions may easily be referenced by disk1.1, disk2.4 etc. Read the manual page of <code>setup-storage(8)<\/code> for a detailed description and some examples of the format.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_ipreseed_a_debconf_preseeding_task_debconf\">Debconf preseeding (task debconf)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Files in <em>$FAI\/debconf<\/em> are used for the usual <code>debconf(7)<\/code> preseeding if the file names match a class name.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_ipackages_a_installing_software_packages_task_instsoft\">Installing software packages (task instsoft)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The command <code>install_packages(8)<\/code> reads the config files from <em>$FAI\/package_config<\/em> in a class based manner and installs software packages on the new file system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It installs the packages using <code>apt-get(8)<\/code>, <code>aptitude(1)<\/code>, <code>yum<\/code> or other package tools without any manual interaction needed. Package dependecies are also resolved by the package tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The format of the configuration files is described in <a href=\"https:\/\/fai-project.org\/fai-guide\/#packageconfig\">[packageconfig]<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionaly FAI will install packages (<em>.deb<\/em> or .rpm&#8217;) from the directories <em>$FAI\/pkgs\/&lt;CLASSNAME&gt;<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_icscripts_a_site_specific_customization_task_configure\">Site specific customization (task configure)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Often the default configurations of the software packages will not meet your site-specific needs. You can call arbitrary scripts which adjust the system configuration. Therefore the command <code>fai-do-scripts(1)<\/code> executes scripts in <em>$FAI\/scripts<\/em> in a class based manner. It is possible to have several scripts of different types (shell, cfengine, \u2026) to be executed for one class.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The default set of scripts in <em>$FAI\/scripts<\/em> include examples for installing Debian and Rocky Linux machines. They set the root password, add a user account (set by &#8216;$username, default to demo), set the timezone, configure the network for DHCP or using a fixed IP address, setup grub and more. They should do a reasonable job for your installation. You can edit them or add new scripts to match your local needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">More information about these scripts are described in <a href=\"https:\/\/fai-project.org\/fai-guide\/#cscripts\">[cscripts]<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_isavelog_a_saving_log_files_task_savelog\">Saving log files (task savelog)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When all tasks are finished, the log files are written to <em>\/var\/log\/fai\/$HOSTNAME\/install\/<\/em> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_15\">15<\/a>] on the new system and to the account on the install server if <code>$LOGUSER<\/code> is defined (you have to enable this in <em>\/srv\/fai\/config\/class\/FAIBASE.var<\/em>). It is also possible to specify another host as log saving destination through the variable <code>$LOGSERVER<\/code>. If <code>$LOGSERVER<\/code> is not defined, FAI uses the variable <code>$SERVER<\/code> which is only defined during an initial installation (by get-boot-info).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, two symlinks will be created to indicated the last directory written to. The symlink <em>last<\/em> points to the log directory of the last FAI action performed. The symlinks <em>last-install<\/em> and <em>last-sysinfo<\/em> point to the directory of the last corresponding action. By default log files will be copied to the log server using scp. You can use the variable <code>$FAI_LOGPROTO<\/code> in file <em>fai.conf(5)<\/em> to choose another method for saving logs to the remote server. Here\u2019s an example of the symlink structure:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lrwxrwxrwx   1 fai fai   23 Dec  2  2013 last-sysinfo -&gt; sysinfo-20131202_161237\ndrwxr-xr-x   2 fai fai 4096 Dec  2  2013 sysinfo-20131202_161237\ndrwxr-xr-x   2 fai fai 4096 Feb 14  2014 install-20140214_142150\ndrwxr-xr-x   2 fai fai 4096 Dec  2 11:47 install-20141202_113918\nlrwxrwxrwx   1 fai fai   23 Dec  4 13:22 last-install -&gt; install-20141204_131351\nlrwxrwxrwx   1 fai fai   23 Dec  4 13:22 last -&gt; install-20141204_131351\ndrwxr-xr-x   2 fai fai 4096 Dec  4 13:22 install-20141204_131351<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Examples of the log files can be found at <a href=\"https:\/\/fai-project.org\/logs\">https:\/\/fai-project.org\/logs<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_ireboot_a_reboot_the_new_installed_system\">Reboot the new installed system<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Before rebooting, the install client calls <code>fai-chboot -d &lt;hostname&gt;<\/code> on the install server, to disable its own PXELINUX configuration. Otherwise, it would restart the installation during the next boot. Normally this should boot the new installed system from its second boot device, the local hard disk.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At the end, the system is automatically rebooted if \u00abreboot\u00bb was added to <code>$FAI_FLAGS<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_advanced_a_advanced_fai_topics\">Advanced FAI topics<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_checkbootp_a_checking_parameters_received_from_dhcp_servers\">Checking parameters received from DHCP servers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the install client boots you can check if all information from the DHCP daemon are received correctly. The received information is written to <em>\/tmp\/fai\/boot.log<\/em>. An example of the result of a DHCP request can be found in the sample log files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_fai_monitor_a_monitoring_multiple_client_installations\">Monitoring multiple client installations<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can monitor the installation of all install clients with the command <code>fai-monitor(8)<\/code>. All clients check if this daemon is running on the install server (or the machine defined by the variable <code>$monserver<\/code>). Each time a task starts or ends, a message is sent. The FAI monitor daemon prints this messages to standard output. There\u2019s also a graphical frontend available, called <code>fai-monitor-gui(1)<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$  fai-monitor | fai-monitor-gui - &amp;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_mac_a_collecting_ethernet_addresses_for_multiple_hosts\">Collecting Ethernet addresses for multiple hosts<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You have to collect all Ethernet (MAC) addresses of the install clients and assign a host name and IP address to each client. To collect the MAC addresses, boot your install clients. You can already do this before any DHCP daemon is running in your subnet. They will fail to boot (because of the missing DHCP or missing TFTP), but you can still collect the MAC addresses.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While the install clients are booting, they send broadcast packets to the LAN. You can log the MAC addresses of these hosts by running the following command simultaneously on the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# tcpdump -qtel broadcast and port bootpc &gt;\/tmp\/mac.list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After the hosts have been sent some broadcast packets abort <code>tcpdump<\/code> by typing <em>ctrl-c<\/em>. You get a list of all unique MAC addresses with these commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver$ perl -ane 'print \"\\U$F&#91;0]\\n\"' \/tmp\/mac.list|sort|uniq<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that, you only have to assign these MAC addresses to host names and IP addresses (<em>\/etc\/ethers<\/em> and <em>\/etc\/hosts<\/em> or corresponding NIS maps). With this information you can configure your <code>DHCP<\/code> daemon (see the section <a href=\"https:\/\/fai-project.org\/fai-guide\/#bootdhcp\">[bootdhcp]<\/a>). [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_16\">16<\/a>]<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"_debugging_the_network_traffic\">Debugging the network traffic<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If the client can\u2019t successfully boot from the network card, use <code>tcpdump(8)<\/code> to look for Ethernet packets between the install server and the client. Search also for entries in several log files made by <code>tftpd(8)<\/code> and <code>dhcpd(8)<\/code> :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver$ egrep \"tftpd|dhcpd\" \/var\/log\/*<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_pxeboot_a_details_of_pxe_booting\">Details of PXE booting<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here we describe the details of PXE booting, which are only needed if you have problems when booting your install clients.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Almost all modern bootable network cards support the PXE boot environment. PXE is the Preboot Execution Environment. This requires the PXELINUX bootloader and a special version of the <em>TFTP<\/em> daemon, which is available in the Debian packages <code>pxelinux<\/code> and <code>tftpd-hpa<\/code>. PXE booting also needs a DHCP server, so that the network card can configure its IP parameters. This is the sequence of a PXE boot:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Network card of the client sends its MAC address<\/li>\n\n\n\n<li>DHCP server replies with IP configuration for the client<\/li>\n\n\n\n<li>Network card configures IP<\/li>\n\n\n\n<li>Install client gets the pxelinux.0 binary via TFTP<\/li>\n\n\n\n<li>Get the pxelinux.cfg\/C0A8210C configuration file via TFTP<\/li>\n\n\n\n<li>C0A8210C is the IP address of the client in hexadecimal<\/li>\n\n\n\n<li>This configuration contains kernel, initrd and additional kernel command line parameters, which was created by <code>fai-chboot<\/code>.<\/li>\n\n\n\n<li>Get the kernel and initrd via TFTP.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Example of a pxelinux.cfg file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>default fai-generated\n\nlabel fai-generated\nkernel vmlinuz-6.1.0-17-amd64\nappend initrd=initrd.img-6.1.0-17-amd64 ip=dhcp root=\/srv\/fai\/nfsroot:vers=3 rootovl FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs:\/\/faiserver\/srv\/fai\/config FAI_ACTION=install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">See <em>\/usr\/share\/doc\/syslinux\/pxelinux.doc<\/em> for more detailed information about PXELINUX. FAI uses the lpxelinux.0 binary which also supports loading the kernel and initrd via FTP or HTTP. The command <em>fai-chboot(8)<\/em> supports this with the option <em>-U<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_customizing_your_install_server_setup_a_customizing_your_install_server_setup\">Customizing your install server setup<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>local\/faster package mirror<\/li>\n\n\n\n<li>different loguser<\/li>\n\n\n\n<li>local root pw inside nfsroot<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The configuration for the FAI package (not the configuration data for the install clients) is defined in <em>fai.conf(5)<\/em>. Definitions that are only used for creating the nfsroot are located in <em>nfsroot.conf(5)<\/em>. Check these important variables in <em>nfsroot.conf<\/em> before calling <em>fai-setup<\/em> or <em>fai-make-nfsroot<\/em>. FAI_DEBOOTSTRAP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Building the nfsroot uses the command <code>debootstrap(8)<\/code>. It needs the location of a Debian mirror and the name of the distribution (like bullsseye, bookworm, sid) for which the basic Debian system should be built. Do not use different distributions here and in <em>\/etc\/fai\/apt\/sources.list<\/em>. This will create a broken nfsroot. NFSROOT_ETC_HOSTS<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This variable is only needed if the clients do not have access to a DNS server. This multiline variable is added to \/etc\/hosts inside the nfsroot. Then the install clients can access those hosts by name without using DNS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The content of <em>\/etc\/fai\/apt\/sources.list<\/em> is used by the install server and also by the clients. If your install server has multiple network cards and different host names for each card (as for a Beowulf server), use the install server name which is known by the install clients.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have problems running <code>fai-setup<\/code>, they usually stem from <code>fai-make-nfsroot(8)<\/code> which is called by former command. Adding <em>-v<\/em> gives you a more verbose output which helps you pinpoint the error. The output is written to <em>\/var\/log\/fai\/fai-make-nfsroot.log<\/em>. [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_17\">17<\/a>]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The setup also creates the account <em>fai<\/em> (defined by <code>$LOGUSER<\/code>) if not already available. So you can add a user before calling <code>fai-setup(8)<\/code> using the command <code>adduser(8)<\/code> and use this as your local account for saving log files. The log files of all install clients are saved to the home directory of this account. You should change the primary group of this account, so this account has write permissions to <em>\/srv\/tftp\/fai<\/em> in order to call fai-chboot for creating the PXE configuration for the hosts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you make changes to <em>fai.conf<\/em>, <em>nfsroot.conf<\/em> the nfsroot has to be rebuilt by calling <code>fai-make-nfsroot(8)<\/code>. If you only like to install a new kernel package to the nfsroot add the flags <em>-k<\/em> or <em>-K<\/em> to <code>fai-make-nfsroot<\/code>. This will not recreate your nfsroot, but only updates your kernel and kernel modules inside the nfsroot or add additional packages into the nfsroot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_cdboot_a_creating_a_fai_cd_or_and_usb_stick\">Creating a FAI CD or and USB stick<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can easily create an installation CD (or USB stick) of your network installation setup. This will perform the same installation and configuration from CD without the need of the install server. Therefore you need to create a partial mirror of all Debian packages needed for your FAI classes (using <code>fai-mirror(1)<\/code>). Then the command <code>fai-cd(8)<\/code> will put this mirror, the nfsroot and the config space onto a bootable CD. That\u2019s it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To easily create the installation CD, you can use the following command (for more tuning details see <code>fai-cd(8)<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> faiserver# fai-cd -m &lt;partialMirrorDir&gt; fai-cd.iso<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This installation CD contains all data needed for the installation. The command <code>fai-cd(8)<\/code> puts the nfsroot, the configuration space and a subset of the Debian mirror onto a CD-ROM. A partial package mirror is created using the command <code>fai-mirror(1)<\/code> which contains all packages that are used by the classes used in your configuration space. A sample ISO image is available at <a href=\"https:\/\/fai-project.org\/fai-cd\">https:\/\/fai-project.org\/fai-cd<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using the command <code>dd(1)<\/code> you can also create a bootable USB stick by just writing the content of the ISO file to your USB stick (here the stick is <em>\/dev\/sdf<\/em>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> faiserver# dd if=fai-cd.iso of=\/dev\/sdf bs=1M<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>mk-data-partition<\/code> is a tool that extends an ISO (that will be copied to an USB stick) or an USB stick containing an ISO with an ext4 or exFAT partition and sets the file system label to MY-DATA. This partition is automatically mounted to <em>\/media\/data<\/em> by FAI. You can copy your own <em>.deb<\/em> packages into this data partition und the subdiretories <em>pkgs\/&lt;CLASSNAME&gt;<\/em>. FAI will then install these packages if the equivalent class is defined.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Example how to use <code>mk-data-partition<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mk-data-partition -s 1G -c faicd-large.iso A B<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The former command creates the data partition of size 1 Gbytes inside the ISO file and copy directories A and B to it. You can then copy the modified ISO onto an USB stick.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the ISO is already on the USB stick and if it\u2019s available as <em>dev\/sdf<\/em>, you can add a data partition of type exFAT will will use the whole remaining part of the USB stick by using this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mk-data-partition -F \/dev\/sdf<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_diskimage_a_creating_vm_disk_images_using_fai\">Creating VM disk images using FAI<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The command <code>fai-diskimage(8)<\/code> creates disk images, which can be used with a virtual machine like KVM, VMware, VirtualBox or a cloud service like OpenStack, GCE, EC2 and others. The installation process performs the normal FAI tasks on a raw disk image. After the installation you can boot the disk image and have a running system. The disk image can also be converted to qcow2 format. You do not need to setup the FAI nfsroot when only using fai-diskimage. But you need a basefile in your configuration space. Setting the variable <code>$FAI_BASEFILEURL<\/code> will automatically download an appropriate base file into your config space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s an example how to create a raw disk image for a host called cloud3, with a small set of software packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># export FAI_BASEFILEURL=https:\/\/fai-project.org\/download\/basefiles\/\n# fai-diskimage -vu cloud3 -S2G -cDEBIAN,BOOKWORM64,AMD64,FAIBASE,GRUB_PC,DHCPC,DEMO,CLOUD,LAST disk.raw<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command will create a disk image called ubuntu.qcow2 for a Ubuntu 16.04 desktop with hostname set to foobar.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># export FAI_BASEFILEURL=https:\/\/fai-project.org\/download\/basefiles\/\n# cl=DHCPC,UBUNTU,JAMMY,JAMMY64,AMD64,XORG,LAST\n# fai-diskimage -Nvu foobar -S5G -c$cl ubuntu.qcow2<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can give disk images a try without installing FAI, if you visit <a href=\"https:\/\/fai-project.org\/FAIme\/cloud\">https:\/\/fai-project.org\/FAIme\/cloud<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_live_image_a_creating_a_bootable_live_image\">Creating a bootable live image<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Creating a bootable live ISO is easy with FAI. You only need two steps. First, create your live environment using the command <em>fai dirinstall<\/em>. Don\u2019t forget to add the class <code>LIVEISO<\/code>. Then create the live ISO using <em>fai-cd<\/em>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># cl=\"DEBIAN,BOOKWORM64,AMD64,FAIBASE,XFCE,XORG,DHCPC,DEMO,LIVEISO,LAST\"\n# LC_ALL=C fai -v dirinstall -u xfce33 -c $cl \\\n    -s file:\/\/\/srv\/fai\/config \/srv\/xfce\n# fai-cd -s500 -MH -d none -g \/etc\/fai\/grub.cfg.live \\\n    -n \/srv\/xfce live.iso<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The nfsroot is not needed for a live ISO. Currently there\u2019s no live ISO of the install server available.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_cross_arch_a_building_cross_architecture_disk_images\">Building cross-architecture disk images<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Starting FAI 5.4 it\u2019s now possible to build a disk image for different architectures than the host is running. For example you can build an image for 64-bit ARM architecture (aarch64) on a host running on amd64 architecture. Here are the steps do to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># apt install qemu-system-arm qemu-user-static fai-server fai-setup-storage fai-doc qemu-utils\n# fai-mk-configspace\n\n# export FAI_BASEFILEURL=https:\/\/fai-project.org\/download\/basefiles\/\n# fai-diskimage -vu armhost -S2G -cDEFAULT,DHCPC,DEBIAN,ARM64,BUSTER_ARM64,FAIBASE,DEMO,CLOUD,LAST arm64.raw\n# chown your_user_id arm64.raw\n# cp \/var\/log\/fai\/armhost\/last\/vmlinuz* vmlinuz\n# cp \/var\/log\/fai\/armhost\/last\/initrd.img* initrd<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then you can run qemu as a normal user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&gt; qemu-system-aarch64 -m 1000 -M virt,gic_version=3 -cpu cortex-a57 -drive file=arm64.raw,if=virtio,index=1 -no-reboot -nographic -name ARM64 -net nic,name=eth0,model=virtio -net user,name=eth0,-kernel vmlinuz -initrd initrd -append \"console=ttyAMA0 rw ip=dhcp root=\/dev\/vda1 net.ifnames=0\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This works similar for other architectures. Keep in mind, that qemu network setup will have poor performance if not using the virtio driver as above or tap devices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find the base files for many architectures at <a href=\"https:\/\/fai-project.org\/download\/basefiles\/\">https:\/\/fai-project.org\/download\/basefiles\/<\/a>, or use <code>mk-basefile<\/code> to create your own.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_sysinfo_a_fai_rescue_system\">FAI rescue system<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you set the variable <code>$FAI_ACTION<\/code> to <em>sysinfo<\/em> (for e.g. by using <code>fai-chboot -S<\/code>), the client will not install a new system, but will collect a lot of system information. If you set <code>$FAI_ACTION<\/code> to <em>inventory<\/em> you will only get a few hardware information. Both actions can be used for FAI as a rescue system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Type <em>ctrl-c<\/em> to get a shell or use <em>Alt-F2<\/em> or <em>Alt-F3<\/em> and you will get another console terminal, if you have added <em>createvt<\/em> to <code>$FAI_FLAGS<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You now have a running Linux system on the install client without using the local hard disk. Use this as a rescue system if your local disk is damaged or the computer can\u2019t boot properly from hard disk. You will get a shell and you can execute various commands (<code>dmesg<\/code>, <code>lsmod<\/code>, <code>df<\/code>, <code>lspci<\/code>, \u2026). Look at the log file in <em>\/tmp\/fai<\/em>. There you can find much information about the boot process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">FAI mounts all file systems it finds on the local disks read only. It also tells you on which partition a file <em>\/etc\/fstab<\/em> exists. When only one file system table is found, the partitions are mounted according to this information. Here\u2019s an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>demohost:~# df\n\nFilesystem                    1K-blocks     Used Available Use% Mounted on\ndevtmpfs                        1950880        0   1950880   0% \/dev\ntmpfs                           1971656      336   1971320   1% \/run\noverlay                         1971656      148   1971508   1% \/\ntmpfs                           1971656      148   1971508   1% \/live\/cow\n192.168.33.250:\/srv\/fai\/nfsroot\n                                15416320 12121088    919552  93% \/live\/image\nfaiserver:\/srv\/fai\/config       15416320 12121088    919552  93% \/var\/lib\/fai\/config\n\/dev\/mapper\/vg1-root            7828376  1599880   5811116  22% \/target\n\/dev\/vda1                        198337    49976    138121  27% \/target\/boot\n\/dev\/mapper\/vg1-home            1503280     4620   1404248   1% \/target\/home<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This method can be used as a rescue environment!<\/strong> If you need a file system with read-write access use the <code>rwmount<\/code> command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>demohost# rwmount \/target\/home<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_nonfs_a_fai_without_nfs\">FAI without NFS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To boot into FAI and begin the installation sequence without using the NFS protocol, you boot the client machine using PXE as usual and then retrieve an image containing the nfsroot via http.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To create an image, use fai-cd\u2019s -S argument and -M to avoid setting up a partial mirror within the image.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# fai-cd -M -S squash.img<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Move this image to a directory from which it can be requested via http (usually a directory served by the webserver)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To now request the squashfs image, add the following to your kernel command line, e.g. in your pxelinux configuration file for the client with fai-chboot.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root=live:http:\/\/faiserver\/cskoeln\/squash.img FAI_CONFIG_SRC=file:\/\/\/var\/lib\/fai\/config<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace faiserver with the domain name or IP of the machine your squash image is served from.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_otherdists_a_installing_other_distributions_using_a_debian_nfsroot\">Installing other distributions using a Debian nfsroot<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can install all sorts of Linux distributions from a single Debian nfsroot. Therefore you have to create a base.tar.xz of the distribution you like to install and place it into the <code>basefiles<\/code> directory. Then name it UBUNTU2204.tar.xz for example. An install client which belongs to the class UBUNTU2204 then extracts this base file into its empty file system. Additionally you have to adjust the <em>sources.list<\/em> or similar configuration files which are needed for specifying the location of the package repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The tool <code>rinse(8)<\/code> is used for creating base files for distribution like Rocky Linux, CentOS, openSUSE or Fedora. Some basefiles can be downloaded from <a href=\"https:\/\/fai-project.org\/download\/basefiles\/\">https:\/\/fai-project.org\/download\/basefiles\/<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The script <code>mk-basefile<\/code> in <em>\/usr\/share\/doc\/fai-doc\/examples\/simple\/basefiles\/<\/em> helps creating this base files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_dirinstall_a_creating_chroot_and_virtualization_environments\">Creating chroot and virtualization environments<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you have to create some chroot environments, or a virtualization environment where you neither can nor want to run a normal Debian Installer in to get to a working system (for example, Xen guest domains), there is the FAI action <em>dirinstall<\/em>. By calling<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# fai &lt;options&gt; dirinstall &lt;target-directory&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">and using either the option <em>-c &lt;classes&gt;<\/em> or <em>-N<\/em> you get a FAI installation, without the partitioning action, right into the target directory. The host name for the target installation can be specified using <em>-u &lt;host-name&gt;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This, for example, can be used to combine FAI with the tool <em>xen-tools<\/em>, which helps you to build Xen guest domains. <em>xen-tools<\/em> are very nice for generating configuration files and block devices for new guests based on simple commands and\/or configuration files, but they can only assign one role per installation for customization. FAI-users need and want more, as they are used to have the class system. They get them even in xen-tools installations, by using the following code as a xen-tools role script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/sh\nTARGET=$1\nCMD=\"fai -N  -v -u ${hostname} dirinstall $TARGET\"\necho running $CMD\n$CMD<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then, you should set the variable <em>install=0<\/em> in the config of xen-tools for that host.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_softupdate_a_using_fai_for_updates\">Using FAI for updates<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">FAI can also do updates of already running systems, without a re-installation from scratch. This is called softupdate. A FAI softupdate skips the tasks which are not suitable for updating a running system, like partitioning the hard disks and creating file systems. Instead, it only executes the tasks for updating and installing software packages and calling the customization scripts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To run a softupdate call:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># fai -v -s nfs:\/\/faiserver\/srv\/fai\/config softupdate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">By default, a softupdate uses the list of classes defined during the initial installation. Make sure to set the variable <code>$LOGSERVER<\/code> (done in a <em>class\/*.var<\/em> file) if FAI should save the log files to a remote machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s up to you, how to start a softupdate on a bigger number of hosts. You may do the softupdate on a regular basis via cron or you can use tools like <code>clusterssh(1)<\/code> to start a softupdate via a push on a list of hosts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep in mind, that the customization scripts are run every time you do a softupdate. That means, they have to be <strong>idempotent<\/strong> i.e. the result of their operation should always produce the same result, even when they run more than once.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example appending a line to a file must not done via this code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ echo \"some strings\" &gt;&gt; \/etc\/fstab<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Instead use the command <code>ainsl(1)<\/code> in a shell script or use cfengine\u2019s function <em>AppendIfNoSuchLine<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All commands in the customization script must be capable of modifying the target file system wether it\u2019s available in <em>\/target<\/em> during the initial installation or wether it\u2019s the normal file system relative to <em>\/<\/em> during softupdate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some variable that help writing these scripts:<code>$target<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Points to the root directory of the client, which is <em>\/target<\/em> during installation and <em>\/<\/em> during a softupdate. <code>$FAI_ROOT<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s the same value as <code>$target<\/code>. For historic reasons we have both these variables in FAI. <code>$ROOTCMD<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In case of the installation this is an alias for <em>chroot $target<\/em> in case of softupdate it\u2019s just empty. You can prepend this to commands if you need to run a command inside the clients target file system via chroot. <code>$FAI_ACTION<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need to call code depending on the FAI action performed, you can use this variable. It contains the currently executed action: <em>install<\/em>, <em>softupdate<\/em>, <em>dirinstall<\/em>, <em>sysinfo<\/em>, <em>inventory<\/em> or your own defined action.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_archcross_a_how_to_install_32_bit_os_from_a_64_bit_os\">How to install 32-bit OS from a 64-bit OS<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To install a computer with a 32-bit OS, you need an i386 nfsroot. Creating this 32-bit nfsroot on an install server running amd64 is quite simple. Install and set up the FAI packages. Then copy your FAI config files to a new subdirectory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# cp -a \/etc\/fai \/etc\/fai-i386<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the variable <code>$FAI_DEBOOTSTRAP_OPTS<\/code> in <em>\/etc\/fai-i386\/nfsroot.conf<\/em> and add the option <code>--arch i386<\/code>. Also choose a different directory for your new nfsroot. Here are the two lines after editing.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NFSROOT=\/srv\/fai\/nfsroot-i386\nFAI_DEBOOTSTRAP_OPTS=\"--arch i386 --exclude=info --include=aptitude\"\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now call fai-make-nfsroot which creates the 32-bit nfsroot in <em>\/srv\/fai\/nfsroot-i386<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# fai-make-nfsroot -v -C\/etc\/fai-i386<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Creating a partial mirror using <code>fai-mirror(1)<\/code> that is needed for a bootable CD or USB stick is also possible on a different architecture. You have to specify the architecture when calling fai-mirror.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ fai-mirror -m800 -B -a i386 -v -cDEFAULT,DEBIAN,FAIBASE,I386 \/srv\/mirror-i386<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s all!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_error_a_aborting_the_installation_when_an_error_occurs\">Aborting the installation when an error occurs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Every task and hook can call the function <code>task_error<\/code> to send an error value to the installation. This error will appear in the log file and can be shown in the <code>fai-monitor-gui(1)<\/code>. The error value is also checked against the variable <code>$STOP_ON_ERROR<\/code> which is set to 700 by default. If the error value is greater than <code>$STOP_ON_ERROR<\/code> the installation will stop immediately. In a hook, just add a call like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>task_error &lt;value&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It is comfortable to call task_error with $? as second parameter, for e.g. if you want to set an error value of 123 use this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;some command&gt;\ntask_error 123 $?<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then the task error is only set if the preceding command failed with some error. The same syntax can be used by the scripts in the class subdirectory ending in .sh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A special case are scripts inside the class\/ subdirectory that does not end in .sh. In those scripts you have to call task_error with 1 as third parameter. As an example you can use those two variants for setting the value to 123<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>task_error 123 $? 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>task_error 123 1 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The latter command always sets the task error to 123 regardless of the value of <code>$?<\/code>. If the error value is greater than <code>$STOP_ON_ERROR<\/code>, the installation will abort immediately.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The error values are grouped into four categories<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>normal or info messages:       1xx, 2xx\nwarnings:                      3xx, 4xx\nminor errors:                  5xx, 6xx\nerrors:                        7xx, 8xx<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The fai-monitor-gui has 4 different icons for these error categories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_hints_a_various_hints_and_details\">Various hints and details<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_tasks_a_the_list_of_tasks\">The list of tasks<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Most tasks of the installation are defined as subroutines which are defined in <em>\/usr\/lib\/fai\/subroutines<\/em> (e.g. <code>task_instsoft<\/code>). Some are external shell scripts located in <em>\/usr\/lib\/fai\/<\/em>. They are called via a superior subroutine called <em>task<\/em>. This subroutine calls hooks if available and then calls the task (defined as <em>task_&lt;name&gt;<\/em>). A task and its hooks can be skipped on demand by using the command <em>skiptask()<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now follows the description of all tasks, listed in the order they are executed. confdir<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The kernel appended parameters may define variables, the syslog daemon is started. Network parameters are fetched from a DHCP server and are stored in <code>boot.log<\/code>. The DNS resolver configuration file is created.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The location of the configuration space is defined by the variable <code>$FAI_CONFIG_SRC<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that, the file <em>$FAI\/hooks\/subroutines<\/em> is sourced if it exists. Using this file, you can define your own subroutines or override the definition of FAI\u2019s subroutines. setup<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This task sets the system time, all <code>$FAI_FLAGS<\/code> are defined and two additional virtual terminals are opened on demand. A secure shell daemon is started on demand for remote logins. defclass<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calls <code>fai-class(1)<\/code> to define classes using scripts and files in <em>$FAI\/class<\/em> and classes from <em>\/tmp\/fai\/additional-classes<\/em> and the variable <code>$ADDCLASSES<\/code>. The list of all defined classes is stored in the variable <code>$classes<\/code> and saved to <em>\/tmp\/fai\/FAI_CLASSES<\/em>. defvar<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sources all files <em>$FAI\/class\/*.var<\/em> for every defined class. If a hook has written some variable definitions to the file <em>$LOGDIR\/additional.var<\/em>, this file is also sourced. action<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the value of <code>$FAI_ACTION<\/code> this subroutine decides which action FAI should perform. The default available actions are: <em>sysinfo<\/em>, <em>install<\/em>, <em>inventory<\/em>, <em>dirinstall<\/em> and <em>softupdate<\/em>. If <code>$FAI_ACTION<\/code> has another value, a user defined action is called if a file <em>$FAI\/hooks\/$FAI_ACTION<\/em> exists. So you can easily define your own actions. sysinfo<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Called when no installation is performed but the action is <em>sysinfo<\/em>. It shows information about the detected hardware and mounts the local hard disks read only to <em>\/target\/<code>partitionname<\/code><\/em> or with regard to a <em>fstab<\/em> file found inside a partition. Log files are stored to the install server. inventory<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A short list of system information is printed. install<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This task controls the installation sequence. You will hear three beeps before the installation starts. The major work is to call other tasks and to save the output to <em>\/tmp\/fai\/fai.log<\/em>. If you have any problems during installation, look at all files in <em>\/tmp\/fai\/<\/em>. You can find examples of the log files at <a href=\"https:\/\/fai-project.org\/logs\/\">https:\/\/fai-project.org\/logs\/<\/a>. dirinstall<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install into a directory, not onto a local disk. Use this for creating chroot environments. softupdate<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This task, executed inside a running system via the <code>fai(8)<\/code> command line interface, performs a softupdate. See chapter <a href=\"https:\/\/fai-project.org\/fai-guide\/#softupdate\">[softupdate]<\/a> for details. partition<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calls <code>setup-storage(8)<\/code> to partition the hard disks and to create file systems. The task writes variable definitions for the root and boot partition and device (<code>$ROOT_PARTITION, $BOOT_PARTITION, $BOOT_DEVICE<\/code>) to <em>\/tmp\/fai\/disk_var.sh<\/em> and creates a <em>fstab<\/em> file for the new system. mountdisks<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mounts the created partitions according to the created <em>\/tmp\/fai\/fstab<\/em> file relative to <code>$FAI_ROOT<\/code>. extrbase<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Extracts a minimal system after that a chroot can be made into it. By default the base tar file <em>\/var\/tmp\/base.tar.xz<\/em> will be extracted. Also files matching a class name in <code>$FAI\/basefiles\/<\/code> are used for unpacking a different tar file depending on classes defined. This can be used for installing different Linux distributions than the one used for creating the nfsroot. The default file <em>base.tar.xz<\/em> is a snapshot of a basic Debian system created by <code>debootstrap(8)<\/code>. This task uses the variable <code>FAI_BASEFILEURL<\/code> for fetching the base file via FTP, HTTPS or HTTP if it\u2019s defined. debconf<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calls <code>fai-debconf(1)<\/code> to set the values for the debconf preseeding database. repository<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prepare access to the package repository by preparing the apt configuration. This can also add repository keys in a class based manner from files like <em>CLASSNAME.gpg<\/em> in the directory <em>package_config<\/em>. updatebase<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Updates the base packages of the new system and updates the list of available packages. It also fakes some commands (called diversions) inside the new installed system using <code>dpkg-divert(8)<\/code>, so no daemons will be started during the installation. instsoft<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Installs the desired software packages using class files in <em>$FAI\/package_config\/<\/em>. configure<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calls scripts in <em>$FAI\/scripts\/<\/em> and its subdirectories for every defined class. tests<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Calls test scripts in <em>$FAI\/tests\/<\/em> and its subdirectories for every defined class. finish<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unmounts all file systems in the new installed system and removes diversions of files using the command <code>fai-divert<\/code>. chboot<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Changes the PXE configuration for a host on the install server which indicates which PXELINUX configuration to load on the next boot from network card via TFTP. Therefore the <code>fai-chboot(8)<\/code> command is executed remotely on the install server. savelog<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Saves log files to local disk and to the account <code>$LOGUSER<\/code> on <code>$LOGSERVER<\/code> (defaults to the install server). faiend<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wait for background jobs to finish (e.g. emacs compiling lisp files) and automatically reboots the install clients or waits for manual input before reboot.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_itests_a_automated_tests\">Automated tests<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After the customization scripts are executed, FAI will execute some tests if available. Using these test, you can check for errors of the installation. Test scripts are called via <code>fai-do-scripts(1)<\/code> and should append its messages to <em>$LOGDIR\/test.log<\/em>. A Perl module including some useful subroutines can be found in <em>Faitest.pm<\/em>. A test can also define a new class for executing another tests during next boot via the variable <code>$ADDCLASSES<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_autodiscover_a_autodiscover\">Autodiscover<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In FAI 5.0 we released a feature that allows clients to search for the faiserver in their respective subnetwork. This lifts the necessity of having to collect every client\u2019s MAC address and configuring the DHCP daemon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is done by booting from a small FAI autodiscover bootmedium (CD, USB, etc.), which can be created via the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# fai-cd -A autodiscover.iso<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The image is roughly 25MB in size and scans the subnet for a FAI server. By default it shows a menu with all profiles available in the configuration space in the same manner as the <em>menu<\/em> flag does. From this menu, you can select the installation type you wish to perform.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the clients to find the faiserver, the faiserver must run fai-monitor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_changeboot_a_changing_the_boot_device\">Changing the boot device<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the boot sequence is normally done in the BIOS setup. But you can\u2019t change the BIOS from a running Linux system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, the boot sequence of the BIOS will remain unchanged and your computer should always boot first from its network card and the second boot device should be the local disk. Then you can change the boot device of the client by creating different PXELINUX configurations. This will define if an installation should be performed, or if the client should to boot from local disk. This is done using <code>fai-chboot(8)<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_nfsv4_a_how_to_use_nfs_v4_with_the_nfsroot\">How to use NFS v4 with the nfsroot<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The nfsroot is mounted via NFS v3 by default. This is done by adding the option <em>nfsvers=3<\/em> to the kernel boot options of the kernel booted by the install clients. fai-chboot(8) will do this for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to use NFS v4 for the nfsroot, you have to remove this option the the kernel boot options. Additionally, overlayfs &#8211; the kernel module that is used for making the read-only mounted nfsroot writeable &#8211; can only work with NFS v4 if acl(5) support is disabled on the filessystem on the NFS server side (as of 2019). If <em>\/srv\/fai\/nfsroot<\/em> on your FAI server is located on the root partition mounted to <em>\/<\/em>, you can disable acl support for the whole file system on this partition using<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mount -oremount,noacl \/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then mounting the nfsroot from a FAI server using NFS v4 will work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_debian_mirror_a_how_to_create_a_local_debian_mirror\">How to create a local Debian mirror<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The utility <code>mkdebmirror<\/code> [<a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnote_18\">18<\/a>] can be used for creating your own local Debian mirror. This script uses <code>debmirror(1)<\/code>. A partial Debian mirror for amd64 architecture for Debian 11 and 12 (aka bullseye and bookworm) without the source packages needs about 180GB of disk space. Accessing the mirror via HTTP will be the default way in most cases. To see more output from the script call <code>mkdebmirror -v<\/code>. A root account is not necessary to create and maintain the Debian mirror.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use HTTP access to the local Debian mirror, install a web server and create a symlink to the local directory where your mirror is located:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver# apt-get install apache2\nfaiserver# ln -s \/files\/scratch\/debmirror \/var\/www\/html\/debmirror<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a file <code>sources.list(5)<\/code> in <em>\/etc\/fai\/apt<\/em> which gives access to your Debian mirror. Also add the IP-address of the HTTP server to the variable <code>$NFSROOT_ETC_HOSTS<\/code> in <em>nfsroot.conf<\/em> if the install clients have no DNS resolving.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_small_hints\">Small hints<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When using HTTP access to a Debian mirror, the local <em>\/var<\/em> partition on all install clients must be big enough to keep the downloaded Debian packages. Do not try with less than 250 Mbytes unless you know why. You can limit the number of packages installed at a time with the variable <code>$MAXPACKAGES<\/code>.<\/li>\n\n\n\n<li>You can remove the red logo on the install client by simply calling <code>reset<\/code> once. If will also not appear if you create a file using this command on the install server:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>touch \/srv\/fai\/nfsroot\/.nocolorlogo<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A list of variables used by FAI can be found at <a href=\"https:\/\/wiki.fai-project.org\/index.php\/Variables\">https:\/\/wiki.fai-project.org\/index.php\/Variables<\/a>.<\/li>\n\n\n\n<li>You can shorten some customization scripts by using one single fcopy command <em>fcopy -r \/<\/em>.<\/li>\n\n\n\n<li>If you rebuild the nfsroot, you will create a new ssh host key inside the nfsroot. Then logging in to an install client may fail, because the host key changes. You can use this:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ssh -o StrictHostKeyChecking=no root@installclient<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can also delete the host entry on your install client in your <em>~\/.ssh\/known_hosts<\/em> file by using the <em>ssh-keygen -R<\/em> command.<\/li>\n\n\n\n<li>In the tasks chboot and savelog, a connection using secure shell is opened to the FAI server (see <a href=\"https:\/\/fai-project.org\/fai-guide\/#isavelog\">[isavelog]<\/a>). To ensure that this works non-interactively, a proper entry in <em>NFSROOT\/root\/.ssh\/known_hosts<\/em> must be created. When using fai-setup, this is done automatically, but it may require manual editing in case the name of your FAI server was not determined correctly. If you stumble over ssh connections that require typing \u00abyes\u00bb to accept the host key during installation, please check the contents of your <em>NFSROOT\/root\/.ssh\/known_hosts file<\/em><\/li>\n\n\n\n<li>A list of all local hard disks is stored in <code>$disklist<\/code>. It\u2019s defined after <code>set_disk_info<\/code> is called.<\/li>\n\n\n\n<li>There are multiple functions for generating a customized disk list. See <code>fai-disk-info<\/code> for an example.\n<ul class=\"wp-block-list\">\n<li>set_bootstick()<\/li>\n\n\n\n<li>grepv_disks()<\/li>\n\n\n\n<li>grep_disks()<\/li>\n\n\n\n<li>notmatchdisks()<\/li>\n\n\n\n<li>matchdisks()<\/li>\n\n\n\n<li>smallestdisk()<\/li>\n\n\n\n<li>largestdisk()<\/li>\n\n\n\n<li>all_disks_by_size()<\/li>\n\n\n\n<li>all_disks_and_size()<\/li>\n\n\n\n<li>once_only()<\/li>\n\n\n\n<li>checkdisk()<\/li>\n\n\n\n<li>disks_by_id()<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Use <code>fai-divert -a<\/code> if a postinst script calls a configuration program, e.g. the postinst script for package apache calls apacheconfig, which needs manual input. You can fake the configuration program so the installation can be fully automatic.<\/li>\n\n\n\n<li>Sometimes the installation seems to stop, but often there\u2019s only a postinstall script of a software package that requires manual input from the console. Change to another virtual terminal and look which process is running with tools like <code>top(1)<\/code> and <code>pstree(1)<\/code>. You can add <em>debug<\/em> to <em>FAI_FLAGS<\/em> to make the installation process show all output from the postinst scripts on the console and get its input also from the console.<\/li>\n\n\n\n<li>How can I define classes on the kernel command line? Read the man page of <code>fai-class(8)<\/code>. If you like to define some additional classes (for e.g. A,B,C) on the kernel command line add this: <em>ADDCLASSES=A,B,C<\/em><\/li>\n\n\n\n<li>How to use a custom kernel inside the nfsroot? Build your customized kernel by building a kernel package using <code>make-kpkg(8)<\/code> and use the option <code>--initrd<\/code>. Copy this Debian package to a local repository and add it to \/etc\/fai\/sources.list. Add the name of your package to \/etc\/fai\/NFSROOT. Then call <code># fai-make-nfsroot -k<\/code><\/li>\n\n\n\n<li>How to use the nfsroot as system for diskless clients? <a href=\"https:\/\/wiki.fai-project.org\/index.php\/Use_nfsroot_for_diskless_clients\">https:\/\/wiki.fai-project.org\/index.php\/Use_nfsroot_for_diskless_clients<\/a><\/li>\n\n\n\n<li>How to serve multiple nfsroot directories on one FAI server? If you want to serve multiple nfsroot directories, you need to create specific config directories in <em>\/etc<\/em> for FAI, like <em>\/etc\/fai-buster<\/em> and <em>\/etc\/fai-bookworm<\/em>. Then you need to set the <code>$NFSROOT<\/code> variables to different directories and run<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>faiserver#fai-make-nfsroot -C \/etc\/fai-buster<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_flag_reboot_fai_flags\">flag_reboot (FAI_FLAGS)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If flag_reboot is set, by adding \u00abreboot\u00bb to <code>$FAI_FLAGS<\/code>, your client machine will reboot after the task faiend has finished. This is true for network as well as bootmedium installations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_logfiles_a_log_files\">Log files<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">FAI is creating several log files. During installation they are stored in <em>\/tmp\/fai<\/em> on the install client itself. At the end of the installation they will be copied to the install server (see <a href=\"https:\/\/fai-project.org\/fai-guide\/#isavelog\">[isavelog]<\/a>). After the install client rebooted into his newly installed system, you can find the FAI logs in <em>\/var\/log\/fai<\/em>. Log files are also created when doing the softupdate or dirinstall action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the faiserver, you can find the (remote) log files under the ~fai directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sample log files from successfully installed computers are available on <a href=\"https:\/\/fai-project.org\/logs\">https:\/\/fai-project.org\/logs<\/a>. These a some log files which are created by FAI. FAI_CLASSES<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Contains a list of all classes defined. dmesg.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output of the <code>dmesg<\/code> command. Contains useful messages of the kernel ring buffer. fai.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The main log file. Contains all important information. You should <strong>always<\/strong> read this file. boot.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A list of variables of network parameters, mostly defined by the DHCP daemon. format.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output of the partition tool <code>setup-storage(8)<\/code>. scripts.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output of all scripts, that are used for customization. variables.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A list of all shell variables which are available during an installation. error.log<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A summary of possible errors in all log files. disk_var.sh<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A list of variables that contain information about devices and partitions to boot from, the root partition and a list of swap devices. These information is used by some customization scripts (e.g. <em>GRUB_PC\/10-setup<\/em>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the installation process finishes, the hook <em>savelog.LAST.sh<\/em> searches all log files for common errors and writes them to the file <em>error.log<\/em>. So, you should first look into this file for errors. Also the file <em>status.log<\/em> give you the exit code of the last command executed in a script. To be sure, you should look for more details in all log files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_how_to_use_http_for_pxe_boot\">How to use HTTP for PXE boot<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">fai-make-nfsroot now uses the lpxelinux.0 binary which already supports transfer of the kernel and initrd via http (additional to tftp). You only have to enable HTTP access to the tftp directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/html\nln -s \/srv\/tftp\/fai<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add <em>-U URL<\/em> to the <em>fai-chboot<\/em> call. For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fai-chboot -U http:\/\/faiserver\/fai -IFv .......<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_a_id_troubleshoot_a_troubleshooting\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"_a_id_booterror_a_boot_errors\">Boot errors<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The following error message indicates that your install client doesn\u2019t get an answer from a DHCP server. Check your cables or start the <code>dhcpd(8)<\/code> daemon with the debug flag enabled.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PXE-E51: No DHCP or BOOTP offers received\nNetwork boot aborted<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you do not see the following message, the install kernel could not detect your network card, for example because of a missing driver:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Starting dhcp for interface eth0\ndhcp: PREINIT eth0 up\ndhcp: BOND setting eth<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the initrd in the nfsroot (<code>lsinird<\/code>) if the kernel driver of your network card is included there and check if you like to add the package <em>firmware-linux-nonfree<\/em> in <code>\/etc\/fai\/NFSROOT<\/code> and rebuild the initrd by calling <code>fai-make-nfsroot -k<\/code>. You may also add a driver to <code>\/srv\/fai\/nfsroot\/etc\/dracut.conf<\/code> in the line <code>add_drivers<\/code>+<code>=<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the error message you will see, when your network card is working, but the install server does not export the nfsroot directory to the install clients, This is often caused by missing NFS permissions on the server side.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Starting dhcp for interface eth0\ndhcp: PREINIT eth0 up\ndhcp: BOND setting eth\nmount.nfs: access denied by server while mounting 192.168.33.250:\/srv\/fai\/nfsroot\n.\n.\ndracut Warning: Could not boot\n.\nDropping to debug shell\ndracut:\/#<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, you are inside the emergency shell of the initrd which was created by <em>dracut(8)<\/em>. You will get a shell prompt, and can look at the log files. For more information about debugging the early boot process using dracut see <code>dracut.cmdline(7)<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following command on the install server to see which directories are exported from the install server (named faiserver):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ showmount -e faiserver<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_1\">1<\/a>. Solaris 8 Advanced Installation Guide at <a href=\"https:\/\/docs.oracle.com\/cd\/E19455-01\/806-0957\/806-0957.pdf\">https:\/\/docs.oracle.com\/cd\/E19455-01\/806-0957\/806-0957.pdf<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_2\">2<\/a>. <a href=\"http:\/\/www.science.uva.nl\/pub\/solaris\/auto-install\">http:\/\/www.science.uva.nl\/pub\/solaris\/auto-install<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_3\">3<\/a>. <a href=\"https:\/\/wiki.fai-project.org\/index.php\/VirtualBox_for_your_first_FAI_installation\">https:\/\/wiki.fai-project.org\/index.php\/VirtualBox_for_your_first_FAI_installation<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_4\">4<\/a>. This installation will consume about 2GB of space in <code>\/tmp<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_5\">5<\/a>. It\u2019s also possible to use only the configuration file with the highest priority since the order of classes define a priority from low to high within the list of classes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_6\">6<\/a>. If you want to use a faster mirror, adjust the URL in <em>\/etc\/fai\/apt\/sources.list<\/em> and <code>FAI_DEBOOTSTRAP<\/code> in <em>\/etc\/fai\/nfsroot.conf<\/em> before calling fai-setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_7\">7<\/a>. This will call <code>fai-make-nfsroot(8)<\/code> internally.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_8\">8<\/a>. These files need not belong to the root account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_9\">9<\/a>. You may also add this into your Domain Name System (DNS)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_10\">10<\/a>. Since the root file system on the clients is mounted via NFS, <code>fai<\/code> is located in <em>\/srv\/fai\/nfsroot\/usr\/sbin<\/em> on the install server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_11\">11<\/a>. <em>$FAI<\/em> is an internal variable used by the FAI scripts. By default the path is <em>\/var\/lib\/fai\/config<\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_12\">12<\/a>. <em>\/srv\/fai\/nfsroot<\/em> from the install server via NFS<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_13\">13<\/a>. It is defined on the kernel command line<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_14\">14<\/a>. \/var\/lib\/fai\/config<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_15\">15<\/a>. <em>\/var\/log\/fai\/localhost\/install\/<\/em> is a link to this directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_16\">16<\/a>. I recommend to write the MAC addresses (last three bytes will suffice if you have network cards from the same vendor) and the host name in the front of each chassis.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_17\">17<\/a>. For debugging purpose it may help to enter the chroot environment manually using this command. <em>faiserver# chroot \/srv\/fai\/nfsroot bash<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/fai-project.org\/fai-guide\/#_footnoteref_18\">18<\/a>. You can find the script in <em>\/usr\/share\/doc\/fai-doc\/examples\/utils\/<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/fai-project.org\/fai-guide Thomas Lange&lt;lange@debian.org>version 6.0, 17 Jan 2024 An older French version of this guide is available at https:\/\/fai-project.org\/fai-guide-fr. 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-399","post","type-post","status-publish","format-standard","hentry","category-debian"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts\/399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=399"}],"version-history":[{"count":1,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":400,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions\/400"}],"wp:attachment":[{"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aran.cat\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}