Building undionly.kpxe

From FOG Project
Revision as of 10:30, 6 June 2014 by Tom-elliott.7271 (talk | contribs) (Build Requirements)
Jump to: navigation, search

Build Requirements

You will need root access: (example:)

sudo su -

Enter the Password of the current user. OR

su -

Enter the Password for the root user.

Packages Needed

Redhat Based Linux

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

Debian Based Linux

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 directory (e.g. /root or ~/)
    • git clone http://git.ipxe.org/ipxe.git
  4. Change to the src directory
    • cd /root/ipxe/src

= Create iPXE Script based on your needs.

Default ipxe script (/tftpboot/default.ipxe)

  • wget https://svn.code.sf.net/p/freeghost/code/trunk/src/ipxe/src/ipxescript

== 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

#!ipxe
dhcp || reboot
cpuid --ext 29 && set arch x86_64 || set arch i386
params
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.

Complete

Hopefully the above information helps you out.