Building undionly.kpxe
Contents
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
- Open a terminal or console on your linux box.
- Obtain root privileges (e.g. sudo su -,su - root)
- Download the source to the home director (e.g. /root or ~/)
-
git clone http://git.ipxe.org/ipxe.git
-
- 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.