Upgrading your Raspberry Pi to Bullseye
Raspberry Pi recently released a new version of their Raspberry Pi OS, namely Bullseye. As you can see below, this upgrade is in line with Raspberry Piβs release policy where the OS receives a major update every 2 years:
Release date | Debian version |
---|---|
π September 2013 | π¦ Wheezy |
π September 2015 | π¦ Jessie |
π August 2017 | π¦ Stretch |
π June 2019 | π¦ Buster |
π November 2021 | π Bullseye π |
This gets the OS back on track with the latest Debian release (Debian 11 aka Debian bullseye), which was released 2 months ago.
Checking current version
My Raspberry Pi 3 Model B was still running the previous version (Debian buster):
lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
This also meant that the Linux kernel version also seemed to be pretty outdated π±:
uname -r
5.4.79-v7+
This means that in my case I will be upgrading from buster to bullseye. I havenβt tried upgrading from any older versions.
β οΈ Warning: Raspberry Pi recommends downloading the newest image and reinstalling instead of manually upgrading your system. Follow the below steps at your own risk and make sure youβve backed up your SD card before getting started.
With a major upgrade, we recommend downloading a new image, reinstalling any applications, and moving your data across from your current image. Debian major version upgrades contain a lot of changes, and it is very easy for some small tweak made somewhere in the system to be incompatible with some change you have made, and you can end up with a broken system and a Raspberry Pi that wonβt boot.
Upgrading
Update package sources
Letβs first update the Apt package sources. In my case they were still pointing to the buster ones. We need to make sure new and already installed packages use the bullseye version.
Edit the /etc/apt/sources.list
file and replace buster
by bullseye
:
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
old:
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
new:
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
Repeat the same steps for any other .list
files located in the /etc/apt/sources.list.d/
directory. In my case I had to make changes in 3 files:
...
πetc
βββ πapt
βββ πsources.list π
βββ πsources.list.d
βββ πdocker.list π
βββ πraspi.list π
Update packages
Update the package list from the repository and check for any new versions. This will show you how many packages can be updated, but wonβt actually update them:
sudo apt update
Get:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian bullseye InRelease [23.5 kB]
Get:3 https://download.docker.com/linux/raspbian bullseye InRelease [26.7 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages [13.2 MB]
Get:5 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [200 kB]
Get:6 https://download.docker.com/linux/raspbian bullseye/stable armhf Packages [5,486 B]
Get:7 http://raspbian.raspberrypi.org/raspbian bullseye/contrib armhf Packages [60.2 kB]
Get:8 http://raspbian.raspberrypi.org/raspbian bullseye/non-free armhf Packages [106 kB]
Get:9 http://raspbian.raspberrypi.org/raspbian bullseye/rpi armhf Packages [1,360 B]
Fetched 13.7 MB in 9s (1,561 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
443 packages can be upgraded. Run 'apt list --upgradable' to see them.
Install packages
Install 2 additional packages, which I suppose are needed to successfully complete the upgrade:
- π¦ libgcc-8-dev
- π¦ gcc-8-base
Run the following command to do so:
sudo apt install libgcc-8-dev gcc-8-base
Full upgrade
During this step weβll actually upgrade the O/S, update our packages and remove any currently installed packages which are needed to successfully complete the upgrade.
sudo apt full-upgrade
This process might take a while, and you will most likely get a couple of warnings like the one below:
Go through any warnings and make sure you understand them before hitting YES
.
Final touches
Once the actual upgrade has been completed we still need to modify the /boot/config.txt
file:
sudo nano /boot/config.txt
Scroll down to the bottom of the file and do the following:
- comment out the line containing
dtoverlay=vc4-fkms-v3d
- add a line containing
dtoverlay=vc4-kms-v3d
at the very bottom of the file
old:
...
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
new:
...
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
dtoverlay=vc4-kms-v3d
Save your changes and finally reboot your device:
sudo shutdown -r now
Wait a few moments for your Raspberry Pi to finish rebooting. If all went well, your Raspberry Pi should come up again and youβll now be running π― bullseye:
lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
uname -r
5.10.63-v7+
Comments