Re: [Dnsmasq-discuss] pxe-service line for UEFI system?
Yeah - sorry, I'm not much help when it comes to C code. I was coming in with assumption my config was somehow incorrect. What is expected of dnsmasq - a DHCP offer with either a populated menu, or a populated boot-filename option. As mentioned in the OP, currently dnsmasq provides broken menu (no items present) and empty boot-filename, unless another "phantom" boot option is also defined (in which case it provides the populated menu). I looked over the dnsmasq docs again and noticed this bit in pxe-prompt: > If --pxe-prompt is omitted the system will wait for user input if there are > multiple items in the menu, but boot immediately if there is only one. As I understand it, if pxe-prompt is defined in the config, the services should be sent regardless of their count. So that's a bug, unless... I also looked at the changelog and found this in the 2.76 release: > Workaround problems with UEFI PXE clients. There exist > in the wild PXE clients which have problems with PXE > boot menus. To work around this, when there's a single > --pxe-service which applies to client, then that target > will be booted directly, rather then sending a > single-item boot menu. It seems like these 2 parts of the code are interacting incorrectly. 1) the pxe-service exit item is ignored, that's why the phantom option is needed 2) if pxe-prompt is explicitly defined, what _is_ supposed to happen for UEFI clients? TBH, I don't see why this UEFI issue even requires a UEFI-specific code workaround - shouldn't a config like this [1] avoid the problems, no code workaround needed? MZ [1] dhcp-match=set:efi-x86_64,option:client-arch,7 dhcp-match=set:efi-x86_64,option:client-arch,9 pxe-prompt=tag:!efi-x86_64,"dnsmasq PXE menu" pxe-service=7,... pxe-service=9,... On Sun, 19 Jan 2020 at 21:45, Geert Stappers wrote: > > On Sun, Jan 19, 2020 at 08:33:54PM +0100, P W wrote: > > On Sun, Jan 19, 2020 at 07:30:44PM +0100, Michal Zatloukal wrote: > > > On Wed, 8 Jan 2020 at 00:16, Michal Zatloukal wrote: > > > > > > > > In the meantime, I tried a simpler case [1] of UEFI PXE services > > > > config, which I confirmed to work. > > > > > > > > I intended to replace my config with this and work up towards the > > > > fancier tag-operated version, but made a wrong assumption and _added_ > > > > the trivial config to existing set of config files (adding .bak to the > > > > filename didn't stop the original from being loaded). Strangely, now > > > > option 43 contained all services for CSA 7 - both conditional, and > > > > unconditional ones, which were previosly missing. This actually > > > > happens even when the new config file is reduced to a single, > > > > unconditional pxe-service line. That's not how this should work, or is > > > > it? Is there a particular order to these pxe-* config options? IMHO > > > > the fact that only the menu items are missing, but prompt is sent, > > > > should indicate that setting tags is correct. > > > > > > > > I'll do from-the-ground-up experiment soon, hopefully finding at which > > > > point dnsmasq stops sending the boot options. > > > > > > > > Cheers, > > > > MZ > > > > > > > > [1] > > > > # Commented out to use my existing config, must be included if using > > > > standalone. > > > > #dhcp-range=10.0.0.10,10.0.0.240,2h > > > > #log-dhcp > > > > #tftp-root=/tftpboot > > > > #dhcp-no-override > > > > pxe-prompt="dnsmasq menu" > > > > pxe-service=0, "Boot BIOS PXElinux", bios/pxelinux > > > > pxe-service=0, "Boot BIOS iPXE", ipxe/undionly.kpxe > > > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > > > pxe-service=7, "Other item CSA 7",etc/other.efi > > > > pxe-service=9, "Boot UEFI CSA 9", efi64/syslinux.efi > > > > pxe-service=9, "Other item CSA 9",etc/other.efi > > > > pxe-service=0, "Exit menu" > > > > pxe-service=7, "Exit menu" > > > > pxe-service=9, "Exit menu" > > > > > > > > > Finally got to troubleshoot this today... > > > The issue arises when there's only a single "proper" pxe-service > > > configured (one that actually has a boot-filename defined). Is this > > > expected? > > > > > > So this works: > > > pxe-prompt="dnsmasq menu" > > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > > pxe-service=7, "Other item CSA 7",etc/other.efi > > > pxe-service=7, "Exit menu" > > > > > > But this does not: > > > pxe-prompt="dnsmasq menu" > > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > > pxe-service=7, "Exit menu" > > > > > > > Patches welcome > > > > Longer version: > * Seen the postings > * Seen that something needs some extra configuration > * What is expected from the dnsmasq project is not seen > > Please do make the extra mile > and express how dnsmasq could be better. > > > Groeten > Geert Stappers > -- > Leven en laten leven > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss ___ Dn
Re: [Dnsmasq-discuss] pxe-service line for UEFI system?
On Sun, Jan 19, 2020 at 08:33:54PM +0100, P W wrote: > On Sun, Jan 19, 2020 at 07:30:44PM +0100, Michal Zatloukal wrote: > > On Wed, 8 Jan 2020 at 00:16, Michal Zatloukal wrote: > > > > > > In the meantime, I tried a simpler case [1] of UEFI PXE services > > > config, which I confirmed to work. > > > > > > I intended to replace my config with this and work up towards the > > > fancier tag-operated version, but made a wrong assumption and _added_ > > > the trivial config to existing set of config files (adding .bak to the > > > filename didn't stop the original from being loaded). Strangely, now > > > option 43 contained all services for CSA 7 - both conditional, and > > > unconditional ones, which were previosly missing. This actually > > > happens even when the new config file is reduced to a single, > > > unconditional pxe-service line. That's not how this should work, or is > > > it? Is there a particular order to these pxe-* config options? IMHO > > > the fact that only the menu items are missing, but prompt is sent, > > > should indicate that setting tags is correct. > > > > > > I'll do from-the-ground-up experiment soon, hopefully finding at which > > > point dnsmasq stops sending the boot options. > > > > > > Cheers, > > > MZ > > > > > > [1] > > > # Commented out to use my existing config, must be included if using > > > standalone. > > > #dhcp-range=10.0.0.10,10.0.0.240,2h > > > #log-dhcp > > > #tftp-root=/tftpboot > > > #dhcp-no-override > > > pxe-prompt="dnsmasq menu" > > > pxe-service=0, "Boot BIOS PXElinux", bios/pxelinux > > > pxe-service=0, "Boot BIOS iPXE", ipxe/undionly.kpxe > > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > > pxe-service=7, "Other item CSA 7",etc/other.efi > > > pxe-service=9, "Boot UEFI CSA 9", efi64/syslinux.efi > > > pxe-service=9, "Other item CSA 9",etc/other.efi > > > pxe-service=0, "Exit menu" > > > pxe-service=7, "Exit menu" > > > pxe-service=9, "Exit menu" > > > > > > Finally got to troubleshoot this today... > > The issue arises when there's only a single "proper" pxe-service > > configured (one that actually has a boot-filename defined). Is this > > expected? > > > > So this works: > > pxe-prompt="dnsmasq menu" > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > pxe-service=7, "Other item CSA 7",etc/other.efi > > pxe-service=7, "Exit menu" > > > > But this does not: > > pxe-prompt="dnsmasq menu" > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > pxe-service=7, "Exit menu" > > > > Patches welcome > Longer version: * Seen the postings * Seen that something needs some extra configuration * What is expected from the dnsmasq project is not seen Please do make the extra mile and express how dnsmasq could be better. Groeten Geert Stappers -- Leven en laten leven ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] pxe-service line for UEFI system?
On Sun, Jan 19, 2020 at 07:30:44PM +0100, Michal Zatloukal wrote: > On Wed, 8 Jan 2020 at 00:16, Michal Zatloukal wrote: > > > > In the meantime, I tried a simpler case [1] of UEFI PXE services > > config, which I confirmed to work. > > > > I intended to replace my config with this and work up towards the > > fancier tag-operated version, but made a wrong assumption and _added_ > > the trivial config to existing set of config files (adding .bak to the > > filename didn't stop the original from being loaded). Strangely, now > > option 43 contained all services for CSA 7 - both conditional, and > > unconditional ones, which were previosly missing. This actually > > happens even when the new config file is reduced to a single, > > unconditional pxe-service line. That's not how this should work, or is > > it? Is there a particular order to these pxe-* config options? IMHO > > the fact that only the menu items are missing, but prompt is sent, > > should indicate that setting tags is correct. > > > > I'll do from-the-ground-up experiment soon, hopefully finding at which > > point dnsmasq stops sending the boot options. > > > > Cheers, > > MZ > > > > [1] > > # Commented out to use my existing config, must be included if using > > standalone. > > #dhcp-range=10.0.0.10,10.0.0.240,2h > > #log-dhcp > > #tftp-root=/tftpboot > > #dhcp-no-override > > pxe-prompt="dnsmasq menu" > > pxe-service=0, "Boot BIOS PXElinux", bios/pxelinux > > pxe-service=0, "Boot BIOS iPXE", ipxe/undionly.kpxe > > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > > pxe-service=7, "Other item CSA 7",etc/other.efi > > pxe-service=9, "Boot UEFI CSA 9", efi64/syslinux.efi > > pxe-service=9, "Other item CSA 9",etc/other.efi > > pxe-service=0, "Exit menu" > > pxe-service=7, "Exit menu" > > pxe-service=9, "Exit menu" > > > Finally got to troubleshoot this today... > The issue arises when there's only a single "proper" pxe-service > configured (one that actually has a boot-filename defined). Is this > expected? > > So this works: > pxe-prompt="dnsmasq menu" > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > pxe-service=7, "Other item CSA 7",etc/other.efi > pxe-service=7, "Exit menu" > > But this does not: > pxe-prompt="dnsmasq menu" > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > pxe-service=7, "Exit menu" > Patches welcome ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] pxe-service line for UEFI system?
Finally got to troubleshoot this today... The issue arises when there's only a single "proper" pxe-service configured (one that actually has a boot-filename defined). Is this expected? So this works: pxe-prompt="dnsmasq menu" pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi pxe-service=7, "Other item CSA 7",etc/other.efi pxe-service=7, "Exit menu" But this does not: pxe-prompt="dnsmasq menu" pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi pxe-service=7, "Exit menu" Cheers, MZ On Wed, 8 Jan 2020 at 00:16, Michal Zatloukal wrote: > > In the meantime, I tried a simpler case [1] of UEFI PXE services > config, which I confirmed to work. > > I intended to replace my config with this and work up towards the > fancier tag-operated version, but made a wrong assumption and _added_ > the trivial config to existing set of config files (adding .bak to the > filename didn't stop the original from being loaded). Strangely, now > option 43 contained all services for CSA 7 - both conditional, and > unconditional ones, which were previosly missing. This actually > happens even when the new config file is reduced to a single, > unconditional pxe-service line. That's not how this should work, or is > it? Is there a particular order to these pxe-* config options? IMHO > the fact that only the menu items are missing, but prompt is sent, > should indicate that setting tags is correct. > > I'll do from-the-ground-up experiment soon, hopefully finding at which > point dnsmasq stops sending the boot options. > > Cheers, > MZ > > [1] > # Commented out to use my existing config, must be included if using > standalone. > #dhcp-range=10.0.0.10,10.0.0.240,2h > #log-dhcp > #tftp-root=/tftpboot > #dhcp-no-override > pxe-prompt="dnsmasq menu" > pxe-service=0, "Boot BIOS PXElinux", bios/pxelinux > pxe-service=0, "Boot BIOS iPXE", ipxe/undionly.kpxe > pxe-service=7, "Boot UEFI CSA 7", efi64/syslinux.efi > pxe-service=7, "Other item CSA 7",etc/other.efi > pxe-service=9, "Boot UEFI CSA 9", efi64/syslinux.efi > pxe-service=9, "Other item CSA 9",etc/other.efi > pxe-service=0, "Exit menu" > pxe-service=7, "Exit menu" > pxe-service=9, "Exit menu" ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss