Error upgrade to Debian Trixie

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version |

    G_DIETPI_VERSION_SUB=16
    G_DIETPI_VERSION_RC=3
    G_GITBRANCH=‘master’
    G_GITOWNER=‘MichaIng’
    G_LIVE_PATCH_STATUS\[0\]=‘applied’
    G_LIVE_PATCH_STATUS\[1\]=‘applied’
    
    
  • Distro version | bookworm 0

  • Kernel version | Linux DietPi 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux

  • Architecture | arm64

  • SBC model | RPi 4 Model B (aarch64) or (EG: RPi3)

  • SD card used | (USB-Stick)

Additional Information (if applicable)

  • Bug report ID | 18136bd5-a3c2-400c-bceb-fc9aaede2744

I solved this error by manualy remove the installed kernel and then start the upgrade script.
Before reboot i installed the linux-image-rpi-v8 again without error.
After the reboot everything seems fine.
Thanks

You would need to share at least an error message. Otherwise it’s hard to assist

Sorry i thought that the error is visible in the Bug Report.
Now it is too late for the error message.

The bug report is visible for the developer only and automatically removed after 48h

btw, did you had more than 1 kernel version installed? And what did you remove? And why did you install a kernel again before reboot?

I got an error upgrading package linux-image-rpi-v8.
So i list all installed kernel with:
dpkg -l linux-image*
and removed all in the list and then start the update script again. Before i reboot after script finish i installed the package linux-image-rpi-v8 again. I think the system wil not boot without Kernel. :wink:

well you had 2 kernel version installed at the same time, causing the issue.

ii  linux-image-6.12.25+rpt-rpi-v8  1:6.12.25-1+rpt1                     arm64        Linux 6.12 for Raspberry Pi v8, Raspberry Pi
ii  linux-image-6.12.34+rpt-rpi-v8  1:6.12.34-1+rpt1~bookworm            arm64        Linux 6.12 for Raspberry Pi v8, Raspberry Pi

Normally, only one kernel version is installed at a time. Have you intentionally installed a different version in the past?

A few months earlier, i had copied the system from the SD card to a USB stick. I had some problems, maybe the second kernel was installed then. Otherwise, I only did an apt update and apt upgrade.

I tested it yesterday on a RP4 running older kernel version without any issue. Usually apt will install the new kernel while marking the old obsolet. Not sure how you end up having 2 installed.

I had the same problem when upgrading to trixie: I had 2 kernels and got some error at the end of the installation. I just made a reboot and the upgrade script continued (it ran apt autoremove) solving the conflict. Not sure what happened here, I never installed kernels maually.

but in this case you should get an error because apt fails

Yea I had some error, but can not remember. I did a hard reboot, the script did apt autopurge or so and then another reboot and everything worked.
I was a bit frustrated so I didn’t start to dig deeper what happend :sweat_smile:

Maybe because of this kernel hung task error, some people downgraded to the previous v6.12.25. And then probably set it on hold. The script is unholding all packages and I would expect defined APT package conflicts to lead to a removal of all old/conflicting kernel packages automatically on linux-image-rpi-v8 upgrade. But not ruled out that there is a quirk with this on distro upgrade, similar how this 6.12.34-1+rpt1~bookworm version is seen as newer than the 6.12.34-1+rpt1 on Trixie, since a suffix always formally mans higher version. Guess that could lead to conflicts, if linux-image-rpi-v8 aims to be upgraded e.g. from 6.12.25-1+rpt1 to 6.12.34-1+rpt1, requiring linux-image-6.12.34+rpt-rpi-v8 with the same version, but that one is on 6.12.34-1+rpt1~bookworm, hence it would be a downgrade (formally), which APT never does without interactive confirmation.

@Joulinar you have the bug report upload (has been autoremoved in the meantime).
In case you have no access, same with @Jappe, drop me a PM, then I can add credentials for you to access the bug reports.

Yes I was able to download the bug report. Will send it via mail.

@cebo29 your system is in a state that should never be possible: You have the new kernel/firmware package stack installed, but the FAT partition is mounted to /boot instead of /boot/firmware. Can you verify this:

df
cat /etc/fstab

But you have the raspi-firmware package installed, which actually checks for the /boot/firmware mount, otherwise aborts its installation in the first place. So it looks like the mount was somehow changed back.

dpkg -l raspi-firmware

Please also show the content of /boot, which might reveal some missing files, because they were previously moved to the underlying root filesystem:

ls -l /boot

@michaing Sorry for the late answer.

