Upgrading from Debian Buster to Bullseye Notes
Typically upgrading between Debian releases (e.g. from 10 to 11) is pretty smooth. You just need to edit your /etc/apt/sources.list
file and replace any instances of “buster” with “bullseye” or whatever the release names are that you're upgrading to/from. But when I was upgrading my Raspberry Pis from Buster to Bullseye I ran into an issue with DHCPCD that prevented the system from getting a DHCP address when rebooting. Plus SystemD's “predictable interface names” setting forced itself back on and also broke things.
I'd recommend making these changes after the update, and before you reboot so you don't have to hit up the physical console.
Fix DHCPCD
DHCPCD can't start after the upgrade because the location of the binary changed, and the SystemD unit file wasn't updated. This may have been one of the file changes that I was prompted on whether to keep or change during the upgrade, but either way the fix is to update /etc/systemd/system/dhcpcd.service.d/wait.conf
to read:
[Service] ExecStart= ExecStart=/usr/sbin/dhcpcd -q -w
Note: I'm not quite sure why there were two ExecStart=
lines, but it only uses the latest (second) value so it doesn't affect anything that I can tell, and I don't want to remove it in case it's needed somehow.
Disable Predictable Interface Names
Now this fix is just a personal preference, but the “predictable interface names” on my Raspberry Pi machines are always awful and I much prefer the old eth0
-esque names. This does introduce the possibility for a race condition where another network interface may take the name before the primary network interface initializes, but on Raspberry Pi you're likely not going to be adding many (if any) extra network interfaces. Thus I leave the new interface names on for my non-Raspberry Pi servers, and use the old names for my Raspberry Pis.
The simplest way to make this change is to use raspi-config
which is the Raspberry Pi system config tool. First run that tool as root/with sudo, and go to Advanced Options.
Select Network Interface Names.
You'll be prompted whether you want them enabled or disabled, so select “No” for disabled.
Hit tab twice and enter to finish.
Finally reboot your system. (Or do so later…)
Reboot
Now you can safely reboot the system (if you haven't already triggered it from the config tool) to let the package upgrades take over, or just restart the dhcpcd
service if you've already rebooted post-upgrade and are trying to fix the networking.
Good luck!