The following items are required for an installation via FAI.
apt-proxy(8)
is recommended if you install several computers.
fai-kernels
provides a default kernel
for fai.
The TFTP daemon and a NFS server will be enabled automatically when installing the FAI package. All clients must have a network card which is recognized by the install kernel.
The script mkdebmirror
[3] can be used for creating your own local Debian mirror. This
script uses the script debmirror
[4] and rsync(1)
. A partial Debian mirror only for
i386 architecture for Debian 3.0 (aka woody) without the source packages needs
about 5.0GB of disk space. Accessing the mirror via NFS will be the normal and
fastest way in most cases. To see more output from the script call
mkdebmirror --debug. You need not to create and maintain the
Debian mirror with the root account. To use HTTP access to the local Debian
mirror, install the web server software and create a symlink to the local
directory where you mirror is located:
# apt-get install apache # ln -s /files/scratch/debmirror /var/www/debmirror
Don't forget to adjust the variable FAI_SOURCES_LIST in
/etc/fai/fai.conf
to access the Debian mirror.
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/12.7MB of archives. After unpacking 13.9MB will be used. Selecting previously deselected package fai. (Reading database ... 48317 files and directories currently installed.) Unpacking fai (from .../main/f/fai/fai_2.5_all.deb) ... Selecting previously deselected package fai-kernels. Unpacking fai-kernels (from .../fai-kernels_1.5.3_i386.deb) ... Setting up fai (2.5) ... To set up FAI, edit /etc/fai/fai.conf and call fai-setup. Setting up fai-kernels (1.5.3) ...
If you like to install all recommended packages that are useful for fai, use following command
# apt-get install netboot dhcp3-server tftpd-hpa rsh-server wget syslinux
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.
The configuration for the FAI package (not the configuration data for the
install clients) 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)
. It needs the location of a Debian mirror and the
name of the distribution (woody,sarge,sid) for which the basic Debian system
should be built.
sources.list
(used by
apt-get(8)
); it defines the location and access method for the
Debian mirror. If this variable is undefined, the file
/etc/fai/sources.list
or /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 which
supports both the BOOTP and DHCP protocol.
/usr/local/share/fai
but some like to use
/home/fai/config
or /var/fai/config
. Remember that
this directory must be exported to all install clients, so that all files can
be read by root.
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
. It needs about 160MB of free disk space.
Before setting up FAI, you should get the program imggen
,[5] 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. Using interface eth0 to determine local hostname. Adding kueppers to known_hosts. /home/fai/.ssh/known_hosts created. /home/fai/.ssh/authorized_keys created. User account fai set up. Creating FAI nfsroot can take a long time and will need more than 160MB disk space in /usr/lib/fai/nfsroot. /usr/lib/fai/nfsroot already exists. Removing /usr/lib/fai/nfsroot Creating nfsroot for woody using debootstrap 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: portmap file rdate cfengine bootpc wget rsh-client less dump ext2resize strace hdparm parted dnsutils grub ntpdate dosfstools sysutils dialog libdetect0 discover mdetect read-edid kudzu hwtools Detecting hardware: 3c59x ide-scsi usb-uhci usb-uhci modprobe: Can't open dependencies file /lib/modules/2.4.20/modules.dep (No such file or directory) Skipping 3c59x; assuming it is compiled into the kernel. modprobe: Can't open dependencies file /lib/modules/2.4.20/modules.dep (No such file or directory) Skipping usb-uhci; assuming it is compiled into the kernel. Creating SSH2 RSA key Creating SSH2 DSA key Restarting OpenBSD Secure Shell server: sshd. DHCP environment prepared. Now enable dhcpd and the special tftp daemon Kernel image file name = /usr/lib/fai/nfsroot/boot/vmlinuz-2.4.20 Output file name = /boot/fai/installimage Kernel command line = "auto rw root=/dev/nfs nfsroot=kernel nfsaddrs=kernel ip=both" 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. Exporting directories for NFS kernel daemon...done. Starting NFS kernel daemon: nfsd mountd. You have no FAI configuration. Copy FAI template files with: cp -a /usr/share/doc/fai/examples/simple/* /usr/local/share/fai Then change the configuration files to meet your local needs. FAI setup finished. <= *
It's important that you will see both lines that are marked with an asterisk. Otherwise something went wrong. If you'll get a lot of blank lines, it's likely that you are using konsole, the X terminal emulation for KDE which has a bug. Try again using xterm.
The warning messages from dpkg about dependencies problems can be ignored. If you have problems running fai-setup, they stem usually from make-fai-nfsroot. You may restart it by calling 'make-fai-nfsroot -r' (recover). Adding '-v' gives you a more verbose output which may help you pinpoint the error. If you want to create a log file you may use
sudo /usr/sbin/make-fai-nfsroot -r -v 2>&1 | tee make-fai-nfsroot.log
It may helpful to enter the chroot environment manually
sudo chroot /usr/lib/fai/nfsroot
The setup routine adds some 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) if
not already available. So you can add a user before calling
fai-setup(8)
using the command adduser(8)
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. 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 the
symbolic links to the kernel image which 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 examples from /usr/share/doc/fai/examples/simple/ 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 rebuilt 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 mount 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
.
FAI Guide (Fully Automatic Installation)
Version 2.3.3, 6 jan 2004 for FAI version 2.5lange@informatik.uni-koeln.de