Views
opsi wiki page
>>
Opsi Server Installation
>>
OpsiLinuxClients
>>
Installing Debian with FAI on opsi
last edited 3 years ago by doertel
Installation von FAI (Fully Automatic Installation) auf Opsi-Server
Grundsätzliches zu FAI
* zu finden unter http://www.informatik.uni-koeln.de/fai/
* Doku unter http://www.informatik.uni-koeln.de/fai/fai-guide.html/
FAI auf dem Opsi-Server
* in /etc/apt/sources.list hinzufügen
deb http://www.informatik.uni-koeln.de/fai/download sarge koeln
* fai installieren mit
aptitude install fai_quickstart
* /etc/fai/fai.conf konfigurieren, hier nur ein Beispiel:
# /etc/fai/fai.conf -- configuration for FAI
(Fully Automatic Installation)
installserver=opsidemo
mirrorhost=ftp.debian.org
SERVERINTERFACE=eth0
LOGUSER=
FAI_REMOTESH=rsh
FAI_REMOTECP=rcp
FAI_LOGPROTO=
LOGSERVER=
LOGREMOTEDIR="upload"
LOGPASSWD=
FAI_CONFIGDIR=/usr/local/share/fai
FAI_LOCATION=$installserver:$FAI_CONFIGDIR
MNTPOINT=/mnt2
NFSROOT=/usr/lib/fai/nfsroot
FAI=/fai
* /etc/fai/make-fai-nfsroot.conf konfigurieren,
hier nur ein Beispiel:
FAI_DEBOOTSTRAP="sarge http://$mirrorhost/debian"
NFSROOT_PACKAGES="cfengine expect"
FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
KERNELPACKAGE=/usr/lib/fai/kernel/linux-image-2.6.16-fai-kernels_1_i386.deb
FAI_BOOT="dhcp bootp"
FAICLIENTS=`ifconfig ${SERVERINTERFACE} | grep -w inet | cut -d: -f 2 | cut -d ' ' -f 1 | sed -e 's/\(.*\)\.[0-9]*/\1.0\/24/' | tr -d ' '`
FAI_DEBOOTSTRAP_OPTS="--exclude=pcmcia-cs,ppp,pppconfig,pppoe,pppoeconf,dhcp-client,exim4,exim4-base,exim4-config,exim4-daemon-light,mailx,at,fdutils,info,modconf,libident,logrotate,exim"
nfssize="250MB" # size of the nfsroot. Only informational purpose
packages="fai-nfsroot module-init-tools dhcp3-client ssh rdate lshw hwinfo portmap bootpc rsync wget lftp rsh-client less dump reiserfsprogs usbutils psmisc pciutils hdparm smartmontools parted mdadm lvm2 dnsutils ntpdate dosfstools cvs jove xfsprogs xfsdump sysutils dialog discover mdetect libnet-perl netcat libapt-pkg-perl console-tools"
* /etc/fai/sources.list vervollständigen um fai-Quelle (s.o.)
* fai-setup aufrufen, dauert lange, viele Ausgaben,
am Ende sollte dies stehen
(Zeilen mit Stern müssen erfüllt sein)
In filename: /boot/fai/installimage
Out filename: /boot/fai/installimage_3com
Adding MBA support...
MBA support has been succesfully added
BOOTP environment prepared.
Removing `diversion of /sbin/discover-modprobe to /sbin/discover-modprobe.distrib by fai'
make-fai-nfsroot finished properly. <= *
Adding line to /etc/exports: /usr/local/share/fai 123.45.6.0/24(async,ro)
Adding line to /etc/exports: /usr/lib/fai/nfsroot 123.45.6.0/24(async,ro,no_root_squash)
Re-exporting directories for NFS kernel daemon...done.
You have no FAI configuration. Copy the simple examples with:
cp -a /usr/share/doc/fai/examples/simple/* /usr/local/share/fai
Then change the configuration files to meet your local needs.
FAI setup finished. <= *
* in /etc/hosts den Client eintragen, also bsp.:
pctest 192.168.16.21
* boot-Dateien von fai in das Verzeichnis kopieren,
das von tftpd von Opsi verwendet wird
cp -pr /boot/fai /tftpboot
* in /etc/dhcp3/dhcpd.conf den filename für den
Rechner/die Gruppe ändern
filename "fai/pxelinux.0";
* vorigen 2 Schritte können auch entfallen,
dann muss nur das Verzeichnis von fai-chboot auf
/tftpboot/linux/pxelinux.cfg geändert werden.
Es liegen dann die konfigurationen von fai und
opsi in einem Verzeichnis.
Sie können sich dann gegenseitig überschreiben
(falls man einen PC versehentlich mit reinstmgr
und fai-chboot bearbeitet)
* fai-chboot aufrufen, das default-Verzeichnis
ändern und bestimmen,
was der PC beim nächsten Boot machen soll (hier: sysinfo)
(PcName? hier: pctest)
fai-chboot -d /tftpboot/fai/pxelinux.cfg -FSv pctest
* Client booten