-
-
Save jauderho/5f73f16cac28669e56608be14c41006c to your computer and use it in GitHub Desktop.
| ### WARNING: READ CAREFULLY BEFORE ATTEMPTING ### | |
| # | |
| # Officially, this is not recommended. YMMV | |
| # https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/ | |
| # | |
| # This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit | |
| # | |
| # Credit to anfractuosity and fgimenezm for figuring out additional details for kernels | |
| # | |
| # Make sure everything is up-to-date | |
| sudo apt-get -y update && sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade | |
| # Point to bookworm repos instead | |
| sudo sed -i -e 's/bookworm/trixie/g' /etc/apt/sources.list | |
| sudo sed -i -e 's/bookworm/trixie/g' /etc/apt/sources.list.d/raspi.list | |
| # Contents of /etc/apt/sources.list | |
| deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware | |
| deb http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware | |
| deb http://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware | |
| # Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source' | |
| #deb-src http://deb.debian.org/debian trixie main contrib non-free | |
| #deb-src http://security.debian.org/debian-security trixie-security main contrib non-free | |
| #deb-src http://deb.debian.org/debian trixie-updates main contrib non-free | |
| # Contents of /etc/apt/sources.list.d/raspi.list | |
| deb http://archive.raspberrypi.org/debian/ trixie main | |
| # Uncomment line below then 'apt-get update' to enable 'apt-get source' | |
| #deb-src http://archive.raspberrypi.org/debian/ trixie main | |
| # Do actual update. See also https://forums.raspberrypi.com/viewtopic.php?t=389477 | |
| sudo apt update | |
| sudo apt full-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" --purge --auto-remove rpd-wayland-all+ rpd-x-all+ | |
| sudo apt -y clean && sudo apt -y autoremove | |
| # Reboot | |
| sudo reboot | |
| # Modernize sources | |
| sudo apt modernize-sources | |
| # Make sure the following is in /etc/apt/sources.list.d/raspi.sources. The Signed-by: may be missing | |
| Types: deb | |
| URIs: http://archive.raspberrypi.org/debian/ | |
| Suites: trixie | |
| Components: main | |
| Signed-By: /usr/share/keyrings/raspberrypi-archive-keyring.gpg | |
| # Remove the raspi.list.bak after confirming that everything works | |
| sudo rm /etc/apt/sources.list.d/raspi.list.bak |
I jumped on it and used this gist for upgrading from bookworm to trixie. I am running a Pi5 8GB headless (no UI) and am mostly using lots of docker containers.
All went smoothly and so far everything I looked at works just fine (including docker).
Thanks!
Maybe nice to know this is not working with docker and docker-compose. The upgrade will fail.
docker-compose is now part of the docker CLI (accessible as docker compose no dash, no additional package needed). Uninstall docker-compose before the upgrade. You no longer need it. If your upgrade fails you can force uninstall with sudo dpkg --remove --force-remove-reinstreq docker-compose and continue the upgrade process.
Now with the official announcement (https://www.raspberrypi.com/news/trixie-the-new-version-of-raspberry-pi-os/) out and the linked upgrade topic (https://forums.raspberrypi.com/viewtopic.php?t=392376) I am wondering, which guide has the better (confirmed working, more robust) approach:
* A) This unofficial guide here https://gist.github.com/jauderho/5f73f16cac28669e56608be14c41006c * B) This official guide https://forums.raspberrypi.com/viewtopic.php?t=392376Did not fully compare them yet but just wondering related to the differences what's the reason for them.
For me the official guide did not work and I ended up with a missing Desktop Environment. However, following this gist instead worked perfectly!
Anyone try this on lite? Would that just be excluding rpd-wayland-all+ rpd-x-all+
Yup, I did it on headless lite and just skipped the Wayland & X stuff - it worked well.
my RPI 4, broke the book, a lot of modules stop working included the internet, so I had to flash using RPI image, and then lost (I have a backup) all the currenct settings
Thank you very much for the instructions 👍. It worked without any problems on 5x Raspberry's. Various server software and containers are installed, but everything runs smoothly.
Tried this yesterday on my 3B+ running PiHole and PiVPN, complete success ! Not even a service interruption if not for the final reboot. This is a great guide, thank you
Minor irrelevant typo:
# Point to bookworm repos instead
Plus you are linking to an old, probably superseded forums topic here:
# Do actual update. See also https://forums.raspberrypi.com/viewtopic.php?t=389477
See a newer forums post with a bit different/enhanced information in my still unanswered question post at https://gist.github.com/jauderho/5f73f16cac28669e56608be14c41006c?permalink_comment_id=5786287#gistcomment-5786287 @jauderho
I gave a headless test Pi 2 running 32 bit, platform armv7l a try - the upgrade worked good so far. Unfortunately, full-upgrade gave
update-initramfs: Generating /boot/initrd.img-6.12.62+rpt-rpi-v7l
WARNING: Unsupported initramfs version (6.12.62+rpt-rpi-v7l) - skipping setup
NOTE: Manual boot configuration may be required
and according to uname -a the kernel is still on old Linux Hostname 6.1.70-v7+ #1714 SMP Thu Jan 4 14:48:23 GMT 2024 armv7l GNU/Linux.
Any idea why? I did also modernize sources later, which made no difference unfortunately.
I worked around this (ended up) using sudo rpi-update unfortunately. That bumped the kernel to
Linux Hostname 6.12.73-v7+ #1947 SMP Thu Feb 19 12:27:25 GMT 2026 armv7l GNU/Linux
sudo apt policy raspberrypi-kernel
Hinweis: Paket raspberrypi-kernel kann nicht gefunden werden.
sudo dpkg -l 'linux-image*' | grep ^ii | grep -i meta
ii linux-image-rpi-v7l 1:6.12.62-1+rpt1~bookworm armhf Linux for Raspberry Pi v7 (meta-package)
sudo apt-cache policy linux-image-rpi-v7l
linux-image-rpi-v7l:
Installiert: 1:6.12.62-1+rpt1~bookworm
Installationskandidat: 1:6.12.62-1+rpt1~bookworm
Versionstabelle:
*** 1:6.12.62-1+rpt1~bookworm 100
100 /var/lib/dpkg/status
So I'm not sure why there's no raspberrypi-kernel package for armhf under Trixie in the sources anymore.
I gave a headless test Pi 2 running 32 bit, platform
armv7la try - the upgrade worked good so far. Unfortunately,full-upgradegaveupdate-initramfs: Generating /boot/initrd.img-6.12.62+rpt-rpi-v7l WARNING: Unsupported initramfs version (6.12.62+rpt-rpi-v7l) - skipping setup NOTE: Manual boot configuration may be requiredand according to
uname -athe kernel is still on oldLinux Hostname 6.1.70-v7+ #1714 SMP Thu Jan 4 14:48:23 GMT 2024 armv7l GNU/Linux.Any idea why? I did also modernize sources later, which made no difference unfortunately.
I worked around this (ended up) using
sudo rpi-updateunfortunately. That bumped the kernel toLinux Hostname 6.12.73-v7+ #1947 SMP Thu Feb 19 12:27:25 GMT 2026 armv7l GNU/Linuxsudo apt policy raspberrypi-kernel Hinweis: Paket raspberrypi-kernel kann nicht gefunden werden. sudo dpkg -l 'linux-image*' | grep ^ii | grep -i meta ii linux-image-rpi-v7l 1:6.12.62-1+rpt1~bookworm armhf Linux for Raspberry Pi v7 (meta-package) sudo apt-cache policy linux-image-rpi-v7l linux-image-rpi-v7l: Installiert: 1:6.12.62-1+rpt1~bookworm Installationskandidat: 1:6.12.62-1+rpt1~bookworm Versionstabelle: *** 1:6.12.62-1+rpt1~bookworm 100 100 /var/lib/dpkg/statusSo I'm not sure why there's no
raspberrypi-kernelpackage for armhf under Trixie in the sources anymore.
Check the bullseye to bookworm guide. You are supposed to remove those and replace with the correct newer kernel packages.
Also /boot becomes /boot/firmware it’s important to not skip steps.
Check the bullseye to bookworm guide. You are supposed to remove those and replace with the correct newer kernel packages.
Also /boot becomes /boot/firmware it’s important to not skip steps.
Thanks for the hint.
I checked this on a Raspberry Pi 2 (armhf) after upgrading to Trixie:
- The system uses the new /boot/firmware layout (boot partition is mounted there):
$ ls /boot
cmdline.txt config.txt initrd.img-6.12.25+rpt-rpi-v7l System.map-6.12.62+rpt-rpi-v7l
config-6.12.25+rpt-rpi-v7l firmware initrd.img-6.12.62+rpt-rpi-v7l vmlinuz-6.12.25+rpt-rpi-v7l
config-6.12.62+rpt-rpi-v7l firmware.bak System.map-6.12.25+rpt-rpi-v7l vmlinuz-6.12.62+rpt-rpi-v7l
$ ls /boot/firmware
bcm2708-rpi-b.dtb bcm2710-rpi-cm3.dtb bcm2712-rpi-cm5-cm4io.dtb fixup_cd.dat start4cd.elf
bcm2708-rpi-b-plus.dtb bcm2710-rpi-zero-2.dtb bcm2712-rpi-cm5-cm5io.dtb fixup.dat start4db.elf
bcm2708-rpi-b-rev1.dtb bcm2710-rpi-zero-2-w.dtb bcm2712-rpi-cm5l-cm4io.dtb fixup_db.dat start4.elf
bcm2708-rpi-cm.dtb bcm2711-rpi-400.dtb bcm2712-rpi-cm5l-cm5io.dtb fixup_x.dat start4x.elf
bcm2708-rpi-zero.dtb bcm2711-rpi-4-b.dtb bootcode.bin initramfs7l start_cd.elf
bcm2708-rpi-zero-w.dtb bcm2711-rpi-cm4.dtb cmdline.txt issue.txt start_db.elf
bcm2709-rpi-2-b.dtb bcm2711-rpi-cm4-io.dtb config.txt kernel7.img start.elf
bcm2709-rpi-cm2.dtb bcm2711-rpi-cm4s.dtb config.txt.bak kernel7l.img start_x.elf
bcm2710-rpi-2-b.dtb bcm2712d0-rpi-5-b.dtb fixup4cd.dat kernel.img 'System Volume Information'
bcm2710-rpi-3-b.dtb bcm2712-d-rpi-5-b.dtb fixup4.dat LICENCE.broadcom
bcm2710-rpi-3-b-plus.dtb bcm2712-rpi-500.dtb fixup4db.dat LICENSE.oracle
bcm2710-rpi-cm0.dtb bcm2712-rpi-5-b.dtb fixup4x.dat overlays
$ lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
mmcblk0
├─mmcblk0p1 vfat FAT32 BOOT xxxx-xxxx 963,6M 6% /boot/firmware
More importantly:
- The system correctly migrated to the new kernel scheme (linux-image-rpi-v7l)
- But no kernel packages are available in the Trixie repositories for armhf
apt policy linux-image-rpi-v7lonly shows a locally installed Bookworm version (no candidate)apt-cache/apt listreturn no newer versions at all
So the system ends up with an orphaned Bookworm kernel that cannot be upgraded via apt.
As a workaround, I was only able to get a newer kernel via rpi-update (now running 6.12.73-v7+ #1947 SMP Thu Feb 19 12:27:25 GMT 2026 armv7l GNU/Linux since the last run in February), which suggests that newer kernels exist but are not yet published via apt for armhf.
This looks like a repository / packaging gap for armhf rather than just a missed migration step.
Today I sudo apt upgraded two Trixie test systems:
- Raspberry Pi 2, headless, 32 bit, kernel upgraded in February from Pi OS 12.12 to 13.2 following this HOWTO but using "sudo rpi-update", now running
6.12.73-v7+ #1947 SMP Thu Feb 19 12:27:25 GMT 2026 armv7l GNU/Linux
--> today after upgraded to Pi OS 13.4, kernel still at6.12.73-v7+ #1947 SMP Thu Feb 19 12:27:25 GMT 2026 armv7l GNU/Linux - Raspberry Pi 4, with UI, 64 bit, kernel upgraded in March from Pi OS 12.13 to 13.3 following this HOWTO only using regular apt packages, now running
6.12.62+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.62-1+rpt1 (2025-12-18) aarch64 GNU/Linux
--> today after upgraded to Pi OS 13.4 kernel got upgraded to6.12.75+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux
Furthermore, two more Pi's still running Bookworm:
- Pi 5, 64 bit, Pi OS 12.13, kernel
6.12.75+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1~bookworm (2026-03-11) aarch64 GNU/Linux - Pi 3B+, 32 bit, Pi OS 12.12, kernel
6.1.77-v7+ #1768 SMP Tue Jun 4 14:45:11 BST 2024 armv7l GNU/Linux
That kind of proves my theory: there simply are no kernel updates for 32 bit on armv7l architecture (neither on Bookworm, nor on latest Trixie). Experts, please prove me wrong, but 32 bit seems to be stuck on older kernels, except when running sudo rpi-update.
Now with the official announcement (https://www.raspberrypi.com/news/trixie-the-new-version-of-raspberry-pi-os/) out and the linked upgrade topic (https://forums.raspberrypi.com/viewtopic.php?t=392376) I am wondering, which guide has the better (confirmed working, more robust) approach:
Did not fully compare them yet but just wondering related to the differences what's the reason for them.