====== PXE Netboot & Installserver ======
PXE steht für Preboot Execution Environment. ''dhcpd3'' und ''tftpd-hpa'' befinden sich auf der gleichen "Maschine". Hab keinen Bock großartig zu kommentieren. Alles sollte funktionieren. Wen es interessiert warum ich hier was und wie mache kann ja [[http://www.google.de | Google]] um Hilfe bitten ;-) Wer tftp aus Sicherheitsgründen lieber getrennt vom dhcp laufen lassen will muss die IP des next-servers in /etc/dhcp3/dhcpd.conf entsprechend anpassen.
Der "Task" sollte mit Rootrechten durchgeführt werden! IP Adressen ggf. anpassen. Wo es nötig ist sollten man selbst erkennen können.
===== Netzwerk konfigurieren =====
nano /etc/network/interfaces
# 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
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.207
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254
dns-search jackson
===== Nötige Pakete installieren =====
aptitude install netkit-inetd tftpd-hpa dhcp3-server lftp
===== DHCPD3 konfigurieren =====
nano /etc/dhcp3/dhcpd.conf
#
# Sample configuration file for ISC dhcpd for Debian
#
# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
#
# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;
# option definitions common to all supported networks...
option domain-name-servers 192.168.1.254;
option routers 192.168.1.254;
next-server 192.168.1.207;
filename "pxelinux.0";
use-host-decl-names on;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.30 192.168.1.35;
default-lease-time 3600;
max-lease-time 7200;
}
/etc/init.d/dhcp3-server restart
===== tftpd-hpa konfigurieren =====
nano /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
/etc/init.d/tftpd-hpa restart
===== TFTP Ordner anlegen =====
cd /tmp
wget http://repository.nixfuerotto.de/tftpboot.tar.gz
tar xzvf tftpboot.tar.gz
cp -R tftpboot/ /var/lib/
rm -r tftpboot/
Dem Archiv fehlen alle M$ und noch die Knoppix Dateien - die nötigen Syslinux Dateien sind schon drinnen sowie die div. Linux Netinstaller. Sollte man auch ein BartPE ISO per PXE booten wollen Die M$ Dateien muss man sich dieses selbst erstellen [[BartPEPXE|BartPE für PXE]]. Knoppix wird als nächstes hinzugefügt.
**/var/lib/tftpboot/pxelinux.cfg/default**
DEFAULT menu
TIMEOUT 600
MENU TITLE Boot Menu
LABEL menu
MENU HIDE
KERNEL pxelinux.msc/menu.c32
LABEL Festplattenboot (Linux/Windows)
localboot 0
#LABEL Knoppix V5.1.1 04.01.2007 DE
#KERNEL netboot/knoppix/vmlinuz
#APPEND nfsdir=192.168.1.207:/srv/nfs/Knoppix nodhcp lang=de ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=791 xmodule=fbdev initrd=netboot/knoppix/miniroot.gz BOOT_IMAGE=knoppix
LABEL FreeDOS
KERNEL pxelinux.msc/memdisk
APPEND initrd=netboot/misc/freedos.img
#LABEL BartPE
#KERNEL netboot/bartpe/startrom.0
LABEL Memtest-86 v3.2
KERNEL netboot/misc/memtest86v32
LABEL 1. Festplatten-Partition booten
KERNEL pxelinux.msc/chain.c32
APPEND hd0 1
LABEL 2. Festplatten-Partition booten
KERNEL pxelinux.msc/chain.c32
APPEND hd0 2
LABEL 3. Festplatten-Partition booten
KERNEL pxelinux.msc/chain.c32
APPEND hd0 3
LABEL 4. Festplatten-Partition booten
KERNEL pxelinux.msc/chain.c32
APPEND hd0 4
LABEL Ubuntu Edgy i386
KERNEL netinstall/ubuntu/edgy/i386/linux
APPEND vga=normal initrd=netinstall/ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw --
LABEL Ubuntu Edgy i386 Server
KERNEL netinstall/ubuntu/edgy/i386/linux
APPEND base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=netinstall/ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw --
LABEL Ubuntu Edgy i386 Expert
KERNEL netinstall/ubuntu/edgy/i386/linux
APPEND priority=low vga=normal initrd=netinstall/ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw --
LABEL Ubuntu Edgy i386 Server-Expert
KERNEL netinstall/ubuntu/edgy/i386/linux
APPEND base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false priority=low vga=normal initrd=netinstall/ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw --
LABEL Ubuntu Edgy i386 Rescue
KERNEL netinstall/ubuntu/edgy/i386/linux
APPEND vga=normal initrd=netinstall/ubuntu/edgy/i386/initrd.gz ramdisk_size=16417 root=/dev/ram rw rescue/enable=true --
LABEL Ubuntu Dapper i386 Install
KERNEL netinstall/ubuntu/dapper/i386/linux
APPEND vga=normal initrd=netinstall/ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw --
LABEL Ubuntu Dapper i386 Linux
KERNEL netinstall/ubuntu/dapper/i386/linux
APPEND vga=normal initrd=netinstall/ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw --
LABEL Ubuntu Dapper i386 Server
KERNEL netinstall/ubuntu/dapper/i386/linux
APPEND base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=netinstall/ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw --
LABEL Ubuntu Dapper i386 Expert
KERNEL netinstall/ubuntu/dapper/i386/linux
APPEND DEBCONF_PRIORITY=low vga=normal initrd=netinstall/ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw --
LABEL Ubuntu Dapper i386 Server-Expert
KERNEL netinstall/ubuntu/dapper/i386/linux
APPEND base-installer/kernel/linux/extra-packages-2.6= pkgsel/install-pattern=~t^ubuntu-standard$ pkgsel/language-pack-patterns= pkgsel/install-language-support=false DEBCONF_PRIORITY=low vga=normal initrd=netinstall/ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw --
LABEL Ubuntu Dapper i386 Rescue
KERNEL netinstall/ubuntu/dapper/i386/linux
APPEND vga=normal initrd=netinstall/ubuntu/dapper/i386/initrd.gz ramdisk_size=14332 root=/dev/rd/0 rw rescue/enable=true --
LABEL Debian Sarge i386 Linux
KERNEL netinstall/debian/sarge/i386/linux
APPEND vga=normal initrd=netinstall/debian/sarge/i386/initrd.gz ramdisk_size=9458 root=/dev/rd/0 devfs=mount,dall rw --
LABEL Sarge i386 Expert
KERNEL netinstall/debian/sarge/i386/linux
APPEND DEBCONF_PRIORITY=low vga=normal initrd=netinstall/debian/sarge/i386/initrd.gz ramdisk_size=9458 root=/dev/rd/0 devfs=mount,dall rw --
LABEL Debian Sarge i386 Linux26
KERNEL netinstall/debian/sarge/i386/2.6/linux
APPEND vga=normal initrd=netinstall/debian/sarge/i386/2.6/initrd.gz ramdisk_size=10938 root=/dev/rd/0 devfs=mount,dall rw --
LABEL Debian Sarge i386 Expert26
KERNEL netinstall/debian/sarge/i386/2.6/linux
APPEND DEBCONF_PRIORITY=low vga=normal initrd=netinstall/debian/sarge/i386/2.6/initrd.gz ramdisk_size=10938 root=/dev/rd/0 devfs=mount,dall rw --
LABEL Debian Etch i386 Install
KERNEL netinstall/debian/etch/i386/linux
APPEND vga=normal initrd=netinstall/debian/etch/i386/initrd.gz --
LABEL Debian Etch i386
KERNEL netinstall/debian/etch/i386/linux
APPEND vga=normal initrd=netinstall/debian/etch/i386/initrd.gz --
LABEL Debian Etch i386 Expert
KERNEL netinstall/debian/etch/i386/linux
APPEND priority=low vga=normal initrd=netinstall/debian/etch/i386/initrd.gz --
LABEL Debian Etch i386 Rescue
KERNEL netinstall/debian/etch/i386/linux
APPEND vga=normal initrd=netinstall/debian/etch/i386/initrd.gz rescue/enable=true --
LABEL Debian Etch i386 Auto
KERNEL netinstall/debian/etch/i386/linux
APPEND auto=true priority=critical vga=normal initrd=netinstall/debian/etch/i386/initrd.gz --
LABEL Fedora 6 i386
KERNEL netinstall/fedora/6/i386/vmlinuz
APPEND initrd=netinstall/fedora/6/i386/initrd.img
LABEL Centos 4.4 i386
KERNEL netinstall/centos/4.4/i386/vmlinuz
APPEND initrd=netinstall/centos/4.4/i386/initrd.img
LABEL Mandriva 2007.0 i386
KERNEL netinstall/mandriva/2007.0/i386/vmlinuz
APPEND initrd=netinstall/mandriva/2007.0/i386/all.rdz
LABEL Suse 10.2 i386
KERNEL netinstall/suse/10.2/i386/linux
APPEND initrd=netinstall/suse/10.2/i386/initrd splash=silent showopts
===== Knoppix =====
Knoppix downloaden.
cd /tmp
wget ftp://ftp.uni-kl.de/pub/linux/knoppix/KNOPPIX_V5.1.1CD-2007-01-04-DE.iso
mkdir /mnt/knoppix
mount -o loop KNOPPIX_V5.1.1CD-2007-01-04-DE.iso /mnt/knoppix
cp -av /mnt/knoppix/ /var/lib/tftpboot/netboot/knoppix/
mv /var/lib/tftpboot/netboot/knoppix/knoppix/ /var/lib/tftpboot/netboot/knoppix/Knoppix
umount /mnt/knoppix
rm -r /mnt/knoppix
rm /tmp/KNOPPIX_V5.1.1CD-2007-01-04-DE.iso
Die Auskommentierung des Knoppix eintrages in /var/lib/tftpboot/pxelinux.cfg/default entfernen!
===== NFS Server installieren =====
aptitude install nfs-kernel-server
echo "/var/lib/tftpboot/netboot/knoppix/Knoppix 192.168.1.0/16(async,ro)" >> /etc/exports
/etc/init.d/nfs-kernel-server restart
===== BartPE für PXE =====
[[bartpepxe|BartPE für PXE]]
===== Externe Links =====
http://www.howtoforge.com/ubuntu_pxe_install_server
{{sitass07-pxe-pool.pdf}}
http://www.debian.org/distrib/packages#search_packages