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 9.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
Create a file sources.list(5)
in /etc/fai
which gives
access to your Debian mirror. An example can be found in
/usr/share/doc/fai/examples/etc
. Also add the IP-address of the
http server to the variable NFSROOT_ETC_HOSTS in
/etc/fai/make-fai-nfsroot.conf
when the install clients have no
DNS access.
Before installing FAI, you have to install the package
fai-kernels
, which contains the install kernels for FAI. You can
install both packages using & packageinstall If you like to install all
recommended packages that are useful for fai, use following command
# apt-get install mknbi 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
. Definition
that are only used for creating the nfsroot are located in
/etc/fai/make-fai-nfsroot.conf
. Since FAI doesn't use
debconf
yet, edit these files before calling
fai-setup
. These are important variables in
/etc/fai/make-fai-nfsroot.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.
/etc/fai/sources.list
instead.
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 DHCP and BOOTP protocol.
These are important variables in /etc/fai/fai.conf
:
/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 content of /etc/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 230MB 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
and
/etc/fai/make-fai-nfsroot.conf
call fai-setup
.
kueppers[~]# fai-setup Adding system user fai... Adding new user fai (101) with group nogroup. Creating home directory /home/fai. /home/fai/.rhosts created. User account fai set up. Creating FAI nfsroot can take a long time and will need more than 230MB disk space in /usr/lib/fai/nfsroot. Creating nfsroot for sarge using debootstrap dpkg: base-passwd: dependency problems, but configuring anyway as you request: base-passwd depends on libc6 (>= 2.3.2.ds1-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 `/etc/fai/sources.list' -> `etc/apt/sources.list' Upgrading /usr/lib/fai/nfsroot Adding additional packages to /usr/lib/fai/nfsroot: module-init-tools dhcp3-client ssh file rdate hwinfo bootpc rsync wget rsh-client less dump reiserfsprogs usbutils dpkg-dev ext2resize hdparm smartmontools parted raidtools2 lvm2 dnsutils ntpdate dosfstools cfengine cvs jove sysutils dialog discover mdetect libnet-perl netcat libapt-pkg-perl grub lilo read-edid kudzu hwtools dmidecode hostname: Host name lookup failure /var/lib/dpkg/tmp.ci/preinst: line 7: lvscan: command not found Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... starting OpenBSD Secure Shell server: sshd. `/etc/fai/fai.conf' -> `/usr/lib/fai/nfsroot/etc/fai/fai.conf' `/etc/fai/make-fai-nfsroot.conf' -> `/usr/lib/fai/nfsroot/etc/fai/make-fai-nfsroot.conf' `/etc/fai/sources.list' -> `/usr/lib/fai/nfsroot/etc/fai/sources.list' DHCP environment prepared. If you want to use it, you have to enable the dhcpd and the tftp-hpa daemon. 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 the simple examples 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. <= *
A complete log of fai-setup is available on the fai web page. 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(8)
. 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.
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
,
/etc/fai/make-fai-nfsroot.conf
or want to install a new kernel to
the nfsroot, the nfsroot has to be rebuilt by calling
make-fai-nfsroot(8)
.
The setup of FAI adds the FAI account, exports file systems and calls
make-fai-nfsroot(8)
. 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)
FAI Guide version 2.4.4, 9 aug 2004 for FAI package version 2.6lange@informatik.uni-koeln.de