Feed on
Posts
Comments
  1. Install minimal install of CentOS 6 – either i386 or x86_64 and either virtual or native
  2. Login to root console
  3. Verify and/or configure network access – in minimal install, one must actively enable network interfaces via “ifup”
  4. Install prerequisite packages identified on www.ipxe.org# yum install git gcc binutils make perl syslinux geniosimage
  5. Install packages to write ISO contents to a CD# yum install cdrecord
  6. Retrieve the iPXE source# git clone git://git.ipxe.org/ipxe.git
    # cd ipxe/src# make
  7. Troubleshoot and resolve any errors to achieve a successful build before continuing
  8. Create the embedded script (see www.ipxe.org/embed for more info) by entering the following as the contents of boot.ipxe in the ipxe/src directory using preferred text editor (e.g. vi boot.ipxe):#!ipxe
    # 2 lines continuously attempt to retrieve IP assignment
    :retry_dhcp
    dhcp || goto retry_dhcp
    # Attempt to evaluate first iPXE file, then the second, then the third
    # || = “or” and prevents the script from exiting at the first error
    chain tftp://<ip_address_of_source1>/<name_of_ipxe_file1> ||
    chain tftp://<ip_address_of_source2>/<name_of_ipxe_file1> ||
    chain tftp://<ip_address_of_source3>/<name_of_ipxe_file1>

    e.g.
    #!ipxe
    :retry_dhcp
    dhcp || goto retry_dhcp
    chain tftp://192.168.0.200/boot.ipxe ||
    chain tftp://172.16.20.200/boot.ipxe ||
    chain tftp://10.10.10.200/boot.ipxe
     

    This iPXE script will continuously attempt to retrieve an IP address from a DHCP server.  Once it receives an IP assignment, it will proceed to attempt to load the wdl6.ipxe from each of the sources in the order entered.  This allows the use of a single boot CD across several network segments.  It is important to note that the double pipe (vertical bars) at the end of the first two “chain” lines are necessary in order prevent the iPXE script from exiting on the first error – which would occur if the wdl6.ipxe script couldn’t be retrieved from 192.168.0.200 in the example.

  9. Compile the changes into the bin/ipxe.iso that we’ll later use as the source for the boot CD# make bin/ipxe.iso EMBED=boot.ipxe
  10. Identify your CD recording device# cdrecord –scanbus
    Note the 3 comma delimited numbers in the left-most column of the line in which the CD recording device is identified (e.g. 1,0,0)
  11. Place blank CD in CD recording device and record ISO to the blank CD# cdrecord –v dev=1,0,0 bin/ipxe.iso
  12. The embedded script (boot.ipxe) can be altered again, then recompiled and recorded to CD by editing the boot.ipxe then following steps 9-11.

Comments are closed.