Implementierung eines FAI-Servers unter Ubuntu

Aus Thomas-Krenn-Wiki
Zur Navigation springen Zur Suche springen

Fully Automatic Installation (FAI) ist eine Open Source Software zur Installation und Konfiguration von Linux Systemen. FAI eignet sich zum Massen-Deployment von Linux. Dieser Artikel erläutert, wie ein FAI Server auf einem Ubuntu System eingerichtet wird.

Implementierung eines FAI-Servers

Grundlegendes:

  • Betriebssystem des Servers: Ubuntu Server 12.04
  • Betriebssystem das über FAI installiert werden soll: Ubuntu Precise 12.04
  • Server läuft im VLAN: 10.2.1.0

Netzwerk des Server konfigurieren

  • Namensgebung des Servers in /etc/hostname:
tanke
  • in /etc/hosts Hostname und IP des Servers eintragen:
127.0.0.1	localhost
127.0.1.1	tanke.TKS.local tanke
10.2.1.50	tanke
  • Da der Server selbst zum DHCP-Server wird, müssen in /etc/network/interfaces die statischen IP's der NIC's eth0 und eth1(für DHCP Server) eingetragen werden:
 # This file describes the network interfaces available on your system 
 # and how to activate them. For more information, see 	interfaces(5). 

 # The loopback network interface 
 auto lo eth0 eth1
 iface lo inet loopback 

 # The primary network interface 
 # auto eth0 
 # iface eth0 inet dhcp 

 iface eth0 inet static 
	address 10.2.1.50 
	netmask 255.255.255.0 
	gateway 10.2.1.1

DHCP-Server Konfigurieren

  • DHCP-Server installieren:
apt-get install dhcp3-server
  • In /etc/default/dhcp3-server das Inferface angeben über das der DHCP läuft. In diesem Fall läuft dieser über eth0(10.2.1.50):
INTERFACES="eth0" 
  • In /etc/dhcp3/dhcpd.conf die Konfiguration des DHCP-Severs vornehmen. Subnet, Netmask, lease-time in Sekunden, Adress range, DNS und die dazugehörigen Optionen eintragen:
ddns-update-style none; 
default-lease-time 1800; 
max-lease-time 7200; 

option domain-name "TKS.local"; 
option domain-name-servers 192.168.110.8, 192.168.110.9, 192.168.110.11; 

subnet 10.2.1.0 netmask 255.255.255.0 { 
       range 10.2.1.51 10.2.1.60; 
       option routers 10.2.1.1; 
       next-server 10.2.1.50; 
       filename "pxelinux.0"; 
       use-host-decl-names on; 

       filename="pxelinux.0"; 
       option broadcast-address 10.2.1.255; 
       allow bootp; 
       allow booting; 
       allow unknown-clients; 
       } 
  • Um die Einstellungen zu übernehmen, muss der DHCP-Server neu gestartet werden:
/etc/init.d/dhcp3-server restart
  • Client an eth1 des Servers hängen, um zu testen, ob der DHCP Adressen zwischen 10.2.1.51 und 10.2.1.60 verteilt. → Wenn der Client eine Adresse erhalten hat, ist die vorläufige Konfiguration abgeschlossen

FAI Installation

  • In der Kommandozeile folgenden Befehl ausführen:
apt-get install fai-quickstart

TFTP-Server einrichten

  • Der TFTP-Server hält das Bootimage für den Client der installiert werden soll bereit und wird so eingerichtet, dass dieser automatisch beim Systemstart gestartet wird
  • Damit der TFTP-Server beim Systemstart automatisch gestartet wird, muss die Datei: /etc/default/tftpd-hpa folgendermaßen bearbeitet werden:
# /etc/default/tftpd-hpa 

RUN_DAEMON="yes" 
OPTIONS="-l -s /var/lib/tftpboot" 

