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: ( 5.0 )

dhcp3-server syslinux-common tftpd apache2

zum testen

Zum Testen ist qemu sehr hilfreich

PXE

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

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 5.3

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

/tftpboot/pxelinux.cfg/default :

SERIAL 0 115200
PROMPT 1
TIMEOUT 200

DEFAULT centos

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

Kernel und Initrd in qemu starten

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

Debian 5.0

ln -s /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/
cd /var/lib/tftpboot/
mkdir debian50
cd debian50
wget -O - http://ftp.de.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/netboot.tar.gz | tar xz --strip-components 3 ./debian-installer/i386/linux ./debian-installer/i386/initrd.gz

oder

  wget http://ftp.de.debian.org/debian/dists/etch/main/installer-i386/current/images/netboot/debian-installer/i386/{linux,initrd.gz}

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

SERIAL 0 115200
PROMPT 1
TIMEOUT 200

DEFAULT debian

LABEL debian
  KERNEL debian50/linux
  APPEND initrd=debian50/initrd.gz vga=normal -- DEBCONF_DEBUG=5 preseed/url=http://notebook21/mirror50.cfg
testen

Kernel und Initrd in qemu starten

qemu -kernel debian50/linux -initrd debian50/initrd.gz -append "console=ttyS0" -boot c -snapshot -nographic debian50/initrd.gz

qemu über simuliertes Netz starten: 1)

aptitude install kvm 

2)

ln -s ../kvm/pxe-ne2k_pci.bin /usr/share/qemu/pxe-ne2k_pci.bin
qemu -boot n -tftp /var/lib/tftpboot/ -bootp /pxelinux.0 /dev/zero

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
/etc/init.d/xinetd restart

DHCP

Grundkonfiguration

PXE Einstellungen

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

/etc/dhcp3/dhcpd.conf : ( debian 5.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;
}
/etc/init.d/dhcpd 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

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)
erfordert X, z.B. via ssh -X
2)
ist dummerweise nötig, da das debian qemu Paket die Datei nicht enthält
admin_grundlagen/pxe-bootserver.1316786075.txt.gz · Zuletzt geändert: 2011/09/23 13:54 von ingo_wichmann