Subsections

Installing the project from scratch

Although we have released our project's configuration scripts as an open-source project, actually setting up the project after downloading those scripts takes some work. This section outlines the steps you would need to take in order to set up an installation server with our project files. If you already have access to a functional server (as we do at the Working Centre), you probably don't need to concern yourself with this section too much. However, if our server ever breaks or needs to be re-installed, this section might prove useful in getting the project re-installed.

Similarly, if you are a project administrator who downloaded our scripts from SourceForge and are wondering what to do with them, this section is for you.

Hardware you need

FAI is currently a network-based noninteractive installer. Thus, in order to get the installer working, you will want:

Install the configuration files

Once you have installed Debian onto your server, you can download our project's files from http://wclp.sourceforge.net . You will want all of the configuration files, and you may want our customized kernels as well.

Let's assume you unpack these scripts into the /usr/local/share/wclp directory.

Set up NFS

You need to configure NFS - the network file system - server in order to allow client machines to connect to the server.

First, install a NFS server package. If you have a kernel with NFS service support installed, install the nfs-kernel-server package. Otherwise you will want the nfs-user-server package.

We found that the nfs-user-server worked with a stock Debian kernel, and the other server did not.

To configure the server, you will need to set up the /etc/exports file. This file specifies the clients that are allowed to mount your directories, and which directories they are allowed to mount.

Our /etc/exports file looks like this:

/usr/local/mirror 192.168.1.0/255.255.255.0(ro,root_squash)

/usr/local/share/fai/installer 192.168.1.0/255.255.255.0(ro,root_squash)

/usr/local/share/fai/nfsroot 192.168.1.0/255.255.255.0(ro,root_squash)

/usr/local/mirror 192.168.1.190(ro,root_squash)

The first three lines make the server directories containing the mirror, installer configuration files and nfsroot accessible to any client with an IP address beginning with 192.168.1.

ro stands for “read only”. root_squash means that the client cannot execute any commands in these directories as the root user.

The fourth line should be unnecessary. It specifies that the server can access the
/usr/local/mirror directory.

For security purposes, you are supposed to put directories you export on their own partitions.

Set up a mirror

A local mirror of Debian packages speeds up installations considerably. If you want to mirror the entire Debian distribution for your architecture, you can use the debmirror script (available from the FAI home page), or the demish package.

We did not have the space to mirror the entire Debian archive, so we set up a partial mirror. To do this, we used the apt-move package. This involved using APT to download (and install) all the packages we wanted on a machine (in our case the server), and then using apt-move to transfer the files from the APT cache directory to our local mirror. See Section 7 and the apt-move manual for more details.

You will want to register your mirror with APT. We use the following lines in our
/etc/apt/sources.list to register our mirror:

 % APT lines
deb file:/usr/local/mirror/debian/ woody main non-free contrib 
deb file:/usr/local/mirror/debian/ woody/non-US main non-free contrib 
deb file:/usr/local/mirror localdebs/

These lines should appear at the top of the sources.list file, so that APT considers them before accessing remote sites.

The first two lines access the structured mirror. The third line looks at the unstructured mirror. See the APT-HOWTO for more information. (where? -P.)

Set up FAI

In order to install anything you will need to set up the FAI installer. To do this, first install the Debian packages fai and fai-kernels. You will then need to configure FAI by editing the file /etc/fai/fai.conf .

fai.conf

By default, FAI wants to use either DHCP or BOOTP to assign IP addresses to clients. However, getting this to work properly involves collecting MAC addresses of network cards, which is bad for us because each computer we install could potentially have its own network card, and volunteers would have to modify the DHCP server settings every time they wanted to install the distribution on a new machine.

Instead of DHCP or BOOTP, we assign IP information via a boot floppy. Unfortunately, we ran into a snag: we could not append all the FAI options to the boot floppies using LILO's “append” parameter. Thus, we put the following options into the fai.conf file:

FAI_LOCATION="192.168.1.190:/usr/local/share/fai/installer"
FAI_FLAGS="verbose createvt"
FAI_ACTION="install"

Note that this is dangerous and wrong. It means the “sysinfo” option is permanently disabled, and FAI will attempt to wipe out a hard drive and install Linux whenever called.

In addition to these options, we modify the following lines:

NFSROOT_PACKAGES:
We take out reiserfsprogs and add dpkg-dev, discover, libdetect0, mtools . Some of these will likely be included by default in future FAI versions.

FAI_DEBOOTSTRAP:
Used to set up a core set of packages for the installer.

FAI_DEBMIRROR:
We have a local mirror, so we specify it here.

FAI_SOURCES_LIST:
These are the sources.list lines that use t he local mirror.

Note that you can also change the default root password for clients here. This password is encrypted; to encrypt your root password replacement, use the mkpasswd program.

You can override this password by specifying a different one in
wclp/installer/class/DEFAULT.var

(Hacks to make the boot floppies work.. -P.)

(do you have to change some FAI files for this to work? -P.)

make-fai-nfsroot

Once you have set up the /etc/fai/fai.conf file, you should be ready to set up the nfsroot - a stripped-down Debian installation that clients will mount to do their installs.

To make the nfsroot, become root and type the following command:

make-fai-nfsroot -v

FAI should start downloading packages and installing them into the nfsroot directory. It will also copy the fai.conf you set up, which means that changes to /etc/fai/fai.conf on the server will not be reflected in the nfsroot unless you explicitly copy the file over - and depending on the change, you may have to call make-fai-nfsroot again.

Finish up


Making FAI boot floppies

Our project boots clients using startup floppies, so if you are using a DHCP or BOOTP server, you can skip this step.

We created several boot floppies so that we could do multiple installs at once. Each boot floppy specifies a unique IP address and a unique hostname.

FAI provides a command called make-fai-bootfloppy to create a boot floppy. However, we modified this program so that we could specify an IP address explicitly. Our patched version is currently located in the wclp/installer/local.files/scripts/ directory. (Check this -P.)

To use our version, simply move our make-fai-bootfloppy to /usr/local/bin , and the manpage file to /usr/local/man/man1 .

To make a boot floppy, carry out the following steps:

  1. Choose a hostname and IP address for the floppy. We chose to relate hostnames to IP addresses: if we chose 192.168.1.191 for the floppy IP, we called the host wc_191 .

  2. Put a floppy into the floppy drive, become the root user, and execute the command:

    make-fai-bootfloppy -v -s host -i ip

    where host is the hostname you chose, and ip is the IP address for this floppy.

  3. To register this floppy, you may want to edit the wclp/installer/class/S01alias.sh file in the installer. You will want to configure your hostnames to select the MENU, AUTOCHOOSE and XSERVER-SELECT classes, as we do in the following fragment:

    case $HOSTNAME in
        wc_???)
            echo MENU ;
            echo AUTOCHOOSE ;
            echo XSERVER-SELECT ;;
    esac
    

At this point, you should be able to boot a client machine connected to the network with your new floppy. The client should be able to access your server and install Linux.

(Of course, it won't work this smoothly. Do I have any troubleshooting tips to offer? -P.)

2004-04-13