Linux World 2005: FAI Talk
Linux World 2005: FAI Talk
Enterprise Deployments of
Debian GNU/Linux
– NFS Server
– DHCP or BOOTP Server
– TFTP Server
How? FAI Basics.
● Planning your installation
– Network
● Collecting and recording MAC addresses
● Naming and IP addressing schemes for clients
● Network bandwidth requirement during installation
● Physical LAN topology
– Installation server
How? FAI Basics.
● Planning your installation
– Target hardware
● Support for PXE network booting
● Hard drive sizes
● RAM sizes
● Unique kernel requirements
● Uniformity or non-uniformity of hardware
How? FAI Basics.
● Planning your installation
– Target configurations
● Hard drive partitioning
● Filesystems to be preserved during updates
● Remote filesystems to be mounted automatically
● Software to be installed
● Configuration requirements of software
● Authentication policies – central or local
How? Configuration.
● /etc/fai/
– fai.conf
– make-fai-nfsroot.conf
– sources.list
● FAI boot kernel
● NFS root directory
How? Configuration.
● Configuration space
– class/
● Definition of variables
– Encrypted root password
– Timezone settings
– Console font and keyboard settings
– Installation monitor server address
● Definition of installation classes
● Use $HOSTNAME, $DOMAIN, dialog, et al
How? Configuration.
#!/bin/sh
case $HOSTNAME in
demohost)
echo "FAIBASE DHCPC DEMO" ;;
gnomehost)
echo "FAIBASE DHCPC DEMO XFREE GNOME";;
*)
echo "FAIBASE DHCPC" ;;
esac
exit 0
How? Configuration.
● Configuration space
– disk_config/
● Handles partitioning, filesystem creation and
filesystem preservation
● Follows defined classes
● Can be overridden using a custom hook – useful
for configuring software RAID or LVM
How? Configuration.
# generic disk configuration for one small disk
# disk size from 500Mb up to what you can buy today
#
# <type> <mp> <size> [mount opt][;extra options]
disk_config disk1
primary / 70-200 rw ; -c xfs
logical swap 40-500 rw
logical /var 90-1000 rw ; xfs
logical /tmp 50-1000 rw ; xfs
logical /usr 200-4000 rw ; xfs
logical /home preserve9 rw,nosuid ; xfs lazyformat
How? Configuration.
● Configuration space
– package_config/
● Packages to be installed, using apt commands
– hold to not upgrade a package
– install to install using apt
– remove to remove using apt
– taskinst to install packages belonging to a task
– aptitude to install using aptitude
– aptitude-r to install with recommended packages
– dselect-upgrade to use package selections
How? Configuration.
PACKAGES install I386
memtest86+ kernel-image-2.4-386
PACKAGES aptitude DHCPC
dhcp3-client
PACKAGES aptitude GRUB
grub lilo-
PACKAGES aptitude LILO
lilo grub-
PACKAGES aptitude-r GERMAN
german
PACKAGES aptitude-r FAISERVER
fai fai-kernels mknbi dhcp3-server tftpd-hpa
rsh-server wget syslinux debmirror tcpdump
How? Configuration.
● Configuration space
– files/
● Files to be copied over to installation targets using
fcopy
● Parent directories and file are directories which
contain files named using class names
– scripts/
● Scripts to copy files and configure applications
● Directories and scripts named using class names
How? Configuration.
#!/bin/sh
if ifclass FAISERVER
then
fcopy -M /boot/fai/pxelinux.cfg/default
fcopy -m root,root,0600 /etc/default/dhcp3-server
fcopy -M /etc/default/tftpd-hpa
fcopy -M /etc/dhcp3/dhcpd.conf
fcopy -M /etc/exports
fcopy -M -r /etc/fai
$ROOTCMD mkdir /opt/fai
$ROOTCMD rsync rsync://faiserver/fai/ /opt/fai
fi
How? Configuration.
● Configuration space
– debconf/
● Stores data for debconf
● Uses the format used by debconf-set-selections
– hooks/
● Scripts to override default tasks
We Want More!
● Custom Debian Packages
– Must read: Debian New Maintainers’ Guide
– Step 1: Debianize with dh_make
●
dh_make -e [email protected] -f ../app-0.99.tar.gz