TFTP_USERNAME="tftp" 
TFTP_DIRECTORY="/var/lib/tftpboot" 
TFTP_ADDRESS="10.2.1.50:69" 
TFTP_OPTIONS="--secure" 
  • Damit der Client weiß, wo er das Boot-Image abholen kann, muss in der Config-Datei des DHCP-Servers (/etc/dhcp3/dhcpd.conf) noch die Adresse des TFTP-Servers (next-server) eingetragen werden:
next-server 10.2.1.50;
  • Danach sollte ein Neustart des Servers erfolgen

PXE Boot Menü erstellen (optional)

  • Damit man beim PXE Boot ein Auswahlfenster hat, aus dem man z.B. weitere FAI-Installationen Auswählen kann, muss ein PXE Boot Menü erstellt werden. Dazu müssen die Dateien menu.c32 und pxelinux.0 vom Verzeichnis /usr/lib/syslinux in das Verzeichnis /var/lib/tftpboot kopiert werden:
cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/
cp /usr/lib/syslinux/menu.c32 /var/lib/tftpboot/
  • Danach muss in /var/lib/tftpboot noch das Verzeichnis pxelinux.cfg mit der darin liegenden Datei default erstellt werden:
mkdir pxelinux.cfg
nano default
  • In die Datei default wird die Konfiguration inklusive aller Optionen für das PXE Boot Menü geschrieben. Zum Beispiel:
DEFAULT menu.c32 
ALLOWOPTIONS 0 
PROMPT 0 
TIMEOUT 100 

MENU TITLE Server PXE Boot Menu 

LABEL      fai-generated 
MENU LABEL ^Ubuntu 12.04 FAI mit grafischer Oberflaeche 
KERNEL     vmlinuz-3.2.0-32-generic 
APPEND     initrd=initrd.img-3.2.0-32-generic ip=dhcp root=/dev/nfs nfsroot=10.2.1.50:/srv/fai/nfsroot boot=live FAI_FLAGS=verbose,sshd,createvt FAI_ACTION=install

FAI Konfiguration

  • Nachdem die Grundkonfiguration des Systems fertig ist, kommen wir nun zur eigentlichen Konfiguration von FAI
  • In /etc/fai/fai.conf folgende Zeilen einfügen (Server=IP eth0):
# an account on the install server which saves all log-files 
# and which can change the kernel that is booted via network. 
LOGUSER=fai 

# set protocol type for saving logs. Values: ssh, rsh, ftp 
FAI_LOGPROTO=ssh 

# the install server 
SERVER=10.2.1.50 

# the configuration space on the install server 
FAI_CONFIGDIR=/srv/fai/config 

# access the config space on the specified install server 
# using NFS 
FAI_CONFIG_SRC=nfs://10.2.1.50$FAI_CONFIGDIR 

# mount point where the mirror will be mounted 
MNTPOINT=/media/mirror 

# the local configuration directory on the install client 
FAI=/var/lib/fai/config
  • Als nächstes wird der NFS Root erstellt. Dazu müssen in /etc/fai/make-fai-nfsroot.conf folgende Zeilen editieren werden:
# the directory on the install server which contains 
# the nfsroot 
NFSROOT=/srv/fai/nfsroot 

# TFTP root directory 
TFTPROOT=/srv/tftp/fai 

# Where to get the packages needed to build the 
# nfsroot 
FAI_DEBOOTSTRAP="lenny http://ftp.debian.org/debian" 

# the encrypted (with md5 or crypt) root password on all	
# install clients during 
# installation process; used when log in via ssh; default pw is: fai 
FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1' 

# following lines should be read only for most of you 
FAI_DEBOOTSTRAP_OPTS="--exclude=dhcp-client,info" 
  • Damit der NFS Root gebaut wird, muss folgender Befehl auf der Kommandozeile ausgeführt werden:
fai-setup -v
  • In /etc/exports den NFS Root und die config freigeben:
