This chapter has various hints which may not always be explained in great detail.
When using HTTP access to a Debian mirror, the local /var partition on all install clients must be big enough to keep the downloaded Debian packages. Do not try with less than 250 Mbytes unless you know why. You can limit the number of packages installed at a time with the variable $MAXPACKAGES.
You can shorten some script if you will just use one single fcopy command fcopy -r /.
You can merge two directories which contain configuration information, if one is a global one, and the other a local one. We use it to merge the temples from the fai package, and our local configuration, which contains encrypted passwords and other information that should not be readable for others. This is how our setup looks like.
We have a local configuration space located in
~admin/additional-fai/
which contains following files:
./files ./files/etc ./files/etc/hosts ./files/etc/hosts/NUERBURG1 ./files/etc/hosts/NUERBURG2 ./files/etc/network ./files/etc/network/interfaces ./files/etc/network/interfaces/NUERBURG1 ./files/etc/network/interfaces/NUERBURG2 ./files/etc/bootptab ./files/etc/bootptab/kueppers ./files/etc/kueppers.tar.gz ./files/packages ./files/packages/kernel-image-2.4.20-cskoeln_2_i386.deb ./files/packages/cloop-2.4.20-cskoeln_0.63.1-4+2_i386.deb ./files/packages/xv-doc_3.10a-26_all.deb ./files/packages/xv_3.10a-26_i386.deb ./files/packages/Packages.gz ./files/packages/ltmodem-2.4.20_8.26a9_i386.deb ./files/packages/cloop-2.4.20-acer_0.63.1-4+1_i386.deb ./files/packages/kernel-image-2.4.20-acer_1_i386.deb ./files/packages/pcmcia-modules-2.4.20-acer_3.1.33-6+1_i386.deb ./files/packages/kernel-headers-2.4.20-acer_1_i386.deb ./files/packages/ltmodem-2.4.20-acer_8.26a9_i386.deb ./files/packages/debmirror_20020427-1_all.deb ./files/usr ./files/usr/local ./files/usr/local/ACROREAD5.tar.gz ./files/usr/local/share ./files/usr/local/share/LPRng ./files/usr/local/share/LPRng/pcfilter ./files/usr/local/share/LPRng/pcfilter/NISLPRCLIENT ./files/usr/lib ./files/usr/lib/mozilla ./files/usr/lib/mozilla/CS_KOELN.tar.gz ./class ./class/dom.var ./class/NET_9.var ./mk-packages-gz ./scripts ./scripts/kueppers ./README ./disk_config ./disk_config/dom ./disk_config/kueppers
The file mk-packages-gz
is just the simple script which creates
the Packages.gz
as explained above. In order to copy this local
configuration data into the fai config space we use this command:
cp -a ~admin/additional-fai/* /usr/local/share/fai
If you remove a file in you local configuration, do not forget to remove this file also in the configuration space, otherwise it will still be used.
AFter calling set-disk-info
, a list of all local hard disks is
stored to $disklist and $device_size contains a list of
disk devices and their sizes.
Use fai-divert -a
if a postinst script calls a configuration
program, e.g. the postinst script for package apache calls apacheconfig, which
needs manual input. You can fake the configuration program so the installation
can be fully automatic. But don't forget to use fai-divert -R
to
remove all faked script.
During the installation you can execute commands inside the newly installed system in a chroot environment by using chroot /tmp/target or just $ROOTCMD followed by the command you want to call; for example $ROOTCMD dpkg -l shows the packages installed on the new system.
The only task which has to be done manually for new hardware is to assign the MAC address to a hostname and to an IP address, and to define classes for this host if the existing configuration files are not generic enough to deal with this new host.
There's a tradeoff between writing a few large configuration scripts, or many short scripts, one for each class. Large scripts can distinguish classes by using case statements, the ifclass test or with class mechanisms for cfengine scripts.
If your computer can't boot from the network card, you do not always need to
boot from floppy. Define a partition /fai-boot
in your
disk_config
configuration file. Then the class
FAI_BOOTPART will automatically be defined and will create a lilo
or grub entry for booting the FAI bootfloppy from this partition. So you can
start the re-installation without a boot floppy. This will also make the test
phase shorter, since booting from hard disk is much faster than booting from
floppy.
partition.DISKLESS
.
FAI Guide (Fully Automatic Installation)
Version 2.4.2, 17 feb 2004 for FAI version 2.5.3lange@informatik.uni-koeln.de