Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
admin_grundlagen:pxe-bootserver [2012/08/02 13:38] 4r7 [TFTP] |
admin_grundlagen:pxe-bootserver [2017/02/16 14:49] stefan_miethke [PXE] |
||
---|---|---|---|
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 19: | ||
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 33: | Zeile 36: | ||
</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 55: | Zeile 58: | ||
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 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 123: | ||
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 131: | ||
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 161: | Zeile 198: | ||
} | } | ||
</file> | </file> | ||
+ | CentOS 5.3, openSuSE 11.4: | ||
+ | service dhcpd restart | ||
- | /etc/init.d/dhcpd restart | + | debian 6.0: |
+ | service isc-dhcp-server restart | ||
==== Testen ==== | ==== Testen ==== | ||
Prüfen der Konfiguration: | Prüfen der Konfiguration: | ||
Zeile 198: | Zeile 237: | ||
* 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 | ||
+ |