<div dir="ltr"><div>Hey Petr,</div><div><br></div><div>I have read your post a few times but am only partially able to understand everything. It may be my lack of knowledge of the inner workings of all things involved. I shall give it a go again later and even try the patch. But where do you want me to apply the patch - on the master branch or on your pxe-services branch (
 <a href="https://github.com/InfrastructureServices/dnsmasq/tree/pxe-services" rel="noreferrer" target="_blank">https://github.com/InfrastructureServices/dnsmasq/tree/pxe-services</a>

) ?<br></div><div><br></div><div>Meanwhile, from a novice point of view and from what I know works in dnsmasq, I have this query -</div><div><br></div><div>Could dnsmasq not be made to ignore the <span style="font-family:monospace">pxe-service</span> lines or bypass the corresponding logic from the ltsp-dnsmasq.conf 
when <br></div><div>1. <span style="font-family:monospace">is_tag_set("proxy") == "False" <span style="font-family:arial,sans-serif">i.e ignore these lines -</span></span></div><div><span style="font-family:monospace">pxe-service=tag:proxy,tag:!ipxe-ok,X86PC,"undionly.kpxe",ltsp/undionly.kpxe<br>pxe-service=tag:proxy,tag:!ipxe-ok,X86-64_EFI,"snponly.efi",ltsp/snponly.efi<br>pxe-service=tag:proxy,tag:ipxe-ok,X86PC,"ltsp.ipxe",ltsp/ltsp.ipxe<br>pxe-service=tag:proxy,tag:ipxe-ok,X86-64_EFI,"ltsp.ipxe",ltsp/ltsp.ipxe</span></div><div><span style="font-family:monospace"></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:monospace"><span style="font-family:arial,sans-serif">2. and when </span>is_tag_set("rpi") == "False" <font face="arial,sans-serif">i.e. ignore this line or bypass corresponding logic -</font></span></div><div><span style="font-family:monospace">pxe-service=tag:rpi,X86PC,"Raspberry Pi Boot   ",unused<br></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif"></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">when dnsmasq is processing a request in <i>non-proxy mode</i> and the request is from <i>X86-64_EFI clients</i>? <br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif"><br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">If possible, then everything would just work as expected for all scenarios - <b>(BIOS or UEFI or RPI) and proxy</b>, <b>(BIOS or UEFI or RPI) and non-proxy</b>. <br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">It may be possible to handle this just within dnsmasq.<br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif"><br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">Please do consider this if not already done so. </font></span></div><div><br></div><div>Thanks,<br></div><div>Shrenik<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 9 Oct 2021 at 03:43, Petr Menšík <<a href="mailto:pemensik@redhat.com">pemensik@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have made some attempts at PXE booting. I have to say, it is a mess.<br>
<br>
Put my booting attempts at fedorapeople [1]. I have asked on #ipxe IRC<br>
channel. It seems pxe-service works only on biospc, client-arch == 0. I<br>
were able to make simple menu on my father's lenovo desktop and my work<br>
Thinkpad 490s. One instance of Raspberry 3. In Legacy mode, it works<br>
somehow well. You are even to make local boot menu entries. I made it<br>
possible to boot to memtest just fine.<br>
<br>
However, any my attempt in EFI mode to boot using menus failed. There is<br>
special function pxe_uefi_workaround, but to me it did not work. Current<br>
code did never return reply from pxe port request. Because my laptop<br>
does not send option 43 stuff in ipxe.efi request and I have not used<br>
proxy, it just does not answer. I were able to make it return something.<br>
It seems not well supported and should be avoided.<br>
<br>
Guys at ipxe channel told me EFI does not include option 43 menu<br>
support, which seems to be true. At that results, I think pxe-service<br>
should be in general avoided if you want to support EFI. Just use tags<br>
to offer first boot-file as ipxe.efi, then use ipxe script with possible<br>
menus inside. That seems to be more reliable and well documented way.<br>
<br>
I have fixed previous patch, it has to offer just based on boot item<br>
supplied type. Client arch is not always sent in a request, even when it<br>
is always present in discover, as I have noticed in Shrenik's dumps. I<br>
think that patch makes improvement and allows pxe-service work just for<br>
platforms related. Others should use dhcp-file with tags, depending on<br>
their clients.<br>
<br>
Custom setting of tags depending on option:client-arch seems to be more<br>
understandable and reliable.<br>
<br>
I have had enough of PXE today.<br>
<br>
Cheers,<br>
Petr<br>
<br>
1. <a href="https://pemensik.fedorapeople.org/dnsmasq/" rel="noreferrer" target="_blank">https://pemensik.fedorapeople.org/dnsmasq/</a><br>
<br>
On 10/7/21 23:10, Simon Kelley wrote:<br>
> As an aside the the discussion, can I just point out that I don't have<br>
> any way to test any of this dnsmasq functionality at the moment, and I'm<br>
> very rusty on the PXE spec, especially as it relates to EFI.<br>
><br>
> I don't therefore have much to contribute to this discussion, but I do<br>
> think this is valuable work, and when you find a solution, I'll give the<br>
> resulting patchset my full attention.<br>
><br>
><br>
> Cheers,<br>
><br>
> Simon.<br>
><br>
> _______________________________________________<br>
> Dnsmasq-discuss mailing list<br>
> <a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
> <a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a><br>
><br>
-- <br>
Petr Menšík<br>
Software Engineer<br>
Red Hat, <a href="http://www.redhat.com/" rel="noreferrer" target="_blank">http://www.redhat.com/</a><br>
email: <a href="mailto:pemensik@redhat.com" target="_blank">pemensik@redhat.com</a><br>
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
<a href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss" rel="noreferrer" target="_blank">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a><br>
</blockquote></div>