/srv/fai/config *(async,ro,no_subtree_check) 
/srv/fai/nfsroot *(async,ro,no_subtree_check,no_root_squash)
  • In /srv/fai/config/class/10-base-classes folgendes FAI Script editieren (müsste aber im Normalfall schon von FAI selbst eingetragen sein):
#! /bin/bash

# Echo architecture and OS name in uppercase. Do NOT remove  	
# these two lines.

uname -s | tr '[:lower:]' '[:upper:]'
[ -x "`which dpkg`" ] && dpkg –print-installation-architecture | tr a-z A-Z
[ -f /etc/RUNNING_FROM_FAICD ] && echo "FAICD"
exit 0
  • In /srv/fai/config/class/20-hwdetect.source folgendes Script einfügen (müsste aber im Normalfall schon von FAI selbst eingetragen sein):
#! /bin/bash

# (c) Thomas Lange, 2002-2008, lange@informatik.uni-koeln.de

# NOTE: Files named *.source will be evaluated, but their output ignored. Instead
# the contents of $newclasses will be added to the list of defined classes.

[ "$action" = "dirinstall" ] && return 0 # Do not execute when doing dirinstall

echo 0 > /proc/sys/kernel/printk

# load all IDE drivers

# DMA does not work if we load all modules in drivers/ide, so only try pci modules
mod=$(find /lib/modules/$(uname -r)/kernel/drivers/ide/pci -type f | sed 's/\.o$//' | sed 's/\.ko$//' | sed 's/.*\///')
for i in $mod; do
    modprobe $i 1>/dev/null 2>&1
done
# Booting from CD does not always enable DMA.
for d in $( echo /proc/ide/hd[a-z] 2>/dev/null); do
    [ -d $d ] && echo "using_dma:1" > $d/settings
done

# load additional kernel modules (from old 11modules.source)
# this order should also enable DMA for all IDE drives
kernelmodules="usbkbd ide-disk ide-cd"
case $(uname -r) in
    2.6*) kernelmodules="$kernelmodules ohci-hcd usbhid usbmouse ide-generic mptspi ata_piix dm-mod md-mod aes dm-crypt" ;;
esac

for mod in $kernelmodules; do
    [ "$verbose" ] && echo loading kernel module $mod
    modprobe -a $mod 1>/dev/null 2>&1
done

# let discover do most of the job
#[ -x /sbin/discover-modprobe ] && /sbin/discover-modprobe

# now we can mount the USB filesystem
mount -t usbfs  usbfs /proc/bus/usb

modprobe -a sd_mod sr_mod

echo $printk > /proc/sys/kernel/printk

set_disk_info  # calculate number of available disks
save_dmesg     # save new boot messages (from loading modules)
  • In /srv/fai/config/class/50-host-classes folgendes Script einfügen (müsste aber im Normalfall schon von FAI selbst eingetragen sein):
#! /bin/bash

# assign classes hosts

# use a list of classes for our demo machine
case $HOSTNAME in
    vm-ubuntu904)
	echo "BC_BASE HDD_SINGLE NW_DHCP LANG_GERMAN OS_UBUNTU_904_X32" ;;
    *)
	echo "BC_BASE HDD_SINGLE NW_DHCP LANG_GERMAN OS_UBUNTU_904_X32" ;;
esac

(ifclass I386 || ifclass AMD64) && echo GRUB 
exit 0
  • Datei BC_BASE.var in /srv/fai/config/class erstellen und folgendes editieren:
# Base class which is shared among clients (which includes servers)
# may be overridden with custom *.var files

# allow installation of packages from unsigned repositories
FAI_ALLOW_UNSIGNED=1

KEYMAP=de-latin1-nodeadkeys

# set UTC=yes if your system clock is set to UTC (GMT), and UTC=no if not.
UTC=yes
TIMEZONE=Europe/Berlin

# root password for the new installed linux system; md5 and crypt are possible
# pw is "fai"
ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'

