Building undionly.kpxe

From FOG Project
Revision as of 10:27, 6 June 2014 by Tom-elliott.7271 (talk | contribs) (ipxe, build, default.ipxe, custom ipxe)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Build Requirements

Packages Needed

Redhat Based Linux

sudo yum -y groupinstall "Development Tools"
sudo yum -y install git wget

Debian Based Linux

sudo apt-get install build-essential git wget

Get the Source

  1. Open a terminal or console on your linux box.
  2. Obtain root privileges (e.g. sudo su -,su - root)
  3. Download the source to the home director (e.g. /root or ~/)
    • git clone
  4. Change to the src directory
    • cd /root/ipxe/src

= Create iPXE Script based on your needs.

Default ipxe script (/tftpboot/default.ipxe)

  • wget

== Custom ipxe script ==

  • <pre>vi ipxescript

Make the file so it contains your "custom" code.

Example code base: (Embedding the default.ipxe script into undionly.)

NOTE: CHANGE x.x.x.x to the IP of your FOG Server

dhcp || reboot
cpuid --ext 29 && set arch x86_64 || set arch i386
param mac ${net0/mac}
param arch ${arch}
chain http://x.x.x.x/fog/service/ipxe/boot.php##params

Build the undionly/ipxe files.

I USE THE FOLLOWING COMMAND TO BUILD ALL FILES AT ONCE. Remove the {}'s and only apply the file you wish to build if you want only a specific file.

make bin/{undionly,ipxe}.{,k,kk}pxe EMBED=ipxescript

Copy and/or Use your files

I USE THE FOLLOWING COMMAND TO COPY ALL FILES AT ONCE. Remove the {}'s and only copy the file you wish to use if you want only a specific file.

cp bin/{undionly,ipxe}.{,k,kk}pxe /tftpboot/ 

Use other undionly or ipxe files

There are two ways you can accomplish this, the easiest is the first method: CHANGE <filename> with the filename you wish to try

  • Copy the file you wish to use as undionly.kpxe
cd /tftpboot
mv undionly.kpxe undionly.kpxeTEST1; cp <filename> undionly.kpxe

You can also just make a symbolic link to the file you wish to use, though the first time you do this you will have to, at the very least, rename the "real" undionly.kpxe file to something else. To do the same but as a symbolic link use:

cd /tftpboot
mv undionly.kpxe undionly.kpxeREAL
ln -s <filename> undionly.kpxe

Don't forget to remove the link if you want to use other files.


Hopefully the above information helps you out.