Last active
March 6, 2022 14:01
-
-
Save HikariKnight/c2ffeef1d656dfbaf8dc610a55aa6143 to your computer and use it in GitHub Desktop.
pxeboot.mas file to include in /usr/share/zentyal/stubs/dhcp/subnet.mas for when you use fog server for pxe booting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%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} %>"; | |
} | |
} | |
% } |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.