Raspberry Pi inaccessible on network as DHCPD gets replaced

Solved: Failed to Start DHCP Client Daemon After Upgrade to Bullseye (Raspberry Pi)

I upgraded one of my Raspberry Pis running FullPageOS to Debian Bullseye (Debian 11). It was running Debian Buster for a couple of years but that meant end of life and no more upgrades including LTS after July 2024.

Upgrade from Debian 10 to Debian 11

I decided to run the upgrade using first

apt update && apt upgrade

And after this part was done running

apt dist-upgrade

Full upgrade seemed to have some dependency issues but I was able to fix that. However on rebooting Debian Bullseye was suddenly unreachable.

DHCP not working – IP address not assigned

I could see this error when watching RPi booting up:

Failed to start DHCP Client Daemon

Since I had watchdog running, it would just restart Raspberry Pi after a while. This issue is well-known and described at forums or on blogs.

Solution – fixing DHCP

Interrupting boot process and switching to terminal, you need to run as root to edit config file:

sudo joe /etc/systemd/system/dhcpcd.service.d/wait.conf

Edit the file from:

[Service]
ExecStart=
ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -w

and change the last line to different DHCPD as the dhcpcd5 has been removed on upgrade and replaced by dhcpcd under this path:

[Service]
ExecStart=
ExecStart=/usr/sbin/dhcpcd -q -w

Save and restart the DHCP daemon as root:

sudo service dhcpcd restart

Once you restart DHCPD you should be able to check using ifconfig or ping that Raspberry Pi has been assigned an IP address and you are now able to access local network / internet.


Have a comment? Join discussion on Mastodon as a reply to: @dusoft@fosstodon.org