Everything Penguin, Inc.

Helping to support the open source community.
Search this Site:

Local Sources
  • /pub

  • Linux OS
  • /pub/OS/Linux

  • Networking
  • /pub/Networking

  • Network Services
  • /pub/NetworkServices

  • Clustering
  • HA
  • DRM

  • Encryption
  • Keytool/OpenSSL
  • Java Samples

  • Development
  • Design
  • C/C++
  • Java
  • Perl
  • Shell
  • Web / J2EE

  • Storage
  • Filesystems
  • HPC
  • /pub/Storage

  • Not Linux ?
  • BSD
  • HP-UX
  • Solaris
  • VM
  • Windows
  • /pub/OS

  • Security
  • /pub/Security
  •  Parent Directory

    PXE boot
    Brett Lee
    =====================================================================
    
    
    -------------------------------------------------------
    ** Other document briefs in this directory:
    
         pxeboot-Kickstart (Installing over the network)
         pxeboot-NFS (Running a NFS root filesystem)
         pxeboot-Rescue (Boot a rescue image)
    -------------------------------------------------------
    
    
    
    Get pxelinux.0 and put it in the root of the tftp server dir.
    
    Example:
         /tftpboot/pxelinux.0
    
    
    Configure dhcpd.conf:
    
      If TFTP server is a different host than DHCP server, specify this using 
      the "next-server" option.
    
         Example:
         next-server linux.home.local;      # TFTP server
    
      Set the "filename" option to pxelinux.0 
    
         Example:
         filename "pxelinux.0";               # The file
    
    
    
    Enable PXE boot on the client.
    
      Usually this means configuration via the BIOS, or by interrupting
      the boot process, but there also may be additional configuration
      within the Boot ROM.
    
        For example, the Broadcom Boot ROM has a (CNTL-S) to config.
    
    
    Overview:
    
      Client boots, performs a DHCPDISCOVER (possibly BOOTP) and waits for a
      DHCPOFFER that includes the "filename" parameter.
    
      IP an address gets assigned, system checks for a next-server param, tries to
      get the PXE file from /tftpboot/pxelinux.0, and if sucessful executes it.
    
      pxelinux.0 helps find the kernel, rootfs, initrd and other params to boot.
    
    
    pxelinux.0:
    
      After the client boots, it will attempt to find it's PXE-specific "config" file.
      The config file is named per the MAC address and exists relative to the
      pxelinux.0 file.  If you placed pxelinux.0 in /tftpboot, you should have a
      file/directory structure under /tftpboot/pxelinux.cfg/ containing some files.
      In the example below, the MAC address of the booting device is 00:30:48:5C:61:3E
      so to get the PXE specific one you would need to prepend a "01" to the MAC.
    
      If the MAC specific file is not found, a file with the HEX of the IP address
      is checked.
    
      [root@linux ~]# gethostip 192.168.0.55
      192.168.0.55 192.168.0.55 C0A80037
      [root@linux ~]#
    
      If that is not found, subsequent checks are made minus each nibble.  Lastly,
      a default file is checked.
    
    Example:
         /tftpboot/pxelinux.cfg/01-00-30-48-5C-61-3E
         /tftpboot/pxelinux.cfg/C0A80037
         /tftpboot/pxelinux.cfg/C0A8003
         /tftpboot/pxelinux.cfg/C0A800
         /tftpboot/pxelinux.cfg/C0A80
         /tftpboot/pxelinux.cfg/C0A8
         /tftpboot/pxelinux.cfg/C0A
         /tftpboot/pxelinux.cfg/C0
         /tftpboot/pxelinux.cfg/C
         /tftpboot/pxelinux.cfg/default
    
    
    What might go in the file?  The information needed to boot: 
    
    [root@linux pxelinux.cfg]# cat 01-00-30-48-5C-61-3E
    DEFAULT linux
    LABEL linux
    SAY Now booting the kernel from SYSLINUX for: SuperMicro_1
    KERNEL vmlinuz
    APPEND text ro root=/dev/sda1 initrd=initrd.img
    [root@linux pxelinux.cfg]#
    
    
    
    Given the above configuration, initrd.img and the vmlinuz kernel will need
    to be on tftp server.  Put them in the root alongside pxelinux.0.
    
    -rw-r--r--    1 root     root      5669675 Nov 14 10:46 initrd.img
    -rw-r--r--    1 root     root        13148 Nov 14 10:51 pxelinux.0
    drwxr-xr-x    2 root     root         4096 Nov 14 16:51 pxelinux.cfg
    -rw-r--r--    1 root     root      1806388 Nov 14 10:41 vmlinuz
    
    
    
    Sample /etc/dhcpd.conf entries:
    
       # Boot and install CentOS on these guys
       group {
    
         allow bootp;
         allow booting;
    
         option ip-forwarding    false;  # No IP forwarding
         option mask-supplier    false;  # Don't respond to ICMP Mask req
    
         min-lease-time 300;                   # 60     - 1 min
         default-lease-time 300;               # 86400  - 1 day
         max-lease-time 300;
         use-host-decl-names on;
    
         next-server linux.home.local;         # TFTP server
         filename "pxelinux.0";                # The file
    
         host superm1 {
           hardware ethernet     00:0c:29:ca:b7:28; # left  - Intel
         # hardware ethernet     00:0c:29:ca:b7:29; # right - Broadcom
           fixed-address         192.168.1.201;
         }
       }
    
    
    
    Now just reboot and see if it boots.  For booting to Kickstart an install,
    running an NFS root filesystem, or booting a rescue image, please see the other
    files in this directory.
    
    
    Additional references:
    http://myhowtosandprojects.blogspot.com/2008/07/pxe-magic-boot-os-from-network-with_01.html
    

    Other Sites

    RFC's
  • FAQ's
  • IETF
  • RFC Sourcebook

  • Linux
  • Linux- Intro
  • Bash - Intro
  • Bash - Advanced
  • Command Line
  • System Administration
  • Network Administration
  • Man Pages (& more)
  • More Guides
  • Red Hat Manuals
  • HOWTO's

  • Reference/Tutorials
  • C++ @ cppreference
  • C++ @ cplusplus
  • CSS @ echoecho
  • DNS @ Zytrax
  • HTML @ W3 Schools
  • Java @ Sun
  • LDAP @ Zytrax
  • Linux @ YoLinux
  • MySQL
  • NetFilter
  • Network Protocols
  • OpenLDAP
  • Quagga
  • Samba
  • Unix Programming


  • Sponsors:
  • BrettLee.com
  • TheFrontOffice.BIZ
  • ScubaNavigator.com
  • Nitrox.net

  • [ Statistics by AWStats ]

    [ Powered by Red Hat Linux ] [ Powered by Apache Server] [ Powered by MySQL ]

    In an effort to provide a service of value to the open source community, I've put together this website that containing many of my notes and references.

    This website is not authoritative and it is certainly not without errors; it is a work in progress.

    In addition to my contributions you will also find the work of others. Where the work is not mine, I have tried to indicate that, and to reference the source of the work: by citing the original author, retaining the authors' name and license wherever present, or by placing the work in a suitably named URL containg /external/ in the path. If you find any work here that should not be publically available, please send me a note and it will be removed.

    As for my contributions, you are free to use any of *MY* notes or code from this website unless specifically instructed otherwise.

    Brett Lee, Ph.D., President & CEO
    Everything Penguin, Inc.