How to setup a FAI Install server on debian squeeze

Ok, Debian Squeeze is out for a while and now it`s time to setup a new FAI (Fully Automatic Installation) install server. In this tutorial, I will describe, how to setup FAI with dhcpd3 or dnsmasq for bootp and DHCP.

purpose

This document describes how to set up a FAI install server 3.4.8 on Debian Linux 6.x with dhcpd3 or dnsmasq

list of references

related article

prerequisite

software

The FAI install server is installed with a Debian Squeeze 6.x, and apt-cacher is installed.

Hardware

I will use the following network and hardware informations (MAC address), change these settings for your setup!

  • FAI install server, Debian Squeeze 6.x, IP 192.168.2.245, Hostname fai.local
  • Client debian-vm-01, MAC address 00:16:3e:1c:64:9b, IP: 192.168.2.240

install FAI

Add the FAI repository to a new configuration file named /etc/apt/sources.list.d/fai.list

deb http://fai-project.org/download squeeze koeln

To verify the packages from fai-project, add the following gpg key

c

Now we install the FAI packages and some helper tools

Answer all questions during the installation with the default answer.

setup FAI

FAI

fai logging user

During the installation, clients will send logfiles to the “fai” user.

/etc/fai/fai.conf

Open /etc/fai/fai.conf in your favourite editor and add/edit the following options.

FAI_CONFIG_SRC=nfs://192.168.2.245/srv/fai/config
LOGUSER=fai
FAI_DEBMIRROR=192.168.2.245:/srv/mirror/debian-squeeze
MNTPOINT=/media/mirror
FAI=/var/lib/fai/config

Use the makepasswd command, to create a new password, and add the encrypted password to the FAI_ROOTPW variable in the /etc/fai/make-fai-nfsroot.conf configuration file. (default password is fai)

fai-setup

Run the fai-setup command to create the nfs root directory, NFS exports and to add the FAI user to the system.

NFS exports

Add the following NFS exports to /etc/exports and restart the NFS Kernel Daemon:

FAI / Debian mirror

The fai-mirror script creates a mirror of the needed Debian packages (defined in /srv/fai/config/package_config/)

NFS root

With the following command we will create the FAI nfsroot:

Add to the nfsroot apt sources configuration (/srv/fai/nfsroot/live/filesystem.dir/etc/apt/sources.list) the apt-cacher proxy (including Debian backports repositories) – Check the releated articled for the apt-cacher setup.

deb http://192.168.2.44/apt-cacher/ftp.de.debian.org/debian/ squeeze main non-free contrib
deb http://192.168.2.44/apt-cacher/security.debian.org/ squeeze/updates main non-free contrib
deb http://192.168.2.44/apt-cacher/fai-project.org/download squeeze koeln

Set the boot NFS option in /srv/fai/nfsroot/live/filesystem.dir/etc/initramfs-tools/initramfs.conf to NFS

BOOT=nfs

setup PXE

pxelinux.cfg

tftpd

Setup the tftpd-hpa daemon in /etc/default/tftpd-hpa to serve the kernel and initrd file to the install client.

TFTP_USERNAME=”tftp”
TFTP_DIRECTORY=”/srv/tftp/fai”
TFTP_ADDRESS=”0.0.0.0:69″
TFTP_OPTIONS=”–secure”

DHCP/bootp

Decide, if you want to use dnsmasq, or dhcpd3

dnsmasq

dhcp

Install the client

Boot the client with PXE boot enabled (enable PXE in the Clients BIOS) and select “Debian Squeeze Install” from the menu.

Tagged , , , , , , , , , , . Bookmark the permalink.

One Response to How to setup a FAI Install server on debian squeeze

  1. Pingback: How to setup a FAI Install server on debian squeeze | Frederik … | Linux Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>