-1

I'm using an HP laptop and am seeing these messages:

sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 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)
Setting up linux-image-5.18.0-kali5-amd64 (5.18.5-1kali6) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.18.0-kali5-amd64
W: Possible missing firmware /lib/firmware/i915/skl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cml_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_dmc_ver2_14.bin for module i915
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
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.18.0-kali5-amd64 (--configure):
 installed linux-image-5.18.0-kali5-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
 linux-image-amd64 depends on linux-image-5.18.0-kali5-amd64 (= 5.18.5-1kali6); however:
  Package linux-image-5.18.0-kali5-amd64 is not configured yet.

dpkg: error processing package linux-image-amd64 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-5.18.0-kali5-amd64
W: Possible missing firmware /lib/firmware/i915/skl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cml_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_guc_69.0.3.bin for module i915
W: Possible missing firmware /lib/firmware/i915/adlp_dmc_ver2_14.bin for module i915
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:
 linux-image-5.18.0-kali5-amd64
 linux-image-amd64
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
0

4 Answers 4

7

Since you’re not using a Raspberry Pi, you don’t need the raspi-firmware package; that’s what’s causing the errors. Run

sudo rm /etc/kernel/postinst.d/z50-raspi-firmware
sudo apt purge raspi-firmware

You need to purge the package, not just remove it, to ensure that the various z50-raspi-firmware scripts are removed too. The postinst script needs to be removed separately because it breaks on non-Raspberry Pi systems.

0
1

Issue command

sudo mv /etc/initramfs/post-update.d/z50-raspi-firmware

Do this will move the Z50 firmware to your home directory, preventing it from running every time you try and upgrade.

I moved it to the home directory to keep a backup just in case something broke.

1
  • I installed Debian 12 from a live cd, and that wasn't enough, because it couldn't even complete the purge. I also had to: sudo rm /etc/kernel/postinst.d/z50-raspi-firmware
    – mmortal03
    Jul 19, 2023 at 1:09
0

When installed debian-12 from a live CD, I had similar errors with apt upgrade and here's what has fixed it:

$ sudo dpkg -P raspi-firmware
$ sudo apt-get dist-upgrade
$ sudo apt-get update && sudo apt-get upgrade
-1

According to the blog post on : https://itsfoss.com/dpkg-returned-an-error-code-1/ a solve to the issue is to Remove post info files of the troublesome package causing the installation to error out as it the cases for you with the 3 packages mention in the Errors were encountered while processing section by doing :

sudo mv /var/lib/dpkg/info/<packge name>.* /tmp
2
  • 1
    This does not solve the problem as the accepted answer does. Also "remove post info files" is not what you are doing when you move them to /tmp. Sure they "might" be deleted upon reboot, but they might not.
    – number9
    Aug 4, 2022 at 15:30
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Aug 4, 2022 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .