downloadDownload FAQFAQ
Site Navigation:
 
 

Appendix B. Sätta upp en PXE-server

[Notera]Erfarenhet krävs

This appendix is intended for users with previous Linux experience. If you are a new user, you may want to install using minimal boot media or the distribution DVD instead.

This section discusses how to set up a Pre-boot eXecution Environment (PXE) boot server for machines that cannot boot from CD, DVD, or USB media. PXE is a special extension of services provided by the Dynamic Host Configuration Protocol (DHCP). It uses a Trivial File Transfer Protocol (TFTP) server to provide minimal boot files to a network client. To set up a PXE boot service on a separate Fedora server on the local network, follow this procedure:

  1. Installera paketen tftp-server, dhcp och syslinux:

    su -c 'yum install tftp-server dhcp syslinux'
  2. Edit the /etc/dhcpd.conf file to configure the DHCP server. The following example is a minimal configuration for a network that uses the following configuration:

    • 192.168.1.0/24 adressering

    • Dynamiska adresser ges mellan 192.168.1.200 och 192.168.1.240

    • DHCP/PXE-server på IP-adress192.168.1.10:

    • Ingen annan dynamisk konfiguration tillhandahölls

    allow booting;
    allow bootp;
    ddns-update-style interim;
    ignore client-updates;
    
    subnet 192.168.1.0 netmask 255.255.255.0 {
    	  option subnet-mask 255.255.255.0;
    	  option broadcast-address 192.168.1.255;
    	  range dynamic-bootp 192.168.1.200 192.168.1.240;
    	  next-server 192.168.1.10;
    	  filename "pxelinux.0";
    }
  3. Som användaren root, kopiera PXE startavbilden och Fedora startfiler till TFTP-serverns katalog.

    su -
    cd /tftpboot
    cp /usr/lib/syslinux/pxelinux.0 .
  4. Copy the vmlinuz and initrd.img files from the pxeboot directory on distribution media or a Web mirror to the /tftpboot directory.

  5. Skapa en minimal fil /tftpboot/pxelinux.cfg:

    DEFAULT pxeboot
    TIMEOUT 50
    LABEL pxeboot
          KERNEL vmlinuz
          APPEND initrd=initrd.img
    ONERROR LOCALBOOT 0
  6. Turn on the dhcpd, xinetd and tftp services:

    su -c '/sbin/service dhcpd start'
    su -c '/sbin/service xinetd start'
    su -c '/sbin/chkconfig tftp on'

Boot the client system and either use the required keys or configure its BIOS to boot from its network interface using PXE. At the boot prompt, hit Enter to boot the default Fedora installation image. If an error occurs, the system boots in its normal configuration, such as a local hard disk.