Work in progress
?TableOfContents(3)
FAI (Fully Automatic Installation) Is a large scale deployment solution, basicaly it boots from dhcp+pxe+tftp mounts a nfs root, from where the installation runs.
Information sources
Main page http://faiwiki.informatik.uni-koeln.de/index.php/Main_Page
Quick start guide http://www.informatik.uni-koeln.de/fai/fai-guide/ch-impatient.html
partition tool with lvm support [optional] http://faiwiki.informatik.uni-koeln.de/index.php/Setup_harddisks_2
https://lists.uni-koeln.de/pipermail/linux-fai/2004-August/002307.html
Package sources
deb http://layer-acht.org/debian etch fai
Installation
- install main server, or if you wish a dedicated barebone profile
- configure network sources, update, upgrade
make sure you include deb http://layer-acht.org/debian etch fai
- Make sure you cache debian packages to improve speed You can either install a deb proxy server, or tune squid
- [optionally] installing and configuring appprox,apt-proxy
- [optionally] tune squid
- [optionally] install a local debian mirror
- [optionally] to avoid warning grab holgers key
gpg --keyserver keyring.debian.org --recv 5072D036AC583520 && gpg --armor --export 5072D036AC583520 | apt-key add -
- make sure you have enough space for /srv (my /srv is 365M at the moment, so create a logical volume with 400MB and mount it as /srv)
- aptitude install fai-doc fai-server syslinux perl-tk libproc-daemon-perl
- verify that you got fai pacakges from holgers repo and not the ones in etch. it should be version 3.2.1, the rest of this text depends on it.
- edit the following in these files. leave the rest at the default.
- in /etc/fai/fai.conf
- LOGUSER=fai
- in /etc/fai/make-fai-nfsroot.conf
FAI_DEBOOTSTRAP="etch http://tjener:9999/debian" example shows a approx server, replace with whatever suites you
FAI_ROOTPW=<SOMETHING>
- in /etc/fai/NFSROOT
in the first PACKAGES install part add debian-edu-archive-keyring. if you use setup_harddisks_2 also add libparse-recdescent-perl parted lvm2
- in /etc/fai/apt/sources.list use sane sources, consider copying the ones from the faiserver, (Yes you'll need holgers repo here too)
- in /etc/fai/fai.conf
run fai-setup -v
Configuration
Server
- add a service called faiserver
- bind config, add a CNAME from faiserver to tjener (or staticxx if you have a dedicated) update serial and reload bind.
- Adjust the dhcp configuration
- edit /etc/dhcp3/dhcp.conf add all your ltspserver hosts (as normally, or as a separate group) You will need.
- add use-host-decl-names on;
- add server-name faiserver;
- add next-server faiserver;
- add filename "fai/pxelinux.0";
- edit /etc/dhcp3/dhcp.conf add all your ltspserver hosts (as normally, or as a separate group) You will need.
edit /etc/inetd.conf this will break a combined server. so use a main-server or a barebone server.
- point tftp server to /srv/tftp
- /etc/init.d/openbsd-inetd restart
- use lwat and add all ltspservers you want to install into the ltsp-server-hosts group
fai
Files needed
All the files here are examples, People knowing how to use FAI will cry at the spagetti.
/srv/fai/config/files/etc/debian-edu/config/EDUCONFIG
NONINTERACTIVE="true" PROFILE="Thin-Client-Server" LANGCODE="nn_NO:nn:no_NO:no:nb_NO:nb:da:sv:en_GB:en" LOCALE="nn_NO"
/srv/fai/config/files/etc/default/update-hostname/EDUCONFIG
ENABLED="true"
/srv/fai/config/files/etc/default/update-hostname/EDUCONFIG FIXME
Hooks needed
/srv/fai/config/hooks/# cat instsoft.EDUCONFIG must be executable
#copy files from files area fcopy -iM /etc/default/update-hostname fcopy -iM etc/debian-edu/config #get the tasks in early $ROOTCMD apt-get -y install debian-edu-archive-keyring debian-edu-config education-tasks $ROOTCMD apt-get -y install debian-edu-install
Script needed
/srv/fai/config/scripts/LAST/90-d-e-cfrun
error=0 ; trap "error=$((error|1))" ERR fcopy -iM /usr/share/ltsp/plugins/ltsp-build-client/Debian/015-sources-list fcopy -iM /etc/default/update-hostname $ROOTCMD update-initramfs -k all -u $ROOTCMD /etc/init.d/update-hostname restart $ROOTCMD cfengine-debian-edu -Dinstallation $ROOTCMD ltsp-build-client --mirror http://www:9999/debian --security-mirror http://www:9999/security --copy-sourceslist --accept-unsigned-packages --dist etch --debconf-seeds /usr/lib/debian-edu-install/defaults.ltsp-chroot --late-packages sitesummary-client,debian-edu-artwork,debian-edu-artwork-usplash,debian-edu-archive-keyring $ROOTCMD debian-edu-pxelinux.cfg exit $error
Package lists needed
FIXME
Installing a fai client
- fai-chboot -FIv ltpserver[nn], and boot the machine.
Default boot
to set the default to boot from local harddrive use fai-chboot -o default
lvm
LVM is not supported in the current fai packages, youll need to use svn versions, this is a moving target and your milage may vary basicaly checkout using svn co svn://svn.debian.org/fai/people/michael/features/setup_harddisks_2 hd2 put it into /srv/fai/nfsroot/usr/local Read more at http://faiwiki.informatik.uni-koeln.de/index.php/Setup_harddisks_2
Files needed for lvm
/srv/fai/config/hooks/partition.EDUCONFIG.source
#clean drives, BAD BAD HAX wipe the drive before lvm is loaded. dd if=/dev/zero of=/dev/sda2 bs=1k count=1 dd if=/dev/zero of=/dev/sda1 bs=1k count=1 dd if=/dev/zero of=/dev/sda bs=1k count=1 hdparm -z /dev/sda modprobe dm_mod #run setup_harddisks_2 cd /usr/local/hd2/implementation/ debug=1 ./shdd2 -X # skip the original parititioning . $LOGDIR/disk_var.sh skiptask partition
Example partition file for lvm /srv/fai/config/disk_config/EDUCONFIG
disk_config disk1 bootable:1 primary /boot 250 ext3 defaults primary - 0- - - # config the LVM disk_config lvm vg vg_system sda2 vg_system-root / 1548 ext3 defaults -O dir_index,resize_inode vg_system-usr /usr 4000 ext3 defaults -O dir_index,resize_inode vg_system-var /var 1000 ext3 defaults -O dir_index,resize_inode vg_system-opt /opt 3596 ext3 defaults -O dir_index,resize_inode vg_system-var+opt+ltsp+swapfiles /var/opt/ltsp/swapfiles 3000 ext3 defaults -O dir_index,resize_inode vg_system-swap swap 48 swap -