Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
admin_grundlagen:pxe-bootserver [2013/08/28 16:09] 127.0.0.1 Externe Bearbeitung |
admin_grundlagen:pxe-bootserver [2017/02/16 15:00] (aktuell) stefan_miethke [Testen] |
||
---|---|---|---|
Zeile 4: | Zeile 4: | ||
CentOS: ( 5.3 ) | CentOS: ( 5.3 ) | ||
dhcp tftp-server syslinux httpd | dhcp tftp-server syslinux httpd | ||
- | Debian: ( 5.0 ) | + | Debian: ( 7.0 ) |
- | dhcp3-server syslinux-common tftpd xinetd apache2 | + | isc-dhcp-server pxelinux tftpd xinetd apache2 |
=== zum testen === | === zum testen === | ||
Zum Testen ist ''qemu'' sehr hilfreich | Zum Testen ist ''qemu'' sehr hilfreich | ||
===== PXE ===== | ===== PXE ===== | ||
+ | |||
+ | 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 === | === openSuSE === | ||
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ | cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ | ||
Zeile 15: | Zeile 18: | ||
cd /srv/tftpboot/opensuse114 | cd /srv/tftpboot/opensuse114 | ||
wget http://download.opensuse.org/distribution/11.4/repo/oss/boot/i386/loader/{linux,initrd,isolinux.cfg} | wget http://download.opensuse.org/distribution/11.4/repo/oss/boot/i386/loader/{linux,initrd,isolinux.cfg} | ||
- | |||
''/var/lib/tftpboot/pxelinux.cfg/default'' : | ''/var/lib/tftpboot/pxelinux.cfg/default'' : | ||
<file> | <file> | ||
Zeile 61: | Zeile 63: | ||
== testen == | == testen == | ||
Kernel und Initrd in qemu starten | 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 | + | qemu -kernel centos64/vmlinuz -initrd centos64/initrd.img -append "vga=normal console=ttyS0" -boot c -snapshot -nographic centos5/initrd.img |
- | === Debian 6.0 === | + | === 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'' : | ||
+ | <file> | ||
+ | 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 | ||
+ | </file> | ||
+ | |||
+ | == 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/ | mkdir /var/lib/tftpboot/ | ||
- | ln -s /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/ | + | ln -s /usr/lib/PXELINUX/pxelinux.0 /var/lib/tftpboot/ |
cd /var/lib/tftpboot/ | cd /var/lib/tftpboot/ | ||
- | mkdir debian60 | + | mkdir debian80 |
- | cd debian60 | + | cd debian80 |
- | wget -O - http://ftp.de.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/netboot.tar.gz | tar xz --strip-components 3 ./debian-installer/i386/linux ./debian-installer/i386/initrd.gz | + | wget http://ftp.de.debian.org/debian/dists/jessie/main/installer-amd64/current/images/netboot/debian-installer/amd64/{linux,initrd.gz} |
- | oder | + | (( |
- | wget http://ftp.de.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/{linux,initrd.gz} | + | 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 [[https://wiki.debian.org/DebianInstaller/NetbootFirmware#Examples_for_Debian_7_.22Wheezy.22|Debian Wiki]] |
+ | )) | ||
mkdir /var/lib/tftpboot/pxelinux.cfg | mkdir /var/lib/tftpboot/pxelinux.cfg | ||
Zeile 88: | Zeile 122: | ||
LABEL debian | LABEL debian | ||
- | KERNEL debian60/linux | + | KERNEL debian80/linux |
- | APPEND initrd=debian60/initrd.gz vga=normal -- DEBCONF_DEBUG=5 preseed/url=http://192.168.1.221/mirror60.cfg | + | APPEND initrd=debian80/initrd.gz vga=normal -- DEBCONF_DEBUG=5 preseed/url=http://192.168.1.221/mirror80.cfg |
</file> | </file> | ||
Zeile 96: | Zeile 130: | ||
cd /var/lib/tftpboot/ | cd /var/lib/tftpboot/ | ||
- | qemu -kernel debian60/linux -initrd debian60/initrd.gz -append "console=ttyS0" -boot c -snapshot -nographic debian60/initrd.gz | + | qemu-system-x86_64 -kernel debian80/linux -initrd debian80/initrd.gz -append "console=ttyS0" -boot c -snapshot -nographic debian80/initrd.gz |
+ | unter Debian 8 musste ich zusätzlich die folgenden Dateien ins tftp Verzeichnis kopieren: | ||
+ | cp /usr/lib/syslinux/modules/*/ldlinux.* . | ||
qemu über simuliertes Netz starten: (( erfordert X, z.B. via ''ssh -X'' )) | qemu über simuliertes Netz starten: (( erfordert X, z.B. via ''ssh -X'' )) | ||
- | qemu -boot n -tftp /var/lib/tftpboot/ -bootp /pxelinux.0 /dev/zero | + | qemu-system-x86_64 -boot n -tftp /var/lib/tftpboot/ -bootp /pxelinux.0 /dev/zero |
==== Bootlogo ==== | ==== Bootlogo ==== | ||
Zeile 119: | Zeile 155: | ||
* 0 ist die Vordergrund-Farbe, 7 die Hintergrundfarbe des //Textes// (!) | * 0 ist die Vordergrund-Farbe, 7 die Hintergrundfarbe des //Textes// (!) | ||
- | |||
===== TFTP ===== | ===== TFTP ===== | ||
+ | TODO: durch systemd ersetzen | ||
+ | |||
''/etc/xinetd.d/tftp'' : | ''/etc/xinetd.d/tftp'' : | ||
<file> | <file> | ||
Zeile 138: | Zeile 175: | ||
chkconfig tftp on | chkconfig tftp on | ||
+ | alle Distros: | ||
service xinetd restart | service xinetd restart | ||
Zeile 164: | Zeile 202: | ||
service dhcpd restart | service dhcpd restart | ||
- | debian 6.0: | + | debian (ab 6.0): |
service isc-dhcp-server restart | service isc-dhcp-server restart | ||
==== Testen ==== | ==== Testen ==== | ||
Prüfen der Konfiguration: | Prüfen der Konfiguration: | ||
- | dhcpd3 -t | + | dhcpd -t |
Nun sollte ein pxe-fähiger Rechner booten können. | Nun sollte ein pxe-fähiger Rechner booten können. | ||
Zeile 200: | Zeile 238: | ||
* http://www.centos.org/docs/5/html/5.2/Installation_Guide/ch-kickstart2.html | * http://www.centos.org/docs/5/html/5.2/Installation_Guide/ch-kickstart2.html | ||
* http://wiki.debian.org/DebianInstaller/Preseed | * http://wiki.debian.org/DebianInstaller/Preseed | ||
+ |