# MODULESLIST contains modules that will be loaded by the new system,
# not during installation these modules will be written to /etc/modules
# If you need a module during installation, add it to $kernelmodules
# in 20-hwdetect.source. But discover should do most of this job
MODULESLIST="usbkbd ehci-hcd ohci-hcd uhci-hcd usbhid psmouse"

# erros in tasks greater than this value will cause the installation to stop
STOP_ON_ERROR=700

LOGSERVER=$SERVER
LOGPASSWD='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'

# use the new partitioning tool
USE_SETUP_STORAGE=1

# limit the number of packages install added to apt-get or aptitude
#MAXPACKAGES=

# if fai is usded to do softupdates, any local changes on the
# install clients are lost. However, fai makes backup copies of
# locally changed files; by default, they are written to the same
# directory as the original file, with .pre_fcopy appended.
# If you wish to save them together with the logfiles, this will
# do the job:
#FAI_BACKUPDIR=$LOGDIR/backup

# if log files are saved via FTP on the server, this specifies the
# path to save logfiles to. Not needed if $FAI_LOGPROTO in file
# fai.conf is set to 'ssh'.
#LOGREMOTEDIR=

#CONSOLEFONT=
#liloappend=
  • In /srv/fai/config/debconf die Datei LANG_GERMAN erstellen und folgendes editieren:
locales		locales/default_environment_locale select de_DE.UTF-8
locales		locales/locales_to_be_generated multiselect de_DE.UTF-8 UTF-8
xserver-xorg	xserver-xorg/config/inputdevice/keyboard/layout	string	de
xserver-xorg	xserver-xorg/config/inputdevice/keyboard/model	string	pc105
xserver-xorg	xserver-xorg/config/inputdevice/keyboard/options	string	lv3:ralt_switch
xserver-xorg    xserver-xorg/autodetect_monitor         boolean false
xserver-xorg    xserver-xorg/autodetect_keyboard        boolean true
xserver-xorg    xserver-xorg/autodetect_mouse           boolean true
xserver-xorg    xserver-xorg/autodetect_video_card      boolean true
console-setup	console-setup/variant	select	Germany
console-setup	console-setup/charmap	select	UTF-8
console-setup	console-setup/layoutcode	string	de
console-setup	console-setup/compose	select	No compose key
console-setup	console-setup/fontsize-text	select	16
console-setup	console-setup/optionscode	string	lv3:ralt_switch
console-setup	console-setup/layout	select	Germany
console-setup	console-setup/detected	note	
console-setup	console-setup/variantcode	string	
console-setup	console-setup/codesetcode	string	Lat15
console-setup	console-setup/modelcode	string	pc105
console-setup	console-setup/ask_detect	boolean	false
console-setup	console-setup/altgr	select	Right Alt
console-setup	console-setup/ttys	string	/dev/tty[1-6]
console-setup	console-setup/model	select	Generic 105-key (Intl) PC
console-setup	console-setup/fontsize-fb	select	16
console-setup	console-setup/switch	select	No temporary switch
console-setup	console-setup/codeset	select	# Latin1 and Latin5 - western Europe and Turkic languages
console-setup	console-setup/toggle	select	No toggling
console-setup	console-setup/fontface	select	VGA
console-setup	console-setup/fontsize	string	16
  • In /srv/fai/config/disk_config die Datei HDD_SINGLE erstellen und folgendes zur Formatierung der Festplatten einfügen:
# Standard client formatting using setup-storage
#
# <type> <mountpoint> <size> <fs type> <mount options> <misc options>
disk_config disk1 disklabel:msdos

primary		/	4G	ext3	rw,relatime,errors=remount-ro
primary		-	1G	swap	sw
  • Als nächstes muss man von einem Referenz-Client (auch eine Live-CD genügt) mit entsprechend gewünschter Ubuntu Version booten und aus dem /etc/apt Verzeichnis folgende Dateien kopieren:
