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.
FAI is currently a network-based noninteractive installer. Thus, in order to get the installer working, you will want:
One thing that will help is to have lots of hard drive space available on the server. You will want at least 1GB of free space to install programs on the server, and 2GB is useful if you can get it. In addition, you will want to have at least 500MB of space to host a local NFS mirror for Debian packages - and preferably you want more space.
You will want to install Linux on this server. Since our project is a Debian-based subdistribution, it is probably most convenient to install Debian on the server. This may not be strictly necessary, but it helps a lot. We'll assume that you have managed to manually install Debian on the server.
For added security, you may want to partition the drive so that NFS-mounted directories are on their own partition. You might consider separate partitions for your local package mirror, for the NFS root directory that clients mount (which should not be bigger than 100MB), and for the WCLP configuration files (which is currently less than 15MB and should not be bigger than that unless you have a lot of custom kernels to install).
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.
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.
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.)
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 .
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:
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.)
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.
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:
make-fai-bootfloppy -v -s host -i ip
where host is the hostname you chose, and ip is the IP address for this floppy.
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