pihole 6 dnsmasq pxe enable-tftp possible?

Hello,
today I updated to pihole 6. Previously i used this config to get a simple PXE boot service running for my pis.
'''
enable-tftp
tftp-root=/tftpboot
pxe-service=0,"Raspberry Pi Boot"
'''
How can i create a similar config with pihole 6?

Greetings and thank you in advance

Go to Settings > All Settings > Misc > and enter it into misc.dnsmasq_lines

1 Like

Found it thank you guys :slight_smile:
Should FTL load additional dnsmasq configuration files from /etc/dnsmasq.d/?
etc_dnsmasq_d = true

This is an other possibility if you want to put your code as a dnsmasq config file and load it on Pi-hole startup.

Both ways should work

1 Like

good thing is i can see the rainbow splash. Sadly nothing more happens.
Pi does not boot anymore :frowning:

setting/misc.dnsmasq_lines

enable-tftp
tftp-root=/tftpboot
# pxe rpi
pxe-service=0,"Raspberry Pi Boot"

The directory is mounted to /tftpboot

Volume=/srv/tftpboot:/tftpboot
container quadlet /etc/containers/systemd/pihole.container
[Unit]
Description=pihole container
Wants=network-online.target
After=network-online.target nss-lookup.target

[Container]
Image=docker.io/pihole/pihole:latest
ContainerName=pihole
HostName=pihole.ohs.lan
IP=192.168.2.254
Network=macvlan.network

# extra caps
AddCapability=NET_ADMIN CAP_NET_RAW NET_RAW

# Enable auto-update container
AutoUpdate=registry

Volume=/srv/container/pihole/etc-pihole:/etc/pihole
Volume=/srv/container/pihole/etc-dnsmasq.d:/etc/dnsmasq.d
Volume=/srv/tftpboot:/tftpboot

Environment=TZ=Europe/Berlin
Environment=WEBPASSWORD=piholepw

[Service]
Restart=always
TimeoutStartSec=900

[Install]
WantedBy=default.target

nothing special was configured in previous release i think.

Greetings

This is no longer a valid environment variable, though probably not directly related to your issue.

https://docs.pi-hole.net/docker/upgrading/v5-v6/

1 Like

Yes, the variable will be removed, thank you.
I have seen that there is a migration directory.

etc-pihole/migration_backup_v6

Unfortunately, I have later this day time to compare the configs.
Do you know if there was changes in pihole6 - dnsmasq related to pxe?

Thank you in advance.

From the dnsmasq CHANGELOG:

  57         Add --dhcp-option-pxe config. This acts almost exactly like
  58         --dhcp-option except that the defined option is only sent when
  59         replying to PXE clients. More importantly, these options are sent
  60         in reply PXE clients when dnsmasq in acting in PXE proxy mode. In
  61         PXE proxy mode, the set of options sent is defined by the PXE standard
  62         and the normal set of options is not sent. This config allows arbitrary
  63         options in PXE-proxy replies. A typical use-case is to send option
  64         175 to iPXE. Thanks to Jason Berry for finding the requirement for
  65         this.
  66
  67         Support PXE proxy-DHCP and DHCP-relay at the same time.
  68         When using PXE proxy-DHCP, dnsmasq supplies PXE information to
  69         the client, which also talks to another "normal" DHCP server
  70         for address allocation and similar. The normal DHCP server may
  71         be on the local network, but it may also be remote, and accessed via
  72         a DHCP relay. This change allows dnsmasq to act as both a
  73         PXE proxy-DHCP server AND a DHCP relay for the same network.

That's it.

1 Like

@DL6ER i dont know how to set dhcp-option-pxe and tried various things.
So far I had no luck to get pxe running with v6. Pis stuck always @ rainbow splash.

The bootfiles have the correct permissions (chmod -R 755 /srv/tftpboot)

As a workaround the container was downgraded, and pxe worked again like expected :frowning:

image=docker.io/pihole/pihole:2024.07.0
container quadlet /etc/containers/systemd/pihole.container
[Unit]
Description=pihole container
Wants=network-online.target
After=network-online.target nss-lookup.target

[Container]
#Image=docker.io/pihole/pihole:latest
Image=docker.io/pihole/pihole:2024.07.0

ContainerName=pihole
HostName=pihole.ohs.lan
IP=192.168.2.254
Network=macvlan.network

AddCapability=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_CHOWN
AutoUpdate=registry

Volume=/srv/container/pihole/etc-pihole:/etc/pihole
Volume=/srv/container/pihole/etc-dnsmasq.d:/etc/dnsmasq.d
Volume=/srv/tftpboot:/tftpboot

Environment=TZ=Europe/Berlin
Environment=WEBPASSWORD=piholepw

[Service]
Restart=always
TimeoutStartSec=900

[Install]
WantedBy=default.target

Thanks @ all so far

Do you have any related logs from /var/log/pihole/pihole.log ?
It'd also be worth using some tool like tcpdump to record a pcap from the working and the non-working containers so we can do an in-depth debugging looking at the differences between the two.

When passing some DHCP Options like 43 for example you need to encode the stuff you are sending to the Client in a certain format : Maybe you need to do this too from now on ?!

/Very wild guess...