* secring.gpg
* sources.list
* trustdb.gpg
* trusted.gpg
  • Die kopierten Dateien müssen dann auf den Server in den Ordner /srv/fai/config/files/etc/apt kopiert werden. Danach sollen die Dateien umbenannt werden. In meinem Fall:
* /srv/fai/config/files/etc/apt/secring.gpg/OS_UBUNTU_904_X32
* /srv/fai/config/files/etc/apt/sources.list/OS_UBUNTU_904_X32
* /srv/fai/config/files/etc/apt/trustdb.gpg/OS_UBUNTU_904_X32
* /srv/fai/config/files/etc/apt/trusted.gpg/OS_UBUNTU_904_X32
  • Danach das Verzeichnis /srv/fai/config/files/etc/default/console-setup erstellen und darin die Datei LANG_GERMAN mit folgendem Inhalt anlegen:
# A configuration file for setupcon

# Change to "yes" and setupcon will explain what is being doing
VERBOSE_OUTPUT=no

# Setup these consoles.  Most people do not need to change this.
ACTIVE_CONSOLES="/dev/tty[1-6]"

# Put here your encoding.  Valid charmaps are: UTF-8 ARMSCII-8 CP1251
# CP1255 CP1256 GEORGIAN-ACADEMY GEORGIAN-PS IBM1133 ISIRI-3342
# ISO-8859-1 ISO-8859-2 ISO-8859-3 ISO-8859-4 ISO-8859-5 ISO-8859-6
# ISO-8859-7 ISO-8859-8 ISO-8859-9 ISO-8859-10 ISO-8859-11 ISO-8859-13
# ISO-8859-14 ISO-8859-15 ISO-8859-16 KOI8-R KOI8-U TIS-620 VISCII
CHARMAP="UTF-8"

# The codeset determines which symbols are supported by the font.
# Valid codesets are: Arabic Armenian CyrAsia CyrKoi CyrSlav Ethiopian
# Georgian Greek Hebrew Lao Lat15 Lat2 Lat38 Lat7 Thai Uni1 Uni2 Uni3
# Vietnamese.  Read README.fonts for explanation.
CODESET="Lat15"

# Valid font faces are: VGA (sizes 8, 14 and 16), Terminus (sizes
# 12x6, 14, 16, 20x10, 24x12, 28x14 and 32x16), TerminusBold (sizes
# 14, 16, 20x10, 24x12, 28x14 and 32x16), TerminusBoldVGA (sizes 14
# and 16), Fixed (sizes 13, 14, 15, 16 and 18), Goha (sizes 12, 14 and
# 16), GohaClassic (sizes 12, 14 and 16).
FONTFACE="VGA"
FONTSIZE="16"

# You can also directly specify nonstandard font and ACM to load:
# FONT=/usr/local/share/funnyfonts/sarge16.psf
# ACM=/usr/local/share/consoletrans/my_special_encoding.acm

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT=""
XKBOPTIONS=""


# Do not update the following md5 sum if you change
# /etc/console-setup/boottime.kmap.gz and Debconf will not overwrite
# your custom keymap.  Do not update it even if you want to make
# Debconf overwrite it.  Instead simply specify the empty string as
# a md5 sum.

BOOTTIME_KMAP_MD5=""
  • In dem Verzeichnis /srv/fai/config/files/etc/default/locale die Datei LANG_GERMAN mit folgendem Inhalt erstellen:
LANG="de_DE.UTF-8"
  • In /srv/fai/config/hooks die Datei updatebase.OS_UBUNTU_904_X32 mit folgendem Inhalt erstellen:
#! /bin/bash
# Import custom apt sources.list and apt keys.

echo "Preparing apt"
fcopy -v /etc/apt/secring.gpg
fcopy -v /etc/apt/sources.list
fcopy -v /etc/apt/trustdb.gpg
fcopy -v /etc/apt/trusted.gpg

