Translation(s): none


This page describes how to get started and install the faiserver. All other machines are deployed from the faiserver. Please report failures to the mailing list.

Installing the faiserver

The installation of the very first machine, the faiserver, is the most involved step when deploying a Debian-LAN. As soon as the faiserver has been set up, the installation of all other machines is only a matter of booting over the network.

We prepare a CD image which is in turn used to install the mainserver of Setup_A from CD or USB stick.

It is also possible to install the mainserver via network (PXE). The approach is also described below. However, preparing the CD image is the simpler approach, well tested and recommended.

CD approach: Creating an iso image for installation

We assume you have an installation of Debian squeeze available. For example, install a minimal Debian system (no graphical desktop environment required) on a machine you plan to use later in the Debian-LAN or use a virtual machine (a 3GB disk image is sufficient). On that system install fai-quickstart and git:

aptitude install fai-quickstart git

Replace the configuration space by the Debian-LAN configuration space:

rm -r /srv/fai/config
cd /tmp/
git clone --branch squeeze git://git.debian.org/git/collab-maint/debian-lan
cp -r /tmp/debian-lan/fai/config /srv/fai/
cd -

Modify ROOTPW and (depending on your setup) other variables in /srv/fai/config/class/SERVER_A.var. Replace /etc/fai/grub.cfg by the Debian-LAN version:

cp /srv/fai/config/files/etc/fai/grub.cfg/SERVER_A /etc/fai/grub.cfg
cp /srv/fai/config/files/etc/fai/NFSROOT/FAISERVER /etc/fai/NFSROOT

If you want to use diskless clients, take a look at Setup_A on how to add an extra partition for the chroot. Then run as root:

fai-setup -v

Now create a partial Debian mirror with all packages needed for the mainserver (replace AMD64 by I386 if you use i386):

fai-mirror -v -c AMD64,GRUB_PC,DEFAULT,DHCPC,FAIBASE,FAISERVER,LOG_SERVER,PROXY,NTP_SERVER,DNS_SERVER,NFS_SERVER,LDAP_CLIENT,LDAP_SERVER,KERBEROS_CLIENT,KERBEROS_KDC,KDC_LDAP,DISKLESS_SERVER,SERVER_A /srv/debmirror/ | tee /var/log/fai/fai-mirror.log

The CD image is created by fai-cd. To make the command work, edit /usr/sbin/fai-cd and replace mkisofs by genisoimage (609568). In the line genisoimage is called, replace -r by -R (655030). Then run:

fai-cd -m /srv/debmirror/ fai-cd.iso

Burn the CD image (~550M) or prepare an USB stick and install the mainserver. After first boot follow the message displayed to create the mainserver's FAI-nfs-root.

You are now ready to install the other machines in the Debian-LAN from the mainserver. Take a look at the desktop package selection in /srv/fai/config/package_config/DESKTOP. Choose the prefered environment and add all packages you need. Boot the clients over network and PXE-install. If your machines cannot boot via PXE, take a look at gPXE and burn a CD.

For instructions on how to add users and machines to the Debian-LAN, see the corresponding setup page, for example Setup_A.


PXE approach: Setting up the seed machine for installation

/!\ This approach is not recommended and rarely tested.

For the PXE approach we follow the CD approach described above until the mirror is set up. Now we use the local mirror in /etc/fai/apt/sources.list:

deb file:/media/mirror squeeze main contrib non-free

Comment all other repositories and add the mirror in /etc/fai/fai.conf:

FAI_DEBMIRROR=<your hostname of the seed machine>:/srv/debmirror

Modify /etc/exports if necessary. You should have something like:

/srv/fai/nfsroot *(async,ro,no_subtree_check,no_root_squash)
/srv/fai/config  *(async,ro,no_subtree_check,no_root_squash)
/srv/debmirror   *(async,ro,no_subtree_check,no_root_squash)

Restart NFS:

/etc/init.d/nfs-kernel-server restart

Modify /etc/fai/make-fai-nfsroot.conf:

NFSROOT_ETC_HOSTS="192.168.1.1 <your hostname of the seed machine>"

Now call fai-setup again and carefully check if anything works (almost at the end the script should report: "make-fai-nfsroot finished properly"):

fai-setup -v

If you run into errors, probably your mirror cannot serve the packages needed. Check if you have to add some more classes to fai-mirror. (To rebuild the mirror, switch to the the official repositories in /etc/fai/apt/sources.list). We are now ready to disconnect from the network providing internet access and connect to the isolated network. All packages needed should be available from the local mirror.

We are left to make sure the seed machine can serve dhcp requests in the isolated network:

cp /usr/share/doc/fai-doc/examples/etc/dhcpd.conf /etc/dhcp/

Add mainserver and MAC to /etc/dhcp/dhcpd.conf:

...
next-server 192.168.1.1;
filename "fai/pxelinux.0";
...
host mainserver {hardware ethernet <your MAC>; fixed-address 192.168.1.2;}

Finally, add the mainserver to /etc/hosts:

...
192.168.1.2     mainserver
...

and modify /etc/network/interfaces for the isolated network:

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
       address 192.168.1.1
       netmask 255.255.255.0

Execute:

fai-chboot -IFv mainserver

Now you are ready to reboot the seed machine in the isolated network. After that, boot the mainserver over network and enjoy the installation. When done, disconnect the seed machine and connect the mainserver's second ethernet interface to the network offering dhcp. You are now ready to install the other machines in the Debian-LAN from the mainserver. If your machines cannot boot via PXE, take a look at gPXE and burn a CD.

For instructions on how to add users and machines to the Debian-LAN, see the corresponding setup page, for example Setup_A.