root@DietPi:~# df
Dateisystem           1K-Blöcke    Benutzt  Verfügbar Verw% Eingehängt auf
/dev/root             118512728   21074064   92601664   19% /
devtmpfs                1935720          0    1935720    0% /dev
tmpfs                   1969512      14668    1954844    1% /dev/shm
tmpfs                    787808      73372     714436   10% /run
tmpfs                      5120          0       5120    0% /run/lock
tmpfs                      1024          0       1024    0% /run/credentials/systemd-journald.service
tmpfs                   1968128          8    1968120    1% /tmp
tmpfs                     51200         32      51168    1% /var/log
/dev/sda1                258095      55126     202969   22% /boot
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/94b478378ec081ab059948bd912e8449f0e2be9499fdcd4b495ee63efdbe414a/merged
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/31a4a4d1e96c94e03e4d8b29cd3951f703a7f9a465349594f7ef14d0cb9b009b/merged
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/bcdceb20243db37156dbee181eedfef80ba867075774b283e8b73ce4ae5c4a73/merged
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/1e2225e9cf6346dd9307ad1d0acf9c6d351b910da01ac89e5dc052e61a2654ab/merged
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/852e8e0f51da152fd5b8014dbac3b6537f66b9d68050980f7857fbc7fca9974e/merged
tmpfs                      1024          0       1024    0% /run/credentials/getty@tty1.service
//10.1.1.200/public 17263253948 7838225712 9425028236   46% /mnt/samba
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/f88e608b8bd7ce267d27cb4a689e86402ebfc2d0856adbe14ec72a7231a8b9d7/merged
overlay               118512728   21074064   92601664   19% /mnt/dietpi_userdata/docker-data/overlay2/ea531e9af491bd30380eb2cd1912dce4054b8f11db7622b6f61a6f055fa6583d/merged
root@DietPi:~# cat /etc/fstab
# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
//10.1.1.200/public /mnt/samba cifs cred=/var/lib/dietpi/dietpi-drive_manager/mnt-samba.cred,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,nofail,noauto,x-systemd.automount

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1922M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf, glusterfs, mergerfs, bind, Btrfs subvolume
#----------------------------------------------------------------
/boot    /boot/firmware   none   bind 0 0

#----------------------------------------------------------------
# SWAP SPACE
#----------------------------------------------------------------


