Frantisek Rysanek
2019-Nov-07 22:40 UTC
[syslinux] Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
Dear gentlemen, here goes the documentation fix I was talking about :-) The Wiki page on PXElinux, specifically the chapter on UEFI at the end of that page: https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#UEFI ...contains a few examples of ISC DHCPd configuration. The stumbling block for me was the syntax of these "if" scopes: if option architecture-type = 9 { filename "path/to/EFIx64/syslinux.efi"; } That "if" clause just never matched in my case. I'm running ISC dhcpd v4.3.5-3+deb9u1 . I later found out that it's the "integer literal" that is spelled wrong. What works is the following syntax: if option architecture-type = 00:09 { filename "path/to/EFIx64/syslinux.efi"; } I.e., specified as two bytes. Source: https://community.theforeman.org/t/uefi-dhcpd-conf/9793/3 And you don't even need to use classes in dhcpd.conf. You can just nest these "if scopes" directly into a subnet, or even configure them global. if substring (option vendor-class-identifier, 0, 9) = "PXEClient" { next-server 192.168.11.4; ignore-client-uids true; ... if option architecture-type = 00:09 { filename "pxelinux/6.git/efi64/syslinux.efi"; } ... } I have included the "ignore-client-uids" option for the PXE clients. This is because a large number of HW models from different TW vendors leave the DMI UUID = GUID = CID at the BIOS maker default, typically 0:0:2:0:3:0:4:0:5:0:6:0:7:0:8:0:9 (AMI). If we need to diskless-boot several such machines in a lab, e.g. for OS deployment, we would otherwise have bad luck (IP address collision). Back to the topic: note that apart from the architecture-type DHCP option (#93 = 16b integer), the client architecture tends to also be mentioned by the PXE client stacks in the vendor-class-identifier option (#60 = string). Example from tcpdump: Vendor-Class Option 60, length 32: "PXEClient:Arch:00007:UNDI:003016" That option is a "string" type - and indeed you can try to search for the particular architecture as a substring, like this: if substring (option vendor-class-identifier, 15, 5) = "00007" { filename "pxelinux/6.git/efi64/syslinux.efi"; } Source: https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence I hope this helps someone who comes after me... Frank Rysanek
Ady Ady
2019-Nov-08 00:42 UTC
[syslinux] Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
> Dear gentlemen, > > here goes the documentation fix I was talking about :-) > > The Wiki page on PXElinux, specifically the chapter on UEFI at the end > of that page: > https://wiki.syslinux.org/wiki/index.php?title=PXELINUX#UEFI > ...contains a few examples of ISC DHCPd configuration. > > The stumbling block for me was the syntax of these "if" scopes: > > if option architecture-type = 9 { > filename "path/to/EFIx64/syslinux.efi"; > } > > That "if" clause just never matched in my case. > I'm running ISC dhcpd v4.3.5-3+deb9u1 . > I later found out that it's the "integer literal" that is spelled > wrong. What works is the following syntax: > > if option architecture-type = 00:09 { > filename "path/to/EFIx64/syslinux.efi"; > } > > I.e., specified as two bytes. > > Source: > https://community.theforeman.org/t/uefi-dhcpd-conf/9793/3 > > And you don't even need to use classes in dhcpd.conf. > You can just nest these "if scopes" directly into a subnet, or even > configure them global. > > if substring (option vendor-class-identifier, 0, 9) = "PXEClient" { > next-server 192.168.11.4; > ignore-client-uids true; > ... > if option architecture-type = 00:09 { > filename "pxelinux/6.git/efi64/syslinux.efi"; > } > ... > } > > I have included the "ignore-client-uids" option for the PXE clients. > This is because a large number of HW models from different TW vendors > leave the DMI UUID = GUID = CID at the BIOS maker default, typically > 0:0:2:0:3:0:4:0:5:0:6:0:7:0:8:0:9 (AMI). If we need to diskless-boot > several such machines in a lab, e.g. for OS deployment, we would > otherwise have bad luck (IP address collision). > > Back to the topic: note that apart from the architecture-type DHCP > option (#93 = 16b integer), the client architecture tends to also be > mentioned by the PXE client stacks in the vendor-class-identifier option > (#60 = string). Example from tcpdump: > > Vendor-Class Option 60, length 32: "PXEClient:Arch:00007:UNDI:003016" > > That option is a "string" type - and indeed you can try to search for > the particular architecture as a substring, like this: > > if substring (option vendor-class-identifier, 15, 5) = "00007" { > filename "pxelinux/6.git/efi64/syslinux.efi"; > } > > Source: > https://wiki.fogproject.org/wiki/index.php/BIOS_and_UEFI_Co-Existence > > I hope this helps someone who comes after me... > > Frank RysanekThe dhcpd.conf examples in the wiki page were modified from "nn:nn" to "decimal" format by HPA in 2016 (quoting HPA: "UEFI - clean up dhcpd.conf examples"). Please note that several other sites (e.g. the FOG wiki) also use simple decimal notation for these types of examples. Whether the decimal notation is actually invalid, or at least problematic, I don't really know. If during the next few days there are no new emails objecting the suggested change, I'll revert the dhcpd.conf examples in the PXELINUX wiki page back to "nn:nn" format. Although feedback from GeneC and from HPA regarding this matter would be particularly interesting, comments from anyone are very much appreciated. Other than that simple change, I'd like to know what other changes you are proposing, specifically. Alternative ways to do things can be welcomed. Please consider that this wiki page is about PXELINUX (not about dhcpd.conf) and that these are only examples, not complete docs about dhcpd.conf. Perhaps a small, partial snippet or phrase located in an adequate place within the page might be enough. Sometimes, linking to other (trustworthy) resources, and/or linking to an email in this Mailing List, might be better. Regards, Ady.
Frantisek Rysanek
2019-Nov-08 09:54 UTC
[syslinux] Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
On 8 Nov 2019 at 0:42, Ady Ady via Syslinux wrote:> [in response to my = Frank Rysanek's rantings a few hours earlier:]> > if option architecture-type = 00:09 { > > filename "path/to/EFIx64/syslinux.efi"; > > }...> > if substring (option vendor-class-identifier, 15, 5) = "00007" { > > filename "pxelinux/6.git/efi64/syslinux.efi"; > > }...> > (plus the snippet on ignore-client-uids)...................> The dhcpd.conf examples in the wiki page were modified from "nn:nn" to > "decimal" format by HPA in 2016 (quoting HPA: "UEFI - clean up > dhcpd.conf examples"). >allright so this might be a matter of different versions of ISC dhcpd behaving slightly different through the ages...> Please note that several other sites (e.g. the FOG wiki) also use > simple decimal notation for these types of examples. Whether the > decimal notation is actually invalid, or at least problematic, I don't > really know. > > If during the next few days there are no new emails objecting the > suggested change, I'll revert the dhcpd.conf examples in the PXELINUX > wiki page back to "nn:nn" format. Although feedback from GeneC and from > HPA regarding this matter would be particularly interesting, comments > from anyone are very much appreciated. >Obviously you guys have more experience with this throughout the decades of history. I only return to the dhcpd.conf now and then, at points isolated by years of "no change" in time. I mean I definitely trust your judgement on all of this.> Other than that simple change, I'd like to know what other changes you > are proposing, specifically. >No other changes at the moment. I've specifically tried to boil down the "integer literal value" thing to the minimum possible example. (My favourite approach when trying to demonstrate problem reproduction.)> Alternative ways to do things can be welcomed. Please consider that > this wiki page is about PXELINUX (not about dhcpd.conf) and that these > are only examples, not complete docs about dhcpd.conf. >Yes I understand that you prefer not to turn the PXElinux Wiki into a surrogate ISC dhcpd config reference :-) That said, the PXElinux Wiki page appears to be a pretty central place where to document PXEboot-related peculiarities. (That's why I dared to mention the ignore-client-uids DHCP option. The related common omission in PXE oproms or rather DMI BIOS tables really hurts us a lot.) Also, freelance PXE booting (as compared to turn-key end-to-end proprietary solutions by Microsoft, ACP Thinmanager and the like) tends to be one of the universal hot-spots of "creme de la creme" DHCP sorcery :-) Unfortunately there's no escaping complex configurations and ugly details... Or, would you suggest a rather more appropriate "hosting space" for complex boilerplate dhcpd.conf examples? ;-) I believe that even this mailing-list posting of mine is itself useful in that vein, as it gets archived at syslinux.org and indexed by Google...> Perhaps a small, > partial snippet or phrase located in an adequate place within the page > might be enough. >I see - like a surgical one-liner patch into the wiki page. Unfortunately in this case I don't feel confident about what's right and what's possibly wrong. Hence my talkative handling of this case :-( I'd prefer to leave the precise formulation to you maintainer guys...> Sometimes, linking to other (trustworthy) resources, > and/or linking to an email in this Mailing List, might be better. >The trouble is that *the* canonical place for "all things PXE" to me has always been the PXElinux wiki :-) Random other people's blogs, or third-party derived project sites, to me are all less authoritative and possibly less durable. And all I can offer on my part is immediate personal experience with my particular setup... Thanks for all your help and activity :-) Frank
James Pearson
2019-Nov-08 11:39 UTC
[syslinux] Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
Ady Ady via Syslinux wrote:> > The dhcpd.conf examples in the wiki page were modified from "nn:nn" to > "decimal" format by HPA in 2016 (quoting HPA: "UEFI - clean up > dhcpd.conf examples"). > > Please note that several other sites (e.g. the FOG wiki) also use > simple decimal notation for these types of examples. Whether the > decimal notation is actually invalid, or at least problematic, I don't > really know. > > If during the next few days there are no new emails objecting the > suggested change, I'll revert the dhcpd.conf examples in the PXELINUX > wiki page back to "nn:nn" format. Although feedback from GeneC and from > HPA regarding this matter would be particularly interesting, comments > from anyone are very much appreciated.From my own limited use of setting up syslinux.efi booting in dhcpd.conf (stock dhcpd on CentOS 6), the 'decimal' format doesn't work, but the "nn:nn" format does James Pearson
Maybe Matching Threads
- Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
- Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
- Suggested update to the Wiki page on PXElinux (UEFI-related stuff in ISC dhcpd.conf)
- ISC DHCPD Problem and Solution.
- Passing option-209 to PXE client w/ ISC DHCPD V2