1

I've built a custom Debian Live CD (using live-boot and containing a kernel, initrd and a filesystem.squashfs) which includes specific tools we regularly use. The Live CD works flawlessly if booted directly from USB pen drive, from the ISO file (in VMs) or burned to CD and NetworkManager, which is installed, correctly updates resolv.conf. Booting the system via PXE/TFTP is again no problem, but unfortunately NetworkManager detects the network device used for PXE booting as "connected (externally)", and thus does not update the DNS settings. As soon as I set the NIC "down" via nmcli, NetworkManager reactivates the interface and then correctly updates resolv.conf to contain the values received via DHCP.

Is there any option/setting to tell NetworkManager to also manage previously activated NICs? Of course I could add a custom step deactivating the PXE NIC before NetworkManager gets started, but I'd very much like to not use such rather ugly workarounds.

Thanks in advance.

Apollo13
  • 73
  • 3
  • having the same problem on mint 21. this did not happen with mint 20. the workaround we're using now is to add the dns server to systemd-resolved via script at the end of the bootup process. very annoying. it would be nice to find the root cause of this and fix it. – wes Nov 10 '22 at 20:10

1 Answers1

0

Try defining the DNS servers at kernel PXE boot command line using the following variables

IPV4DNS0=8.8.8.8 IPV4DNS1=8.8.4.4

of course you can use different DNS servers

Pat
  • 3,519
  • 2
  • 17
  • 17
  • it seems to me that the problem is not that the system is not receiving dns servers in response to its dhcp request, the problem is that it's just not applying them. as such, I would be surprised if specifying them in the kernel parameters will help. editing resolv.conf helped (until systemd-resolved overwrote it) and running something like resolvectl [interface] [dns server] also helped. the latter can at least be scripted. this is still a hacky workaround and there is definitely still a bug to be uncovered here. – wes Nov 10 '22 at 19:55