Copy and paste ONLY the BLUE lines below, replacing the template! -
Details:
Date | 2025-02-27 10:21:47
Program name | DietPi-Update
Command | apt-get -y --with-new-pkgs upgrade
Exit code | 100
DietPi version | v9.10.0 (MichaIng/master)
Distro version | bookworm (ID=7,RASPBIAN=0)
Kernel version | Linux Pi4NAS 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux
Architecture | arm64
Hardware model | RPi 4 Model B (aarch64) (ID=4)
Steps to reproduce:
…I get this when I run APT update/upgrade or dietpi-update
…
Expected behaviour:
This first occurred with the last dietpi-update
…
Actual behaviour:
Everything else seems to work
…
Extra details:
Running apt purge linux-image-6.1.0-rpi4-rpi-v6 just returns the same error
ls -la /boot
drwxr-xr-x 4 root root 4096 Feb 27 10:20 .
drwxr-xr-x 19 root root 4096 Feb 24 11:55 ..
lrwxrwxrwx 1 root root 20 Feb 24 11:54 cmdline.txt -> firmware/cmdline.txt
-rw-r--r-- 1 root root 199654 Oct 5 2023 config-6.1.0-rpi4-rpi-v6
-rw-r--r-- 1 root root 204942 Oct 5 2023 config-6.1.0-rpi4-rpi-v7
-rw-r--r-- 1 root root 223049 Oct 5 2023 config-6.1.0-rpi4-rpi-v7l
-rw-r--r-- 1 root root 230343 Oct 5 2023 config-6.1.0-rpi4-rpi-v8
-rw-r--r-- 1 root root 239262 Jan 27 17:19 config-6.6.74+rpt-rpi-v8
lrwxrwxrwx 1 root root 19 Feb 24 11:54 config.txt -> firmware/config.txt
drwxr-xr-x 4 root root 4096 Feb 23 22:55 dietpi
-rwxr-xr-x 1 root root 18092 Sep 23 2023 dietpi-LICENSE.txt
-rwxr-xr-x 1 root root 16059 Sep 23 2023 dietpi-README.md
-rw-r--r-- 1 root root 17481 Jan 22 2024 dietpi.txt
-rwxr-xr-x 1 root root 3950 Sep 24 2023 dietpi-wifi.txt
drwxr-xr-x 5 root root 6144 Jan 1 1970 firmware
-rw-r--r-- 1 root root 10360913 Oct 10 2023 initrd.img-6.1.0-rpi4-rpi-v6
-rw-r--r-- 1 root root 10475428 Oct 10 2023 initrd.img-6.1.0-rpi4-rpi-v7
-rw-r--r-- 1 root root 10677629 Oct 10 2023 initrd.img-6.1.0-rpi4-rpi-v7l
-rw-r--r-- 1 root root 10587679 Oct 10 2023 initrd.img-6.1.0-rpi4-rpi-v8
-rw-r--r-- 1 root root 10193787 Feb 27 10:20 initrd.img-6.6.74+rpt-rpi-v8
lrwxrwxrwx 1 root root 17 Oct 10 2023 overlays -> firmware/overlays
-rw-r--r-- 1 root root 83 Oct 5 2023 System.map-6.1.0-rpi4-rpi-v6
-rw-r--r-- 1 root root 83 Oct 5 2023 System.map-6.1.0-rpi4-rpi-v7
-rw-r--r-- 1 root root 83 Oct 5 2023 System.map-6.1.0-rpi4-rpi-v7l
-rw-r--r-- 1 root root 83 Oct 5 2023 System.map-6.1.0-rpi4-rpi-v8
-rw-r--r-- 1 root root 83 Jan 27 17:19 System.map-6.6.74+rpt-rpi-v8
-rw-r--r-- 1 root root 6664272 Oct 5 2023 vmlinuz-6.1.0-rpi4-rpi-v6
-rw-r--r-- 1 root root 6990632 Oct 5 2023 vmlinuz-6.1.0-rpi4-rpi-v7
-rw-r--r-- 1 root root 7429200 Oct 5 2023 vmlinuz-6.1.0-rpi4-rpi-v7l
-rw-r--r-- 1 root root 8726865 Oct 5 2023 vmlinuz-6.1.0-rpi4-rpi-v8
-rw-r--r-- 1 root root 9362120 Jan 27 17:19 vmlinuz-6.6.74+rpt-rpi-v8
Additional logs:
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up raspi-firmware (1:1.20241126-1) ...
rsync: [sender] change_dir "/usr/lib/linux-image-6.1.0-rpi4-rpi-v6" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
dpkg: error processing package raspi-firmware (--configure):
installed raspi-firmware package post-installation script subprocess returned error exit status 23
Processing triggers for initramfs-tools (0.142+rpt3+deb12u1) ...
update-initramfs: Generating /boot/initrd.img-6.6.74+rpt-rpi-v8
W: No zstd in /usr/bin:/sbin:/bin, using gzip
'/boot/initrd.img-6.6.74+rpt-rpi-v8' -> '/boot/firmware/initramfs8'
Errors were encountered while processing:
raspi-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)
---------------------------------------------------------------------
Hmm, looks like there are very old kernel packages installed (but new kernel stack already), which are incompatible with the recent raspi-firmware package. Can you check this please:
dpkg -l | grep linux
dpkg -S /lib/modules/6.1.0-rpi4-rpi-v8
dpkg -l | grep linux
ii binutils-aarch64-linux-gnu 2.40-2 arm64 GNU binary utilities, for aarch64-linux-gnu target
ii console-setup-linux 1.221rpt1 all Linux specific part of console-setup
ii firmware-linux-free 20200122-1 all Binary firmware for various drivers in the Linux kernel
ii libselinux1:arm64 3.4-1+b6 arm64 SELinux runtime shared libraries
ii linux-base 4.9 all Linux image base package
ii linux-image-6.6.74+rpt-rpi-v8 1:6.6.74-1+rpt1 arm64 Linux 6.6 for Raspberry Pi v8, Raspberry Pi
ii linux-image-rpi-v8 1:6.6.74-1+rpt1 arm64 Linux for Raspberry Pi v8 (meta-package)
ii linux-libc-dev 1:6.6.74-1+rpt1 all Linux support headers for userspace development
ii util-linux 2.38.1-5+deb12u3 arm64 miscellaneous system utilities
ii util-linux-extra 2.38.1-5+deb12u3 arm64 interactive login tools
dpkg -S /lib/modules/6.1.0-rpi4-rpi-v8
dpkg-query: no path found matching pattern /lib/modules/6.1.0-rpi4-rpi-v8
And check whether there is anything related in /usr/lib:
ls -l /usr/lib
/etc/kernel/postinst.d/z50-raspi-firmware tries to copy device trees and overlays from /usr/lib/linux-image-$(uname -r) to the boot partition, but I guess rpi-update did install them there directly and did not use /usr/lib at all, at that time. The /etc/kernel/postinst.d/z50-raspi-firmware package from the raspi-firmware package could be probably enhanced to deal with this case more gracefully, like skipping this copy attempt it the directory does not exist and the kernel version is below 6.6. But also it is probably a rare case.
apt update && apt upgrade -y
Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Hit:2 https://archive.raspberrypi.com/debian bookworm InRelease
Hit:3 https://deb.debian.org/debian bookworm InRelease
Hit:4 https://deb.debian.org/debian bookworm-updates InRelease
Hit:5 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:6 https://deb.debian.org/debian bookworm-backports InRelease
Hit:7 https://dietpi.com/apt bookworm InRelease
Hit:8 https://dietpi.com/apt all InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up raspi-firmware (1:1.20241126-1) ...
'/boot/vmlinuz-6.6.74+rpt-rpi-v8' -> '/boot/firmware/kernel8.img'
Processing triggers for initramfs-tools (0.142+rpt3+deb12u1) ...
update-initramfs: Generating /boot/initrd.img-6.6.74+rpt-rpi-v8
W: No zstd in /usr/bin:/sbin:/bin, using gzip
'/boot/initrd.img-6.6.74+rpt-rpi-v8' -> '/boot/firmware/initramfs8'
apt update && apt upgrade -y
Hit:1 https://deb.debian.org/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:4 https://download.docker.com/linux/debian bookworm InRelease
Hit:5 https://deb.debian.org/debian bookworm-backports InRelease
Hit:6 https://archive.raspberrypi.com/debian bookworm InRelease
Hit:7 https://dietpi.com/apt bookworm InRelease
Hit:8 https://dietpi.com/apt all InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Great. Be careful with rpi-update, i.e. do not use it as long as it is not explicitly for testing or pulling a particular fix you need. It has no uninstall function or any such, so the installed kernel and firmware just remain on the system, and as seen here can start to cause issues at some point.
I guess there is also an RPi firmware directory left below /opt? That could be removed as well.
There is an /opt directory on all three of my DietPi’s, the one which has Pihole, also has a Pihole folder with some files. The others are empty folders.