-
-
Save HikariKnight/c2ffeef1d656dfbaf8dc610a55aa6143 to your computer and use it in GitHub Desktop.
<%doc> | |
This template generates a better tftp filenames based on architecture | |
for PXE booting. | |
Place this file in /usr/share/zentyal/stubs/dhcp | |
Include it by adding | |
<& pxeboot.mas, options => \%options &> | |
into the "if ($options{filename}) {" section of subnet.mas and comment out the | |
filename "<% $options{filename} %>"; line | |
</%doc> | |
<%args> | |
%options | |
</%args> | |
% if ($options{filename}) { | |
# Detect if UEFI/BIOS and use the right boot image | |
class "pxeclient" { | |
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; | |
if substring (option vendor-class-identifier, 15, 5) = "00000" { | |
# BIOS client | |
filename "undionly.kpxe"; | |
} | |
elsif substring (option vendor-class-identifier, 15, 5) = "00002" { | |
# EFI client 32 bit Type1 | |
filename "i386-efi/<% $options{filename} %>"; | |
} | |
elsif substring (option vendor-class-identifier, 15, 5) = "00006" { | |
# EFI client 32 bit Type2 | |
filename "i386-efi/<% $options{filename} %>"; | |
} | |
elsif substring (option vendor-class-identifier, 15, 5) = "00007" { | |
# EFI client 64 bit Type1 | |
filename "<% $options{filename} %>"; | |
} | |
elsif substring (option vendor-class-identifier, 15, 5) = "00008" { | |
# EFI client 64 bit Type2 | |
filename "<% $options{filename} %>"; | |
} | |
elsif substring (option vendor-class-identifier, 15, 5) = "00009" { | |
# EFI client 64 bit Type3 | |
filename "<% $options{filename} %>"; | |
} | |
else { | |
# default to EFI 64 bit | |
filename "<% $options{filename} %>"; | |
} | |
} | |
% } |
hi @faaziz thats because this script does nothing to this part, it only handles the file path for the "thin client/external tftp-server" option under the advanced tab in DHCP.
It hardcodes the bios boot image to be undionly.kpxe
while the efi boot image name is gotten from the file path inputbox.
for your config just set the External TFTP-server Next Server
option to Host
then the IP for the fog server
Thanks for the quick turnaround. I will give it shot.
@faaziz just keep in mind the file might have to be re-included after major updates or updates to zentyal-dhcp since they dont have any proper way to include files in for this specific thing :)
hence the gist on my end
Quick question on the file path being set to ipxe.efi, where exactly is this file located?
the "file path" is in my example essentially tftp://192.168.10.250/ipxe.efi
but if the client is using 32bit EFI then it is tftp://192.168.10.250/i386-efi/ipxe.efi
if the client is using bios pxe then it is tftp://192.168.10.250/undionly.kpxe
these are the paths fogserver uses by default as per the fogserver wiki on how to configure your dhcp server to forward pxe requests to fogserver
Thank you. I managed to get to the Fog menu, but I didn't have to make any change to the Zentyal subnet.mas file. I am wondering what is it that your changes are for? Forgive me for my ignorance, I am new around this space.
my changes are in order to make both bios pxe and efi pxe working not just one of the 2 as pointed out in my last message there are 3 different files used
bios pxe, 64bit ipxe, 32bit ipxe
Hi,
Is there a guide I could use to understand how Zentyal and Fog server are tied together. Right now Zentyal is handling DHCP and DNS and I cannot move away from it since I am using it as domain controller.
From the script above it's not clear Fog server is running on a different host if that's the case how does Zentyal figure out where Fog server is installed?
Thanks,
Faisal