9

Problem: I've successfully upgraded a RasPi 3B+ dev box from Buster to Bullseye. However, when the Pi boots up, there is no internet connection.

Background:

  • Boot up showed a [FAILED] entry of: Failed to start DHCP Client Daemon.
  • $ sudo service dhcpcd start creates a syslog entry stating:
    • dhcpcd.service: Failed at step EXEC spawning /usr/lib/dhcpcd5/dhcpcd: No such file or directory
  • Downloaded and installed dhcpcd5.
    • Unsure why this wasn't already part of the dist-upgrade (?)
  • Boot up now shows the [FAILED] entry of: Failed to start dhcpcd on all interfaces
  • The only interface shown in ifconfig is lo.

I have reviewed this question to no avail, primarily because my other Pis (all running Buster) do not use the interfaces file as the static IPs are assigned by dnsmasq on the network server (another Pi).

Question: I'm a systems developer, so networking internals aren’t my strongest subject. Where should I be looking to have the eth0 (or equivalent) interface become available - or is this just a case of Bullseye not being ready yet?

Please let me know if you need further information.

s3dev
  • 229
  • 2
  • 13

6 Answers6

2

If you followed the advice to perform a fresh installation you would have no problem (at least with networking - there are other issues with Bullseye).

There are others reporting the same issue (which is caused by upgrading installing another network manager connman).

There are other issues, including missing eth0.

Milliways
  • 62,573
  • 32
  • 113
  • 225
2

I had the same problem, and sudo apt purge connman fixed it after the fact.

However losing your network connection while doing a remote upgrade causes a lot of trouble. I have not tested it, but in theory adding these lines to /etc/apt/preferences in advance should prevent connman from getting installed in the first place:

Package: connman
Pin: origin ""
Pin-Priority: -1

If you try that, please leave a comment reporting your luck with it.

The discouraging official “How to upgrade a Buster image to Bullseye” thread mentions other issues you might run into with an in-place upgrade, e.g.,

When it completes, edit /boot/config.txt. Comment out any lines which contain "dtoverlay=vc4-fkms-v3d" by putting a # sign at the start of the line. At the bottom of the file, in the [all] section, add the line "dtoverlay=vc4-kms-v3d" - note that is "kms", not "fkms".

so it might be worth perusing too.

andrewdotn
  • 121
  • 2
1

For anyone that's got here via an ill-advised upgrade from buster and needs to get up and running quickly (pending a fresh install at some later date), simply disable dhcp and enable a static IP address via networking as per the section Network Interfaces Method in: How do I set up networking/WiFi/static IP address on Raspbian/Raspberry Pi OS?

RCross
  • 111
  • 2
1

Error is in file /etc/systemd/system/dhcpcd.service.d/wait.conf

change it to

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

do sudo systemctl daemon-reload && sudo systemctl restart dhcpcd and your back online and your network interface like eth0 and wlan0 appear again and are up.

Source: https://forums.raspberrypi.com/viewtopic.php?t=320383#p1918251 and also applied by myself to get device online again.

Hannes
  • 258
  • 1
  • 5
1

Fixing Network Connection After In Place Upgrade from Buster to Bullseye

I had this same problem after my in place upgrade on my PI 3+ following the official instructions (which also officially recommends NOT to do an in-place upgrade - I did so as I didn't want to lose my various configurations). I followed the instructions carefully and my upgrade went fine except I lost internet connection which is a pain on a headless install. The problem turned out to be that the upgrade put my ethernet interface down. Steps below describe how to set your IP to a dynamic IP, using a static ip temporarily to get online.

  1. Login locally (I had to connect a keyboard and display to my headless PI).

  2. sudo ip link This will show you your interfaces. Look for the one that says "Down". Since I'm using ethernet it was prefaced with "en" and entitled enxb827eb41301b

  3. Assign the static IP address you want for your Pi:

    ip addr add [Static IP Address]/[subnet mask] dev [interface name]

  4. Bring the interface up:

    ip link set enxb827eb41301e up

  5. Assign your gateway (you'll need to know your gateway ip address for your router):

    ip route add default via 192.168.1.1

Example

A complete set of command would look something like this:

      ip addr add 192.168.1.110/24 dev enxb827eb41301b
  ip link set enxb827eb41301e up

  ip route add default via 192.168.1.1

Test

To test, do a ip addr to make sure your interface is up. Then to check if all is working ping [gateway ip] then ping google.com.

This will give you internet access but only temporarily. Follow the rest of the steps to make sure your settings carry over reboots.

Install Network Manager

sudo apt-get install network-manager

systemctl start NetworkManager.service

systemctl enable NetworkManager.service

Configure Interface in Network Manager

sudo nmcli con edit enxb827eb41301b

nmcli> print ipv4

nmcli> set ipv4.method auto (respond yes to clear the addresses)

nmcli> set ipv4.addresses 192.168.1.110/24 (say NO when it asks you to change it back to manual)

nmcli> set connection.autoconnect true

nmcli> print ipv4 (confirm your changes were made)

"nmcli> save`

"nmcli> quit`

If you want to keep your manual setup leave ip4.method manual.

Now reboot. Hopefully it all works.

CoderBlue
  • 111
  • 1
0

The following answer solved this for me (thank you @moo and @Ivan):

Summary:

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

Then reload/restart the service:

sudo systemctl daemon-reload
sudo systemctl restart dhcpcd

Rationale

When inspecting the /etc/systemd/system/dhcpcd.service.d/wait.conf file, as suggested by @Hannes here, I saw the path /usr/lib/dhcpcd5/dhcpcd did not exist. However, the dhcpcd executable does exist here: /usr/sbin/dhcpcd - hence the linked solution.

s3dev
  • 229
  • 2
  • 13