Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:pxe-bootserver

Dies ist eine alte Version des Dokuments!


Pakete

openSuSE: ( 11.4 )

dhcp-server tftp syslinux apache2 apache2-prefork

CentOS: ( 5.3 )

dhcp tftp-server syslinux httpd

Debian: ( 7.0 )

isc-dhcp-server pxelinux tftpd xinetd apache2

zum testen

Zum Testen ist qemu sehr hilfreich

PXE

TODO: unter Debian 8 musste ich zusätzlich die folgenden Dateien ins tftp Verzeichnis kopieren:

cp /usr/lib/syslinux/modules/*/ldlinux.* .

TODO: offenbar kann man statt tftp inzwischen auch http verwenden. siehe: http://etherboot.org/wiki/httpboot und http://www.syslinux.org/wiki/index.php?title=PXELINUX#HTTP_and_FTP

openSuSE

cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
mkdir /srv/tftpboot/opensuse114
cd /srv/tftpboot/opensuse114
wget http://download.opensuse.org/distribution/11.4/repo/oss/boot/i386/loader/{linux,initrd,isolinux.cfg}

/var/lib/tftpboot/pxelinux.cfg/default :

SERIAL 0 115200
PROMPT 1
TIMEOUT 200

DEFAULT opensuse

#Superpraktisch zum testen neuer Eintraege im Bootmenu:
LABEL pxelinux
  KERNEL pxelinux.0

LABEL opensuse
  KERNEL opensuse114/linux
  APPEND initrd=opensuse114/initrd showopts ip=bootp install=http://download.opensuse.org/distribution/11.4/repo/oss vga=0x317 lang=de autoyast=http://notebook21/suse/autoyast.xml

CentOS 6.4

cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
mkdir -p /var/lib/tftpboot/{centos64,pxelinux.cfg}
cd /var/lib/tftpboot/centos64
wget http://centos/6/os/i386/isolinux/{vmlinuz,initrd.img,isolinux.cfg}
cd /var/lib/tftpboot
cp -a isolinux.cfg ../pxelinux.cfg/default

/var/lib/tftpboot/pxelinux.cfg/default :

SERIAL 0 115200
PROMPT 1
TIMEOUT 200

DEFAULT centos

#Superpraktisch zum testen neuer Eintraege im Bootmenu:
LABEL pxelinux
  KERNEL pxelinux.0

LABEL centos
  KERNEL /centos64/vmlinuz
  APPEND initrd=/centos64/initrd.img ramdisk_size=9216 resolution=1024x768 ksdevice=eth0 ks=http://notebook21/mirror6.ks
testen

Kernel und Initrd in qemu starten

qemu -kernel centos64/vmlinuz -initrd centos64/initrd.img -append "vga=normal console=ttyS0" -boot c -snapshot -nographic centos5/initrd.img

CentOS 7.0

noch nicht getestet

cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
mkdir -p /var/lib/tftpboot/{centos7,pxelinux.cfg}
cd /var/lib/tftpboot/centos7
wget http://centos/7/os/x86_64/isolinux/{vmlinuz,initrd.img,isolinux.cfg}
cd /var/lib/tftpboot
cp -a isolinux.cfg ../pxelinux.cfg/default

/var/lib/tftpboot/pxelinux.cfg/default :

SERIAL 0 115200
PROMPT 1
TIMEOUT 200

DEFAULT centos

#Superpraktisch zum testen neuer Eintraege im Bootmenu:
LABEL pxelinux
  KERNEL pxelinux.0

LABEL centos
  KERNEL /centos64/vmlinuz
  APPEND initrd=/centos64/initrd.img repo=http://centos/7/os/x86_64
testen

Kernel und Initrd in qemu starten

qemu -kernel centos7/vmlinuz -initrd centos7/initrd.img -append "vga=normal console=ttyS0" -boot c -snapshot -nographic centos7/initrd.img

Debian 8.0

mkdir /var/lib/tftpboot/
ln -s /usr/lib/PXELINUX/pxelinux.0 /var/lib/tftpboot/
cd /var/lib/tftpboot/
mkdir debian80
cd debian80
wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/{linux,initrd.gz}

1)

mkdir /var/lib/tftpboot/pxelinux.cfg

/var/lib/tftpboot/pxelinux.cfg/default :

SERIAL 0 115200
PROMPT 1
TIMEOUT 200

DEFAULT debian

#Superpraktisch zum testen neuer Eintraege im Bootmenu:
LABEL pxelinux
  KERNEL pxelinux.0

LABEL debian
  KERNEL debian80/linux
  APPEND initrd=debian80/initrd.gz vga=normal -- DEBCONF_DEBUG=5 preseed/url=http://192.168.1.221/mirror80.cfg
testen

Kernel und Initrd in qemu starten

cd /var/lib/tftpboot/
qemu -kernel debian60/linux -initrd debian60/initrd.gz -append "console=ttyS0" -boot c -snapshot -nographic debian60/initrd.gz

qemu über simuliertes Netz starten: 2)

qemu -boot n -tftp /var/lib/tftpboot/ -bootp /pxelinux.0 /dev/zero

optional

Pakete

Debian 3.1:

syslinux gimp

Schritte

Orginal-Bild öffnen:

gimp logo_final.svg
  • Bild→Modus→Indexiert: 16 Farben
  • Datei→Speichern unter: logo_linuxhotel.ppm ( raw )
  • Exportiertes Bild öffnen
  • Mit Pipette zwei Farben für Text Vordergrund und Hintergrund raussuchen
ppmtolss16 \#e8e6b6=0 \#28414a=7 < logo_linuxhotel.ppm > logo_linuxhotel.lss16
  • 0 ist die Vordergrund-Farbe, 7 die Hintergrundfarbe des Textes (!)

TFTP

/etc/xinetd.d/tftp :

service tftp
{
        socket_type     = dgram
        protocol        = udp
        wait            = yes
        user            = nobody
        server          = /usr/sbin/in.tftpd
        server_args     = -s /var/lib/tftpboot/
}

SuSE, Centos:

chkconfig tftp on
service xinetd restart

testen

lsof -i :tftp

DHCP

Grundkonfiguration

PXE Einstellungen

/etc/dhcpd.conf : ( CentOS 5.3, openSuSE 11.4 )

/etc/dhcp/dhcpd.conf : ( debian 6.0 )

class "PXEClient:" {
  match if substring (option vendor-class-identifier, 0,10) = "PXEClient:";
  default-lease-time 300; # 5 min
  max-lease-time 600; # 10 min
  filename "pxelinux.0";
  next-server 192.168.1.224;
}

CentOS 5.3, openSuSE 11.4:

service dhcpd restart

debian 6.0:

service isc-dhcp-server restart

Testen

Prüfen der Konfiguration:

dhcpd3 -t

Nun sollte ein pxe-fähiger Rechner booten können.

Apache

SuSE Repository

mkdir /srv/www/htdocs/opensuse/{oss,non-oss,update}
cp -a /media/susedvd/. /srv/www/htdocs/suse/oss

3)

Debian Repository

mkdir /var/www/debian
cp -a /media/debian/. /var/www/debian

4)

Antwortdatei

SuSE / Auto-Yast

Mit

yast2 autoyast

eine Konfigurationdatei erstellen und unter /srv/www/htdocs/suse/autoyast.xml speichern

CentOS 5.3 / Kickstart

Paket: system-config-kickstart

system-config-kickstart
1)
Der Debian-Installer enthält per Default keine Firmware, die nicht Debians strengen Lizenzrichtlinien entspricht. Eine Anleitung, wie man den Installer um nicht-freie Firmware ergänzen kann findet sich im Debian Wiki
2)
erfordert X, z.B. via ssh -X
3)
geht davon aus, dass die SuSE DVD nach /media/susedvd gemountet ist
4)
geht davon aus, dass die Debian DVD nach /media/debian gemountet ist
admin_grundlagen/pxe-bootserver.1487255859.txt.gz · Zuletzt geändert: 2017/02/16 14:37 von stefan_miethke