4

This is a non problem. DO NOT attempt "upgrade" - follow the advice to do a fresh install, NOT a kludge to "fix" the "problem".

I did an upgrade to Bullseye and rebooted. I can't login with ssh (also he does not answer ping) and on screen I see the error Failed to start DHCP Client Daemon.

Now the big problem: the pi password is something like qQvXHXGu8,ee]=0-_y8.XcIqyJG0Y4I}7Wm?r}IvRCo#e,Rgp3K//jh~0a/Uq;] and I can't type this with keyboard (without doing a human error).

How to fix this remotely or with editing files on SDcard?

enter image description here

If it matters, my router is OpenWrt based.

2
  • 2
    By the way, upgrading to bullseye is not officially supported on the Raspberry pi (come on Pi Foundation, get your act together, dudes) ... however, I've successfully upgraded several pi's (3B and 4B) ... the one that failed was the 3A ... it seems when you have wifi, upgrade borks (my B boards do NOT use wifi) - having said that, the B boards use NetworkManager and the A board used the "stock" dhcpcd5 for network management, perhaps it's dhcpcd5 that breaks the upgrade
    – Bravo
    Nov 20, 2021 at 22:08
  • The one that failed for me was a 3A as well
    – Mark
    Mar 29 at 18:48

3 Answers 3

4

This occurs following dist-upgrade to bullseye and prevents the Pi from getting network access.

Further to the answer from @Ivan (which fixed this problem for me), you can make the necessary change to the DHCP configuration with one command:

sed -i 's|/usr/lib/dhcpcd5/dhcpcd|/usr/sbin/dhcpcd|g' /etc/systemd/system/dhcpcd.service.d/wait.conf

For a headless pi, this will prevent SSH access - you will require KVM access to make this change. Alternatively, you can use a Debian rescue disk to make changes to the ext4 partition. I haven't found an easy way to do this via a change to the /boot/ partition (so not easily sortable from non-Linux OS).

2
  • 1
    I haven't really tried it, but there is the init= which you can append to the end of the line of cmdline.txt. In theory, it should be possible to put the above command in a script on the boot partition and reference it in the init parameter
    – hanjo
    Mar 28 at 19:21
  • @hanjo I spent a long time trying to script this update as I didn't have a keyboard or a Linux machine to read the ext4 partition. Unfortunately, I couldn't get it to work by changing anything on the boot partition (tried several times). This is a partial solution but still useful! Post if you manage to fix the issue by putting a script on the boot partition and will definitely upvote your answer
    – Mark
    Mar 28 at 21:04
12

There is a fix for this "Failed to start DHCP Client Daemon" on Updated to Bullseye, needed to change my dhcpcd.conf reddit thread for anyone that has the same problem with Failed to start DHCP deamon

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

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

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

and DHCP works.
I had the same problem with dhcpcd service or RPI 4. This fixed it.
(Of course after you fix the password issue).

2

(Before doing this process, BACK UP THE CARD!!!!! Copy it's contents onto another sd card. If something wrong happens, the result could be TERRIBLE!)

To reset the password, You need to put the os sd card in another computer. Then, go on it, navigate to /boot/cmndline.txt like so.enter image description here

Edit it; add at the end init=bin/sh like this. enter image description here Then save the changes, and eject the disk. (In this, as you might notice, this file belongs to the computer's file system. In your case, you would alter the disk's file system. I am doing this on raspbian bullseye with a changed theme and this is just an example to give you an idea on how to do it.) Insert the disk into the pi, and boot it. The pi will not complete the boot, and you will have an error, and a blinking prompt. Type mount -o remount, rw / and hit enter. Wait for the cursor, then, type passwd pi and hit enter. Then, it will ask you for the new password. Type it, then push enter. If it says you have a weak password, then, make it stronger. When It likes your password, it will say "Password was changed successfully" Then, type sync and push enter. Then type exec /sbin/init and push enter. It will do some processing, then ask for your login. Type your new password. Shutdown, and undo the changes that you made to /boot/cmndline.txt by deleting the init=bin/sh part at the end of the line. Now, eject the card, put it back in the pi, boot, and you're all set!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.