So to upgrade Raspbian, as it was previously called, from Buster to Bullseye went smooth an easy, I tried this with some Pi2B (armhf 32Bit) and with a Pi4. These two are headless systems, so I don’t know if this works well for any systems with window managers.
Better run these commands in screen, so when the SSH connection is interrupted you can reconnect and resume your work.
Edit: For the update there is a culprit, it will cause a problem with dhcpd, so before the reboot 13. (was point 12. before I added the remark below) please check this post.
Steps to update:
- sudo apt update
- sudo apt dist-upgrade -y
- sudo rpi-update
- sudo reboot
- sudo apt remove libc6-dev
- Edit the file /etc/apt/sources.list, change all occurrences of buster to bullseye.
- Edit the file /etc/apt/sources.list.d/raspi.list, change all occurrences of buster to bullseye.
- sudo apt update
- sudo apt install libgcc-8-dev gcc-8-base
- Instead of sudo apt install better use my update script, just run ~/up “libgcc-8-dev gcc-8-base” (incl. the “quotation marks”) and skip steps 8., 9., 10. and 11. It doesn’t matter when you already executed step 8..
- sudo apt dist-upgrade
- sudo apt autoclean
- Please edit the file /etc/systemd/system/dhcpcd.service.d/wait.conf, change the path in there from /usr/lib/dhcpcd5/dhcpcd to /usr/sbin/dhcpcd, see here for long version.
- sudo reboot
Somewhere along the way there will be a warning that “libc6-dev” can not be upgrade (or so) as it breaks “libgcc-8-dev”, this is the reason for step 5. and 9..
Edit: On the Pi4 I got:
The following packages have unmet dependencies:
libgcc1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
Which I solved by “sudo apt-get remove libgcc1” and then I just restarted with either point 8. from above, but in my case with “~/up libgcc-8-dev”.
I prefer to update or install packages with this script.
first inspiration from here.