[ 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.
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 directory which contains the whole file system for the install clients during installation. It must be exported via NFS, so the install clients can mount it. 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.
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, subversion or Git.
The 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)
. A partial Debian mirror only
for i386 architecture for Debian 5.0 (aka lenny) without the source packages
needs about 22.0GB of disk space. Accessing the mirror via HTTP will be the
default way in most cases. To see more output from the script call
mkdebmirror -v. 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
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 installed: apt-move{a} dhcp3-server{a} fai-doc{a} fai-quickstart fai-server{a} genisoimage{a} inetutils-inetd{a} nfs-kernel-server{a} openssh-server{a} syslinux-common{a} tftpd-hpa{a} 0 packages upgraded, 11 newly installed, 0 to remove and 0 not upgraded. Need to get 2593kB of archives. After unpacking 8561kB will be used. Do you want to continue? [Y/n/?]
The configuration for the FAI package (not the configuration data for the
install clients) is defined in fai.conf
. Definitions that are
only used for creating the nfsroot are located in
make-fai-nfsroot.conf
. Edit these files before calling
fai-setup
. These are important variables in
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.
These are important variables in 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 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 debootstrap(8)
and apt-get(8)
to create the
nfsroot file system in /srv/fai/nfsroot
. It needs about 390MB of
free disk space. After editing fai.conf
and
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 390MB MBytes disk space. This may take a long time. Creating base system using debootstrap version 1.0.10 Calling debootstrap lenny /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: nfs-common fai-nfsroot module-init-tools dhcp3-client ssh rdate lshw portmap bootpc rsync lftp less dump reiserfsprogs e2fsprogs usbutils hwinfo psmisc pciutils hdparm smartmontools parted mdadm lvm2 dnsutils ntpdate dosfstools cvs jove xfsprogs xfsdump procinfo dialog discover mdetect console-tools console-common expect iproute udev subversion cfengine2 libapt-pkg-perl grub lilo read-edid linux-image-486 aufs-modules-2.6-486 . . `/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.26-1-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: mdadm: no arrays defined in configuration file. `/srv/fai/nfsroot/live/filesystem.dir/boot/vmlinuz-2.6.26-1-486' -> `/srv/tftp/fai/vmlinuz-2.6.26-1-486' `/srv/fai/nfsroot/live/filesystem.dir/boot/initrd.img-2.6.26-1-486' -> `/srv/tftp/fai/initrd.img-2.6.26-1-486' DHCP environment prepared. If you want to use it, you have to enable the dhcpd and the tftp-hpa daemon. 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) Log file written to /var/log/fai/make-fai-nfsroot.log 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 example of fai-setup.log
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)
. Adding '-v' gives you a more verbose output
which may help you pinpoint the error. The output is written to
/var/log/fai/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 the following command:
faiserver# /etc/init.d/nfs-kernel-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 Collecting Ethernet addresses, Section 4.6.
When you make changes to fai.conf
,
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.8.4, 17 dec 2008 for FAI package version 3.2.14lange@informatik.uni-koeln.de