#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=8f4dbd00-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=8f4dbd00-01 /boot vfat noatime,lazytime,rw 0 2
root@DietPi:~# dpkg -l raspi-firmware
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name           Version        Architektur  Beschreibung
+++-==============-==============-============-================================================
ii  raspi-firmware 1:1.20250430-4 all          Raspberry Pi family GPU firmware and bootloaders
root@DietPi:~# ls -l /boot
insgesamt 52387
-rwxr-xr-x 1 root root   23946  1. Okt 2019  bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root   24205  1. Okt 2019  bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root   23723  1. Okt 2019  bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root   23671  1. Okt 2019  bcm2708-rpi-zero.dtb
-rwxr-xr-x 1 root root   24407  1. Okt 2019  bcm2708-rpi-zero-w.dtb
-rwxr-xr-x 1 root root   25293  1. Okt 2019  bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root   32495 26. Jun 11:35 bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root root   34687 26. Jun 11:35 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root   35322 26. Jun 11:35 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root root   33676 26. Jun 11:35 bcm2710-rpi-cm0.dtb
-rwxr-xr-x 1 root root   32258 26. Jun 11:35 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root   33664 26. Jun 11:35 bcm2710-rpi-zero-2.dtb
-rwxr-xr-x 1 root root   33664 26. Jun 11:35 bcm2710-rpi-zero-2-w.dtb
-rwxr-xr-x 1 root root   56243 26. Jun 11:35 bcm2711-rpi-400.dtb
-rwxr-xr-x 1 root root   56239 26. Jun 11:35 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root root   56760 26. Jun 11:35 bcm2711-rpi-cm4.dtb
-rwxr-xr-x 1 root root   39913 26. Jun 11:35 bcm2711-rpi-cm4-io.dtb
-rwxr-xr-x 1 root root   53502 26. Jun 11:35 bcm2711-rpi-cm4s.dtb
-rwxr-xr-x 1 root root   78439 26. Jun 11:35 bcm2712d0-rpi-5-b.dtb
-rwxr-xr-x 1 root root   78431 26. Jun 11:35 bcm2712-d-rpi-5-b.dtb
-rwxr-xr-x 1 root root   78391 26. Jun 11:35 bcm2712-rpi-500.dtb
-rwxr-xr-x 1 root root   78435 26. Jun 11:35 bcm2712-rpi-5-b.dtb
-rwxr-xr-x 1 root root   79149 26. Jun 11:35 bcm2712-rpi-cm5-cm4io.dtb
-rwxr-xr-x 1 root root   79215 26. Jun 11:35 bcm2712-rpi-cm5-cm5io.dtb
-rwxr-xr-x 1 root root   79190 26. Jun 11:35 bcm2712-rpi-cm5l-cm4io.dtb
-rwxr-xr-x 1 root root   79256 26. Jun 11:35 bcm2712-rpi-cm5l-cm5io.dtb
-rwxr-xr-x 1 root root   52476 30. Aug 16:16 bootcode.bin
-rwxr-xr-x 1 root root     142 26. Sep 2023  cmdline.txt
-rwxr-xr-x 1 root root  249091 26. Jun 11:35 config-6.12.34+rpt-rpi-v8
-rwxr-xr-x 1 root root    1601 23. Jun 23:14 config.txt
-rwxr-xr-x 1 root root   18693  1. Okt 2019  COPYING.linux
drwxr-xr-x 4 root root    3584 30. Aug 15:23 dietpi
-rwxr-xr-x 1 root root   13252  1. Apr 2024  dietpi.txt
-rwxr-xr-x 1 root root    3950  1. Jan 1980  dietpi-wifi.txt
drwxr-xr-x 5 root root    5632  1. Jan 1970  firmware
-rwxr-xr-x 1 root root    3230 30. Aug 16:16 fixup4cd.dat
-rwxr-xr-x 1 root root    5456 30. Aug 16:16 fixup4.dat
-rwxr-xr-x 1 root root    8449 30. Aug 16:16 fixup4db.dat
-rwxr-xr-x 1 root root    8449 30. Aug 16:16 fixup4x.dat
-rwxr-xr-x 1 root root    3230 30. Aug 16:16 fixup_cd.dat
-rwxr-xr-x 1 root root    7325 30. Aug 16:16 fixup.dat
-rwxr-xr-x 1 root root   10294 30. Aug 16:16 fixup_db.dat
-rwxr-xr-x 1 root root   10290 30. Aug 16:16 fixup_x.dat
-rwxr-xr-x 1 root root     145 13. Nov 2018  issue.txt
-rwxr-xr-x 1 root root 5310800  1. Okt 2019  kernel7.img
-rwxr-xr-x 1 root root 9666917 30. Aug 17:01 kernel8.img
-rwxr-xr-x 1 root root 5026968  1. Okt 2019  kernel.img
-rwxr-xr-x 1 root root    1594 30. Aug 16:16 LICENCE.broadcom
-rwxr-xr-x 1 root root   18974 13. Nov 2018  LICENSE.oracle
drwxr-xr-x 2 root root   32768  4. Jul 14:24 overlays
-rwxr-xr-x 1 root root  814140 30. Aug 16:16 start4cd.elf
-rwxr-xr-x 1 root root 3762408 30. Aug 16:16 start4db.elf
-rwxr-xr-x 1 root root 2263968 30. Aug 16:16 start4.elf
-rwxr-xr-x 1 root root 3011592 30. Aug 16:16 start4x.elf
-rwxr-xr-x 1 root root  814140 30. Aug 16:16 start_cd.elf
-rwxr-xr-x 1 root root 4834408 30. Aug 16:16 start_db.elf
-rwxr-xr-x 1 root root 2988128 30. Aug 16:16 start.elf
-rwxr-xr-x 1 root root 3735336 30. Aug 16:16 start_x.elf
-rwxr-xr-x 1 root root      83 26. Jun 11:35 System.map-6.12.34+rpt-rpi-v8
-rwxr-xr-x 1 root root 9666917 26. Jun 11:35 vmlinuz-6.12.34+rpt-rpi-v8

This doesn’t seems to be default. Did you have done this manually?

You are running the system from external drive without SD card?

Not consciously.
Yes SD card reader is empty.

Probably you followed some guide from elsewhere about how to upgrade the RPi kernel? The raspi-firmware requires /boot/firmware mount to exist, so this seems like a solution, but it causes several issues and risks, hence on DietPi updates we offer to do this differently. Let’s see how we can fix it on your system:

umount /boot/firmware
sed -i '\|/boot/firmware|d' /etc/fstab
/boot/dietpi/func/dietpi-set_software rpi_firmware_migration
mv /boot/firmware/*-6.12.34+rpt-rpi-v8 /boot/

Do not reboot yet, let’s first check everything together:

df
cat /etc/fstab
ls -l /boot /boot/firmware

The kernel package upgrades should then succeed:

apt update
apt upgrade