# Initialize apt-key before apt is called the first time
if [ -x $target/usr/bin/apt-key ]; then
  echo "Apt: list of keys"
  $ROOTCMD /usr/bin/apt-key list
fi

# Copy the console-setup file early to avoid unnecessary
# error messages
fcopy -v /etc/default/console-setup
  • In die Datei /srv/fai/config/package_config/BC_BASE folgenden Inhalt kopieren:
PACKAGES aptitude
apt
apt-utils
cfengine2
console-setup
debconf-utils
dhcp3-client
fai-client
grub
language-pack-de
less
locales
openssh-server
vi
  • In /srv/fai/config/package_config/LANG_GERMAN:
PACKAGES aptitude
language-pack-de
  • In /srv/fai/config/package_config/OS_UBUNTU_904_X32:
PACKAGES aptitude
linux-image-generic
  • In /srv/fai/config/scripts/BC_BASE Verzeichnis die Datei 10-misc erstellen und folgenden Inhalt editieren:
#! /bin/bash

# (c) Thomas Lange, 2001-2008, lange@debian.org

error=0 ; trap "error=$((error|1))" ERR

# a list of modules which are loaded at boot time
fcopy -i /etc/modules
for module in $MODULESLIST; do
    ainsl -a $target/etc/modules "^$module$"
done

fcopy /etc/hostname || echo $HOSTNAME     > $target/etc/hostname
echo $TIMEZONE    > $target/etc/timezone
ln -fs /usr/share/zoneinfo/${TIMEZONE} $target/etc/localtime

fcopy -iM /etc/hosts /etc/motd

# set root password
echo "root:$ROOTPW" | $ROOTCMD chpasswd --encrypted
# make /root accessible only by root
chmod 0700 $target/root
chown root:root $target/root
# copy default dotfiles for root account
fcopy -ir /root

exit $error
  • In /srv/fai/config/scripts/BC_BASE/20-fcopy folgenden Inhalt:
#! /bin/bash

# Copy files from $FAI/files
fcopy -v /etc/network/interfaces
fcopy -v /etc/ssh_known_hosts
fcopy -v /etc/default/locale
  • In die Datei /srv/fai/config/scripts/GRUB/10-setup folgeden Inhalt einfügen (müsste aber bereits von FAI eingetragen sein):
#! /bin/bash

error=0 ; trap "error=$((error|1))" ERR

# Eventual source the disk_var.sh just in case 
# the BOOT_DEVICE/BOOT_PARTITION/ROOT_PARTITION 
# variables are overwritten
[ -r /tmp/fai/disk_var.sh ] && . /tmp/fai/disk_var.sh

ifclass NOMBR && BOOT_DEVICE=$BOOT_PARTITION

[ -z "$BOOT_DEVICE" ]    && exit 701
[ -z "$BOOT_PARTITION" ] && exit 702

# call grub-install from ubuntu
$target/usr/sbin/grub-install --no-floppy --root-directory=/$target $BOOT_DEVICE

# call update-grub inside ubuntu chroot with special "no user questions" flag
$ROOTCMD /usr/sbin/update-grub -y

exit $error
  • In /srv/fai/config/scripts/GRUB/20-initramfs (müsste schon von FAI eingetragen worden sein):
#! /bin/bash

error=0 ; trap "error=$((error|1))" ERR

