Errors were encountered while processing: raspi-firmware E: Sub-process /usr/bin/dpkg returned an error code (1)
Details:
- Date | Mon May 20 02:16:41 CEST 2024
- DietPi version | v8.25.1 (MichaIng/master)
- Image creator |
- Pre-image |
- Hardware | RPi 4 Model B (aarch64) (ID=4)
- Kernel version |
Linux VPN-GW-MWR 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux - Distro | bookworm (ID=7,RASPBIAN=0)
- Command |
apt-get -y --with-new-pkgs upgrade - Exit code | 100
- Software title | DietPi-Update
Steps to reproduce:
- ...
- ...
Expected behaviour:
- ...
Actual behaviour:
- ...
Extra details:
- ...
Additional logs:
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages were automatically installed and are no longer required:
cpio tiny-initramfs tiny-initramfs-core
Use 'apt autoremove' to remove them.
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.20240424-1) ...
Error: missing /boot/firmware, did you forget to mount it?
dpkg: error processing package raspi-firmware (--configure):
installed raspi-firmware package post-installation script subprocess returned error exit status 1
Processing triggers for tiny-initramfs (0.1-5) ...
Errors were encountered while processing:
raspi-firmware
E: Sub-process /usr/bin/dpkg returned an error code (1)
Did you install raspi-firmware manually? It should not be pulled anymore as dependency 🤔. Does this lead to any other removal?
apt autopurge raspi-firmware
OK 👍 ... check now ...
DietPi-Update ───────────────────────────────────────────────────── Phase: Completed
[ INFO ] DietPi-Update | Current version : v9.4.2 [ INFO ] DietPi-Update | Latest version : v9.4.2 [ OK ] DietPi-Survey | Purging survey data [ OK ] DietPi-Update | sync [ SUB1 ] DietPi-Services > restart [ OK ] DietPi-Services | restart : webmin [ OK ] DietPi-Services | restart : docker [ OK ] DietPi-Services | restart : cron
💯 :-* MTHX
Background: raspi-firmware is part of the new RPi kernel/firmware package stack, which requires a different boot partition mount and is hence incompatible with our (old) RPi images. Unintentionally, rpi-eeprom did pull it as dependency at first, but that was lifted. Hence I am wondering why this package was installed on your system in the first place.
About migrating to the new kernel/firmware package stack: #6676
This issue is solved, right? Else, feel free to reopen.
In case someone else gets error code (1) on raspi-firmware then I found this page with a solution: https://forums.raspberrypi.com/viewtopic.php?t=360134
The different boot partition mount previously mentioned appears to be that you need to change the boot partition mount point from /boot to /boot/firmware in /etc/fstab.
The instructions, which worked for me from the page above:
You need to:
- unmount /boot first with sudo umount /boot
- then create the firmware directory with sudo mkdir -p /boot/firmware
- then edit /etc/fstab so the boot partition will be mounted at the new location
- update systemd with sudo systemctl daemon-reload
- then mount boot partition with sudo mount /boot/firmware
Please do not manually migrate from old to new firmware stack, these steps are incomplete, and will cause issues. We have a migration option in dietpi-config advanced options for that, and DietPi updates trigger it automatically on RPi Bookworm systems.
But out of interest, I wonder why raspi-firmware was installed in the first place? It does not exist on Bullseye, and editing sources lists for a Bookworm upgrade should not install it automatically either. So you tried to install that package manually?