2

Every time I update the system (with sudo apt update && sudo apt upgrade) I get an error that ends in:

Errors were encountered while processing:
 initramfs-tools

Searching someone sugested to use sudo apt-get auto-remove && apt-get clean && apt-get update && apt-get upgrade, which gives the same error, this is the complete output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... 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 initramfs-tools (0.142) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-9-amd64
raspi-firmware: missing /boot/firmware, did you forget to mount it?
run-parts: /etc/initramfs/post-update.d//z50-raspi-firmware exited with return code 1
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

I just installed Debian 12, and I don't know where to find a solution. Just in case it helps, this is my sources.list:

deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware

deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
deb-src https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware

deb http://www.deb-multimedia.org bookworm main non-free

Thanks in advance,

Gerardo
  • 81
  • 7

1 Answers1

3

If you are not in a raspberry, move the script file that is causing problem to another place by running the command: sudo mv /etc/initramfs/post-update.d/z50-raspi-firmware ~/. (You can also delete the file, but i recommend moving just for security).

After that, sudo update-initramfs -u to update the Initramfs image.

  • 1
    Thank you! this solved my problem, can you elaborate about what was the problem and how did this solved it? – Gerardo Jul 05 '23 at 18:03
  • 1
    The error you encountered during system configuration was related to a script called "z50-raspi-firmware," which is intended for Raspberry Pi devices. Since you're not using a Raspberry Pi, the presence of this script caused the issue. By manually removing the script using the command, you eliminated a Raspberry Pi-specific step from the configuration process, which resolved the error. However, it's unclear to me why the Raspberry Pi script was present on a non-Raspberry Pi device. – alexandreafa Jul 05 '23 at 18:09
  • Yes.. it doesn't make sense (the RP script in my system), thank you. – Gerardo Jul 06 '23 at 22:47
  • I can confirm exactly the same errors as @Gerardo's also occurred on my Debian 12 GNOME and your solution works perfectly. Thank you. – Ade Malsasa Akbar Aug 07 '23 at 09:50