not_up2date() {
  if [ $# -eq 0 ] ; then
    echo "No package name given!"
    return 127
  fi

  egrep -q "(^Unpacking $1 |^Unpacking replacement $1 )" $LOGDIR/*.log
  return $?
}

if [ `not_up2date lvm2` -o `not_up2date mdadm` ] ; then
  $ROOTCMD update-initramfs -k all -u
fi


exit $error
  • In die Datei /srv/fai/config/scripts/LAST/50-misc folgendes eintragen (auch dies müsste schon von FAI eingetragen worden sein):
#! /bin/bash

# copyright Thomas Lange 2001-2007, lange@debian.org

error=0 ; trap "error=$((error|1))" ERR

# remove backup files from cfengine
dirs="root etc var"
for path in $dirs; do
    find $target/$path -maxdepth 20 -name \*.cfedited -o -name \*.cfsaved | xargs -r rm
done

[ "$FAI_DEBMIRROR" ] && 
echo "#$FAI_DEBMIRROR $MNTPOINT nfs ro 0 0" >> $target/etc/fstab

# set bios clock
if [ $do_init_tasks -eq 1 ] ; then
    case "$UTC" in
       no|"") hwopt="--localtime" ;;
       yes)   hwopt="--utc"       ;;
    esac
    $ROOTCMD hwclock $hwopt --systohc || true
fi

# Make sure everything is configured properly
echo "Running \"apt-get -f install\" for the last time."
$ROOTCMD apt-get -f install

lskernels=$(echo $target/boot/vmlinu*)
[ -f ${lskernels%% *} ] || echo "ERROR: No kernel was installed. Have a look at shell.log"

exit $error
  • Danach müssen für alle Scripte noch die Rechte vergeben werden:
chmod -R 755 /srv/fai/config

Referenz Client Installation und Konfiguration

  • Als nächstes muss ein Referenz-Client installiert werden, der genau auf den Stand gebracht werden muss, wie die zukünftigen Clients aussehen sollen, die über FAI installiert werden sollen. In meinem Fall installiere ich ein Ubuntu 12.04
  • Danach muss das installierte System aktualisiert werden:
apt-get install update 
apt-get install upgrade

Erstellen eines benutzerdefinierten base.tgz auf dem Client

  • Damit man dieses erstellen kann, müssen noch die Programme pbuilder und debootstrap nachinstalliert werden:
apt-get install pbuilder
apt-get install debootstrap
  • Danach müssen die Pakete noch dem entsprechen verändert werden. In /etc/pbuilder/pbuilderrc:
MIRRORSITE=http://de.archive.ubuntu.com/ubuntu/ 
DISTRIBUTION=precise
  • Dann muss im Verzeichnis /etc/pbuilder der Ordner apt.config erstellt werden und alle Unterordner und Dateien aus dem /etc/apt in diesen neu erstellten Ordner kopiert werden:
mkdir /etc/pbuilder/apt.config/
cp -ar /etc/apt/* /etc/pbuilder/apt.config/
  • Jetzt muss die Datei /etc/pbuilder/apt.config/apt.conf.d/allow-unauthenticated mit folgendem Inhalt erstellt werden:
APT::Get::AllowUnauthenticated 1;
  • Mit pbuilder kann nun die base.tgz erstellt werden (dies kann ein paar Minuten dauern):
pbuilder create
  • Jetzt muss das erstellte image, das auf dem Client in /var/cache/pbuilder/base.tgz erstellt wurde auf den Server in /srv/fai/config/basefiles/OS_UBUNTU_904_X32.tar.gz kopiert werden
cp /var/cache/pbuilder/base.tgz tk@10.2.1.50:/srv/fai/config/basefiles/OS_UBUNTU_904_X32.tar.gz
  • Danach muss man sich mit fai-chboot nur noch eine Datei für den TFTP erstellen lassen, mit der man später vom TFTP Server in die eigentliche Installation bootet:
fai-chboot -IB 10.2.1.49(IP des Clients)

Installation über FAI

  • Jetzt nur noch im BIOS des Clients den man installieren möchte, PXE boot aktivieren und vom Netzwerk booten.
  • Dann startet die FAI!!

Das könnte Sie auch interessieren

Locales unter Ubuntu konfigurieren
SMS Server Tools Installation unter Ubuntu
VMware Horizon View Thin Client Installation mit Ubuntu 16.04