[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ next ]
The following items are required for an installation via FAI.
The computer must have a network interface card[3]. Unless a diskless installation should be performed a local hard disk is also needed. No floppy disk, CD-ROM, keyboard or graphics adapter is needed.
The clients need one of these daemons to obtain boot information. But you can also put all this information onto the boot floppy.
The TFTP daemon is used for transferring the kernel to the clients. It's only needed when booting from network card with a boot PROM.
It is a mountable directory which contains the whole file system for the install clients during installation. It will be created during the setup of the FAI package and is also called nfsroot.
Access to a Debian mirror is needed. A local mirror of all Debian packages or
an apt-proxy(8)
is recommended if you install several computers.
The kernel image and the initial RAM disk that is used for booting the install clients. It mounts its root file system via NFS.
This directory tree, which contains the configuration data, is mounted via NFS by default. But you can also get this directory from a revision control system like CVS or subversion.
The TFTP daemon and an NFS server will be enabled automatically when installing the fai-server package.
The script mkdebmirror
[4] can be used for creating your own local Debian mirror. This
script uses the script debmirror(1)
and rsync(1)
. A
partial Debian mirror only for i386 architecture for Debian 4.0 (aka etch)
without the source packages needs about 22.0GB of disk space. Accessing the
mirror via HTTP will be the normal way in most cases. To see more output from
the script call mkdebmirror --debug. A root account is not
necessary to create and maintain the Debian mirror.
You can use the command fai-mirror(1)
for creating a partial
mirror that only contains the software packages that are used in the classes in
your configuration space. A partial mirror containing all package for the
simple examples from the package fai-doc will only need about 300MB of disk
space. 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:
# apt-get install apache2 # ln -s /files/scratch/debmirror /var/www/debmirror
Create a file sources.list(5)
in /etc/fai/apt
which
gives access to your Debian mirror. An example can be found in
/usr/share/doc/fai-doc/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.
To setup a FAI install server you need at least the packages fai-server and fai-doc. The package fai-quickstart contains dependencies on all required packages for an install server. Do not install the package fai-nfsroot on a normal system. This package can only be installed inside the nfsroot. If you would like to install all packages that are useful for a FAI install server, use the following command
# aptitude install fai-quickstart Reading Package Lists... Done Building Dependency Tree Reading extended state information Initializing package states... Done Reading task descriptions... Done The following NEW packages will be automatically installed: dhcp3-common dhcp3-server fai-client fai-doc fai-server tftp-hpa tftpd-hpa The following NEW packages will be installed: dhcp3-common dhcp3-server fai-client fai-doc fai-quickstart fai-server tftp-hpa tftpd-hpa 0 packages upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 13.0MB of archives. After unpacking 17.9MB will be used. Do you want to continue? [Y/n/?]
The suggested packages for FAI are: debmirror, mknbi, apt-move, mkisofs, grub, aptitude.
The configuration for the FAI package (not the configuration data for the
install clients) is defined in /etc/fai/fai.conf
. Definitions
that are only used for creating the nfsroot are located in
/etc/fai/make-fai-nfsroot.conf
. Edit these files before calling
fai-setup
. These are important variables in
/etc/fai/make-fai-nfsroot.conf
:
For building the nfsroot there's the command called
debootstrap(8)
. It needs the location of a Debian mirror and the
name of the distribution (etch, lenny, sid) for which the basic Debian system
should be built.
If you use HTTP or FTP access to the Debain mirror, add its IP-address and the name to this variable. For a Beowulf master node, add the name and IP-address of both networks to it. This variable is not needed when the clients have access to a DNS server.
which of DHCP and/or BOOTP the server should create setups for (when make-fai-nfsroot is run). If undefined (the default) it means to create the setup for both protocols.
A directory containing shell scripts, which are sourced at the end of make-fai-nfsroot for additional modifications of the NFSROOT. Defaults to /etc/fai/nfsroot-hooks.
These are important variables in /etc/fai/fai.conf
:
This variables described how to access the configuration space on the install clients. It's an Universal Resource Identifier (URI) even it may not always comply to the official schemes.
Currently supported methods are:
The config space is mounted from host via NFS.
The config space is received from a cvs checkout.
The config space checked out from a subversion repository. Also supported are svn+file, svn+http, svn+ssh, svn+https and checkouts without a user name.
The config space checked out from a git repository, host can be empty. Also supported is git+http.
If FAI_CONFIG_SRC is undefined in /etc/fai/fai.conf
,
then the default is to use an NFS mount from the fai install server onto the
install client. It's the same as nfs://`hostname`/$FAI_CONFIGDIR
with the host name determined on the install server. Remember that this
directory must be exported to all install clients, so that all files can be
read by root.
If you have NFS access to your local Debian mirror, specify the remote file system. It will be mounted to $MNTPOINT, which must also be defined. It's not needed if you use access via FTP or HTTP.
The content of /etc/fai/apt/sources.list
and
FAI_DEBMIRROR are 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.
FAI uses apt-get(8)
to create the nfsroot file system in
/srv/fai/nfsroot
. It needs about 330MB of free disk space. After
editing /etc/fai/fai.conf
and
/etc/fai/make-fai-nfsroot.conf
call fai-setup
.
faiserver[~]# fai-setup Creating FAI nfsroot in /srv/fai/nfsroot/live/filesystem.dir. By default it needs more than 330MB MBytes disk space. This may take a long time. Creating base system using debootstrap version 0.3.3.2etch1 Calling debootstrap etch /srv/fai/nfsroot/live/filesystem.dir http://ftp.debian.org/debian Creating base.tgz Upgrading /srv/fai/nfsroot/live/filesystem.dir install_packages: reading config files from directory /etc/fai Adding additional packages to /srv/fai/nfsroot/live/filesystem.dir: fai-nfsroot module-init-tools dhcp3-client ssh rdate lshw portmap bootpc rsync lftp rsh-client less dump reiserfsprogs ext2resize usbutils hwinfo psmisc pciutils hdparm smartmontools parted mdadm lvm2 dnsutils ntpdate dosfstools cvs jove xfsprogs xfsdump sysutils dialog discover mdetect console-tools console-common expect iproute udev subversion live-initramfs cfengine2 libapt-pkg-perl grub lilo read-edid linux-image-486 unionfs-modules-2.6-486 install_packages: reading config files from directory /etc/fai . . `/etc/fai/NFSROOT' -> `/srv/fai/nfsroot/live/filesystem.dir/etc/fai/NFSROOT' `/etc/fai/apt' -> `/srv/fai/nfsroot/live/filesystem.dir/etc/fai/apt' `/etc/fai/apt/sources.list' -> `/srv/fai/nfsroot/live/filesystem.dir/etc/fai/apt/sources.list' `/etc/fai/fai.conf' -> `/srv/fai/nfsroot/live/filesystem.dir/etc/fai/fai.conf' `/etc/fai/make-fai-nfsroot.conf' -> `/srv/fai/nfsroot/live/filesystem.dir/etc/fai/make-fai-nfsroot.conf' `/etc/fai/menu.lst' -> `/srv/fai/nfsroot/live/filesystem.dir/etc/fai/menu.lst' Shadow passwords are now on. Removing `local diversion of /usr/sbin/update-initramfs to /usr/sbin/update-initramfs.distrib' update-initramfs: Generating /boot/initrd.img-2.6.18-5-486 W: mdadm: unchecked configuration file: /etc/mdadm/mdadm.conf W: mdadm: please read /usr/share/doc/mdadm/README.upgrading-2.5.3.gz . W: mkconf: MD subsystem is not loaded, thus I cannot scan for arrays. W: mdadm: failed to auto-generate temporary mdadm.conf file. W: mdadm: no configuration file available. W: mdadm: falling back to emergency procedure in initramfs. `/srv/fai/nfsroot/live/filesystem.dir/boot/vmlinuz-2.6.18-5-486' -> `/srv/tftp/fai/vmlinuz-2.6.18-5-486' `/srv/fai/nfsroot/live/filesystem.dir/boot/initrd.img-2.6.18-5-486' -> `/srv/tftp/fai/initrd.img-2.6.18-5-486' DHCP environment prepared. If you want to use it, you have to enable the dhcpd and the tftp-hpa daemon. BOOTP environment prepared. Removing `local diversion of /sbin/discover-modprobe to /sbin/discover-modprobe.distrib' make-fai-nfsroot finished properly. <= * Adding line to /etc/exports: /srv/fai/config 134.95.9.149/255.255.255.0(async,ro,no_subtree_check) Adding line to /etc/exports: /srv/fai/nfsroot 134.95.9.149/255.255.255.0(async,ro,no_subtree_check,no_root_squash) Re-exporting directories for NFS kernel daemon.... You have no FAI configuration space yet. Copy the simple examples with: cp -a /usr/share/doc/fai-doc/examples/simple/* /srv/fai/config 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 find both lines that are marked with an asterisk in your output. 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 dependency problems can be ignored. If
you have problems running fai-setup, they usually stem 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 make-fai-nfsroot -r -v 2>&1 | tee make-fai-nfsroot.log
It may help to enter the chroot environment manually
sudo chroot /srv/fai/nfsroot/live/filesystem.dir
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-doc/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:
faiserver# /etc/init.d/nfs-kernel-server reload faiserver# /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 /srv/tftp/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-doc/examples/simple/ using the copy command above and read Installation details, Chapter 7. 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 4.3.
When you make changes to /etc/fai/fai.conf
,
/etc/fai/make-fai-nfsroot.conf
the nfsroot has to be rebuilt by
calling make-fai-nfsroot(8)
. If you only like to install a new
kernel to the nfsroot add the flags -k or -K to
make-fai-nfsroot. This will not recreate your nfsroot, but only
updates your kernel and kernel modules inside the nfsroot or add additional
packages into the nfsroot.
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
.
[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ next ]
FAI Guide (Fully Automatic Installation)
FAI Guide version 2.6.8, 7 December 2007 for FAI package version 3.2.1lange@informatik.uni-koeln.de