Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Nächste Überarbeitung | Vorherige Überarbeitung | ||
|
fortgeschrittene:pxe-bootserver [2011/09/23 13:54] 127.0.0.1 Externe Bearbeitung |
fortgeschrittene:pxe-bootserver [2017/02/16 15:00] (aktuell) |
||
|---|---|---|---|
| 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 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 23: | Zeile 25: | ||
| DEFAULT opensuse | DEFAULT opensuse | ||
| + | |||
| + | #Superpraktisch zum testen neuer Eintraege im Bootmenu: | ||
| + | LABEL pxelinux | ||
| + | KERNEL pxelinux.0 | ||
| LABEL opensuse | LABEL opensuse | ||
| Zeile 29: | Zeile 35: | ||
| </file> | </file> | ||
| - | === CentOS 5.3 === | + | === CentOS 6.4 === |
| - | cp /usr/share/syslinux/pxelinux.0 /tftpboot/ | + | cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ |
| - | mkdir /tftpboot/centos53 | + | mkdir -p /var/lib/tftpboot/{centos64,pxelinux.cfg} |
| - | cd /tftpboot/centos53 | + | cd /var/lib/tftpboot/centos64 |
| - | wget http://centos/5/os/i386/isolinux/{vmlinuz,initrd.img,isolinux.cfg} | + | wget http://centos/6/os/i386/isolinux/{vmlinuz,initrd.img,isolinux.cfg} |
| - | cd /tftpboot | + | cd /var/lib/tftpboot |
| - | cp -a centos53/isolinux.cfg pxelinux.cfg/default | + | cp -a isolinux.cfg ../pxelinux.cfg/default |
| | | ||
| - | ''/tftpboot/pxelinux.cfg/default'' : | + | ''/var/lib/tftpboot/pxelinux.cfg/default'' : |
| <file> | <file> | ||
| SERIAL 0 115200 | SERIAL 0 115200 | ||
| Zeile 45: | Zeile 51: | ||
| DEFAULT centos | DEFAULT centos | ||
| + | |||
| + | #Superpraktisch zum testen neuer Eintraege im Bootmenu: | ||
| + | LABEL pxelinux | ||
| + | KERNEL pxelinux.0 | ||
| LABEL centos | LABEL centos | ||
| - | KERNEL centos53/vmlinuz | + | KERNEL /centos64/vmlinuz |
| - | APPEND initrd=centos53/initrd.img ramdisk_size=9216 resolution=1024x768 ksdevice=eth0 ks=http://notebook21/mirror5.ks | + | APPEND initrd=/centos64/initrd.img ramdisk_size=9216 resolution=1024x768 ksdevice=eth0 ks=http://notebook21/mirror6.ks |
| </file> | </file> | ||
| == 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 5.0 === | + | === CentOS 7.0 === |
| - | ln -s /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/ | + | //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/ | ||
| + | ln -s /usr/lib/PXELINUX/pxelinux.0 /var/lib/tftpboot/ | ||
| cd /var/lib/tftpboot/ | cd /var/lib/tftpboot/ | ||
| - | mkdir debian50 | + | mkdir debian80 |
| - | cd debian50 | + | cd debian80 |
| - | 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 | + | 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/etch/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 | ||
| ''/var/lib/tftpboot/pxelinux.cfg/default'' : | ''/var/lib/tftpboot/pxelinux.cfg/default'' : | ||
| <file> | <file> | ||
| Zeile 72: | Zeile 116: | ||
| DEFAULT debian | DEFAULT debian | ||
| + | |||
| + | #Superpraktisch zum testen neuer Eintraege im Bootmenu: | ||
| + | LABEL pxelinux | ||
| + | KERNEL pxelinux.0 | ||
| LABEL debian | LABEL debian | ||
| - | KERNEL debian50/linux | + | KERNEL debian80/linux |
| - | APPEND initrd=debian50/initrd.gz vga=normal -- DEBCONF_DEBUG=5 preseed/url=http://notebook21/mirror50.cfg | + | APPEND initrd=debian80/initrd.gz vga=normal -- DEBCONF_DEBUG=5 preseed/url=http://192.168.1.221/mirror80.cfg |
| </file> | </file> | ||
| Zeile 81: | Zeile 129: | ||
| Kernel und Initrd in qemu starten | Kernel und Initrd in qemu starten | ||
| - | qemu -kernel debian50/linux -initrd debian50/initrd.gz -append "console=ttyS0" -boot c -snapshot -nographic debian50/initrd.gz | + | cd /var/lib/tftpboot/ |
| + | 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'' )) | ||
| - | aptitude install kvm | + | qemu-system-x86_64 -boot n -tftp /var/lib/tftpboot/ -bootp /pxelinux.0 /dev/zero |
| - | (( ist dummerweise nötig, da das debian qemu Paket die Datei nicht enthält )) | + | |
| - | 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 | + | |
| ==== Bootlogo ==== | ==== Bootlogo ==== | ||
| + | //optional// | ||
| === Pakete === | === Pakete === | ||
| Debian 3.1: | Debian 3.1: | ||
| Zeile 106: | 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 125: | Zeile 175: | ||
| chkconfig tftp on | chkconfig tftp on | ||
| - | /etc/init.d/xinetd restart | + | alle Distros: |
| + | service xinetd restart | ||
| + | |||
| + | === testen === | ||
| + | lsof -i :tftp | ||
| ===== DHCP ===== | ===== DHCP ===== | ||
| Zeile 134: | Zeile 188: | ||
| ''/etc/dhcpd.conf'' : ( CentOS 5.3, openSuSE 11.4 ) | ''/etc/dhcpd.conf'' : ( CentOS 5.3, openSuSE 11.4 ) | ||
| - | ''/etc/dhcp3/dhcpd.conf'' : ( debian 5.0 ) | + | ''/etc/dhcp/dhcpd.conf'' : ( debian 6.0 ) |
| <file> | <file> | ||
| Zeile 145: | Zeile 199: | ||
| } | } | ||
| </file> | </file> | ||
| + | CentOS 5.3, openSuSE 11.4: | ||
| + | service dhcpd restart | ||
| - | /etc/init.d/dhcpd restart | + | debian (ab 6.0): |
| + | 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 159: | Zeile 215: | ||
| mkdir /srv/www/htdocs/opensuse/{oss,non-oss,update} | mkdir /srv/www/htdocs/opensuse/{oss,non-oss,update} | ||
| cp -a /media/susedvd/. /srv/www/htdocs/suse/oss | cp -a /media/susedvd/. /srv/www/htdocs/suse/oss | ||
| - | | + | (( geht davon aus, dass die SuSE DVD nach ''/media/susedvd'' gemountet ist )) |
| + | |||
| + | ==== Debian Repository ==== | ||
| + | |||
| + | mkdir /var/www/debian | ||
| + | cp -a /media/debian/. /var/www/debian | ||
| + | (( geht davon aus, dass die Debian DVD nach ''/media/debian'' gemountet ist )) | ||
| ===== Antwortdatei ===== | ===== Antwortdatei ===== | ||
| ==== SuSE / Auto-Yast ==== | ==== SuSE / Auto-Yast ==== | ||
| Zeile 175: | 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 | ||
| - | |||