Following items are required for an installation via FAI.
The TFTP daemon and a NFS server will be enabled automatically when installing
the FAI package. Different install kernel images for BOOTP and DHCP are
available within the package fai-kernels
. All clients must have a
network card, which is recognized by the install kernel.
The script mkdebmirror
[4] can be used for creating your own local Debian mirror. This
script uses the script debmirror
[5] and rsync(1)
. A partitial Debian mirror only
for i386 architecture for Debian 3.0 (aka woody) without the source packages
needs about 4.2 GB of disk space.
Before installing FAI, you have to install the package
fai-kernels
, which contains the install kernels for FAI. You can
install both packages using
kueppers[~]# apt-get install fai fai-kernels Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: fai fai-kernels 0 packages upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 0B/11.0MB of archives. After unpacking 12.1MB will be used. Selecting previously deselected package fai. (Reading database ... 48317 files and directories currently installed.) Unpacking fai (from .../main/f/fai/fai_2.3.1_all.deb) ... Selecting previously deselected package fai-kernels. Unpacking fai-kernels (from .../fai-kernels_1.1.5_i386.deb) ... Setting up fai (2.3.1) ... To set up FAI, edit /etc/fai/fai.conf and call fai-setup. Setting up fai-kernels (1.1.5) ...
You can also get the newest version of fai
and
fai-kernels
from the download page of fai and install the packages
using the dpkg
command.
All definitions for the FAI package (not the configuration data) are defined in
/etc/fai/fai.conf
. Since FAI doesn't use debconf
yet, edit this file before calling fai-setup
. These are important
variables in /etc/fai/fai.conf
:
debootstrap(8)
, which replaces the use of the
FAI_BASETGZ variable. It needs the location of a Debian mirror and
the distribution (woody,stable,unstable) for which the basic Debian system
should be build.
sources.list
(used by
apt-get(8)
), which defines the location and access method of the
Debian mirror. If this variable is undefined, the definitions of
/etc/apt/sources.list
will be used. For more information on the
file format see sources.list(5)
.
make-kpkg(8)
-
which includes the default kernel for booting the install clients. The Debian
package fai-kernels
contains the default install kernels with
BOOTP and DHCP support. Do not use the kernel with BOOTP support when you have
a DHCP server running in your network and vice versa. This could lead to
missing information.
The variables FAI_SOURCES_LIST and FAI_DEBMIRROR are used by the install server and also by the clients. If your install server has multiple network card and different host names for each card (as for a Beowulf server), use the install server name which is known by the install clients.
FAI uses apt-get(8)
to create the nfsroot filesystem in
/usr/lib/fai/nfsroot
, which needs about 150MB of free disk space.
Before setting up FAI, you should get the program imggen
,[6] if you like to boot from a 3Com
network card. This executable converts netboot images created by
mknbi-linux(8)
, so they can be booted by network cards from 3Com.
Put that executable in your path (e.g. /usr/local/bin
). After
editing /etc/fai/fai.conf
call fai-setup
.
kueppers[~]# fai-setup Account $LOGUSER=fai already exists. Make sure, that all install clients can log into this account without a password. /home/fai/.rhosts created. User account fai set up. Creating FAI nfsroot can take a long time and will need more than 150MB disk space in /usr/lib/fai/nfsroot. dpkg: base-passwd: dependency problems, but configuring anyway as you request: base-passwd depends on libc6 (>= 2.2.4-4); however: Package libc6 is not installed. dpkg: base-files: dependency problems, but configuring anyway as you request: . . . Automatically converting /etc/network/interfaces succeeded. Old interfaces file saved as interfaces.dpkg-old. Creating base.tgz Upgrading /usr/lib/fai/nfsroot Adding additional packages to /usr/lib/fai/nfsroot: dhcp-client file rdate cfengine bootpc wget rsh-client less dump ext2resize strace hdparm parted dnsutils grub ntpdate psmisc dosfstools sysutils dialog Creating SSH2 RSA key Creating SSH2 DSA key Restarting OpenBSD Secure Shell server: sshd. Kernel image file name = /usr/lib/fai/nfsroot/boot/vmlinuz-2.2.20 Output file name = /boot/fai/installimage Kernel command line = "auto rw root=/dev/nfs nfsroot=kernel nfsaddrs=kernel" Image Creator for MBA ROMs v1.01, Date: Nov 26, 2001 Design and Coding by Nick Kroupetski <NickKroupetski@hotmail.com> Usage: imggen [OPTION] inputfile outputfile -a, Add 3Com MBA/BootWare support -r, Remove 3Com MBA/BootWare support from image file -i, Show information on an image -h, Help screen In filename: /boot/fai/installimage Out filename: /boot/fai/installimage_3com Adding MBA support... MBA support has been succesfully added BOOTP environment prepared. make-fai-nfsroot finished. Stopping NFS kernel daemon: mountd nfsd. Unexporting directories for NFS kernel daemon...done. Starting NFS kernel daemon: nfsd mountd. Exporting directories for NFS kernel daemon...done. You have no FAI configuration. Copy FAI template files with: cp -a /usr/share/fai/templates/* /usr/local/share/fai Then change the configuration files to meet your local needs. FAI setup finished.
The setup routine adds lines to /etc/exports
to export the nfsroot
and the configuration space to all hosts that belong to the netgroup
faiclients. If you already export a parent directory of these
directories, you may comment out these lines, since the kernel nfs server has
problems exporting a directory and one of its subdirectories with different
options. All install clients must belong to this netgroup, in order to mount
these directories successfully. Netgroups are defined in
/etc/netgroup
or in the corresponding NIS map. An example for the
netgroup file can be found in
/usr/share/doc/fai/examples/etc/netgroup
. For more information,
read the manual pages netgroup(5)
and the NIS HOWTO. After
changing the netgroups , the NFS server has to reload its configuration. Use
one of the following commands, depending on which NFS server you are using:
kueppers# /etc/init.d/nfs-kernel-server reload kueppers# /etc/init.d/nfs-user-server reload
The setup also creates the account fai (defined by $LOGUSER). The
log files of all install clients are saved to the home directory of this
account. If you boot from network card, you should change the primary group of
this account, so this account has write permissions to /boot/fai
in order to change symbolic links to the kernel image, that is booted by a
client. See also variable TFTPLINK in
class/DEFAULT.var
.
After that, FAI is installed successfully on your server, but has no configuration for the install clients. Start with the templates from /usr/share/fai/templates using the copy command above and read Installation details, Chapter 6. Before you can set up a DHCP or BOOTP daemon, you should collect some network information of all your install clients. This is described in section Creating a boot floppy, Section 3.3.
When you make changes to /etc/fai/fai.conf
or want to install a
new kernel to nfsroot, the nfsroot has to be rebuild by calling
make-fai-nfsroot
.
The setup of FAI adds the FAI account, exports file systems and calls
make-fai-nfsroot
. If you call make-fai-nfsroot -v
you will see more messages. When using a local Debian mirror it's important,
that the install server can mounted this directory via NFS. If this mount
fails, check /etc/exports
and /etc/netgroup
. An
example can be found in /usr/share/doc/fai/examples/etc/netgroup
.
lange@informatik.uni-koeln.de