Coding with Titans

so breaking things happens constantly, but never on purpose

Problem with DHCP on Raspberry Pi after update to bullseye

Yet we meet again here. If you landed on this page it means you are also hit by a problem with remote login into recently upgraded Raspberry Pi. Isn’t the RaspberryOS bullseye running as smooth as the previous version? Somehow the device doesn’t appear on the local network at all. How is that even possible? And the second yes, you really have to take it from top of the wardrobe or from other silent place in home, where it did a hard job as a headless server and plug it into the monitor and keyboard. That is the only way to make the DHCP server again, that got broken during the system upgrade process!

This time I have no logs, nor screenshot captured. I was so shocked that this thing happened (since I was doing a parallel upgrade for my 3 devices, one of them with PiHole as local DNS) that I didn’t think about it. Back from my memory I can only say, I’ve seen several [FAILED] log lines during the machine boot, once it was later connected to the monitor and I was restarting it several times, trying to find the root cause. Those entries were saying, that DHCP server had problems starting. That single failure essentially cut off the entire access to the device and outside of my entire network.

What I was doing at that time, I was following the marvelous buster to bullseye upgrade guide. However it missed one important step, before the reboot is executed after full upgrade of the distro. DHCP configuration file, located here: /etc/systemd/system/dhcpcd.service.d/wait.conf should be deleted as it points to the non-existing DHCP deamon binary. Or path could be tweaked (deletion seems a much quicker/simpler solution). I have found this advice here on Raspi forum.

$ sudo rm /etc/systemd/system/dhcpcd.service.d/wait.conf

And that’s it. After this simple change it will run smooth again.

If you like to fix the path, you can edit the ExecStart variable from:

ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w


ExecStart=/usr/sbin/dhcpcd -q -w

It should have similar effect as the “deletion”-based fix.

I hope it helps!