SLAC ESD Software Engineering Group
Stanford Linear Accelerator Center

PXE Server

SLAC Computing
Software Engineering
Detailed
Unix
 

 

 


 

When a PXE enabled client boots, it obtains an IP address and our Boot server from a DHCP server.  The client obtains the name of the network bootstrap program (NBP) from the Boot Server.  Finally, the client uses TFTP to download the NBP from the Boot Server and then executes it.

Our PXE (Pre eXecution Environment) server will allow us to build our servers with little or no user intervention.  Mccsrv01 is our DHCP server which will provide the IP to the new server and redirect it to our TFTP server, lcls-prod03. 

Our kickstart file location is in the “default” file in the APPEND section.  The kickstart file will contain our complete build.  To make changes to our build we modify our kickstart file.  We only modify the DHCP MAC address and restart DHCP services to PXE boot our new servers.

DHCP Server

  • Modify the /etc/dhcpd.conf file on mccsrv01
    • Modify the MAC address in the PXE Boot area
  • Perform a ‘ service dhcpd configtest ‘ –to verify syntax
  • Restart dhcp server: service dhcpd restart
  • After server has been built
    • rename server
    • comment out DHCP entry
    • restart dhcp services
      • service dhcpd configtest
      • service dhcpd restart
      • DHCP file excerpt:
      • #####################

        # PXE Boot area

        #####################

        group {

                next-server 134.79.151.23;  #lcls-prod03 tftp server

                filename "pxelinux.0";      #Bootloader program

                host lcls-rhel6

                {

                 hardware ethernet  90:B1:1C:25:1B:85;

                 fixed-address 134.79.151.73;

                }

        }

         

        #####################

        # End of PXE

        #####################

 

 

TFTP Server:

  • Copy over the pxelinux.0 file to /tftpboot/pxelinux.0
    • /usr/share/syslinux/pxelinux.0
    • -rw-r--r-- 1 root root 27K Jan  9 15:26 pxelinux.0
  • Copy over menu.c32 file to /tftpboot/menu.c32
    • /usr/share/syslinux/menu.c32
    • -rw-r--r-- 1 root root 60928 Jan  9 15:26 menu.c32
  • Create pxelinux.cfg directory
    • drwxr-xr-x 2 root root 4.0K Jan 10 13:50 pxelinux.cfg/
    • Create a file “default” file which contains the PXE menu
    • default fiile:

 

default menu.c32

prompt 0

 

MENU TITLE PXE Menu

 

LABEL local

menu label Boot from ^local drive

menu default

localboot 0

timeout 80

TOTALTIMEOUT 9000

 

LABEL RHEL6_x86_64-Server

MENU LABEL RHEL 6 x86_64 Server

KERNEL images/RHEL6/x86_64/vmlinuz

APPEND ksdevice=link initrd=images/RHEL6/x86_64/initrd.img ks=nfs:172.27.8.11:/export/mccfs/usr/local/admin/kickstart/ks-RHEL6-64-server.cfg

 

LABEL RHEL6_x86_64-WS

MENU LABEL RHEL 6 x86_64 Workstation

KERNEL images/RHEL6/x86_64/vmlinuz

APPEND ksdevice=link initrd=images/RHEL6/x86_64/initrd.img ks=nfs:172.27.8.11:/export/mccfs/usr/local/admin/kickstart/ks-RHEL6-64-WS.cfg

 

LABEL RHEL5_i386

MENU LABEL RHEL 5 i386

KERNEL images/RHEL5/i386/vmlinuz

APPEND ksdevice=link initrd=images/RHEL5/i386/initrd.img ks=nfs:172.27.8.11:/export/mccfs/usr/local/admin/kickstart/ks-RHEL5.cfg

 

  • Create the directories in /tftpboot :
    • images/RHEL6/x86_64/
    • images/RHEL5/i386
  • Copy initrd.img (Initial Ram Disk) and vmlinuz (Compressed Linux Kernel ) to the appropriate directories above
  •  

    • Example for x86_64:
      • /afs/slac/package/RedHat/RHEL6/6u3/x86_64/images/pxeboot/initrd.img
      • /afs/slac/package/RedHat/RHEL6/6u3/x86_64/images/pxeboot/vmlinuz

 

 

 

 

 

 
 

 

 


[SLAC ESD Software Engineering Group][ SLAC Home Page]


Author: Ken Brobeck

Modified: 16-Jan-2013