Linuxhotel Wiki

Wie ging das nochmal?

Benutzer-Werkzeuge

Webseiten-Werkzeuge


admin_grundlagen:pxe-bootserver

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
admin_grundlagen:pxe-bootserver [2009/08/25 21:57] – Externe Bearbeitung 127.0.0.1admin_grundlagen:pxe-bootserver [2017/02/16 15:00] (aktuell) – [Testen] stefan_miethke
Zeile 1: Zeile 1:
 ===== Pakete ===== ===== Pakete =====
-SuSE: ( 10.2 ) +openSuSE: ( 11.4 ) 
-  dhcp-server tftp pxe syslinux apache2 apache2-prefork+  dhcp-server tftp syslinux apache2 apache2-prefork
 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 =====
-=== SuSE === 
-  cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ 
-(( Die Datei ''X86PC/linux/linux.0'' aus dem SuSE pxe Paket hat beim testen nicht funktioniert. )) 
-  mkdir /var/lib/tftpboot/X86PC/linux/suse102 
-  cd /var/lib/tftpboot/X86PC/linux/suse102 
-  wget http://download.opensuse.org/distribution/10.2/repo/oss/boot/i386/loader/{linux,initrd,isolinux.cfg} 
  
 +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'' : ''/var/lib/tftpboot/pxelinux.cfg/default'' :
 <file> <file>
Zeile 23: Zeile 24:
 TIMEOUT 200 TIMEOUT 200
  
-DEFAULT suse+DEFAULT opensuse
  
-LABEL suse +#Superpraktisch zum testen neuer Eintraege im Bootmenu: 
-  KERNEL suse102/linux +LABEL pxelinux 
-  APPEND initrd=suse102/initrd showopts ip=bootp install=http://download.opensuse.org/distribution/10.2/repo/oss vga=0x317 lang=de autoyast=http://notebook21/suse/autoyast.xml+  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
 </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 46: Zeile 51:
  
 DEFAULT centos 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
 +</file>
 +
 +== 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'' : 
 +<file>
 +SERIAL 0 115200
 +PROMPT 1
 +TIMEOUT 200
 +
 +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 repo=http://centos/7/os/x86_64
 </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 centos7/vmlinuz -initrd centos7/initrd.img -append "vga=normal console=ttyS0" -boot c -snapshot -nographic centos7/initrd.img
  
-=== Debian 5.0 === +=== Debian 8.0 === 
-  ln -s /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/+  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 73: 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 82: 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 108: Zeile 156:
   * 0 ist die Vordergrund-Farbe, 7 die Hintergrundfarbe des //Textes// (!)   * 0 ist die Vordergrund-Farbe, 7 die Hintergrundfarbe des //Textes// (!)
  
 +===== TFTP =====
 +TODO: durch systemd ersetzen
  
-===== TFTP ===== 
 ''/etc/xinetd.d/tftp'' : ''/etc/xinetd.d/tftp'' :
 <file> <file>
Zeile 122: Zeile 171:
 } }
 </file> </file>
- 
-  /etc/init.d/xinetd restart 
  
 SuSE, Centos: SuSE, Centos:
   chkconfig tftp on   chkconfig tftp on
 +
 +alle Distros:
 +  service xinetd restart
 +
 +=== testen ===
 +  lsof -i :tftp
  
 ===== DHCP ===== ===== DHCP =====
Zeile 133: Zeile 186:
  
 ==== PXE Einstellungen ==== ==== PXE Einstellungen ====
-''/etc/dhcpd.conf'' : ( CentOS 5.3 )+''/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 146: 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 160: 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 176: 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
- 
  
admin_grundlagen/pxe-bootserver.1251237436.txt.gz · Zuletzt geändert: 2011/09/23 13:43 (Externe Bearbeitung)