1

I continuously get the following error when updating every app and OS Update, either updating all or separately:

Failed to update 'AppCenter'
This may have been caused by external or manually compiled software.

Details:

Error while installing package: installed linux-firmware package post-installation script subprocess returned error exit status 1

The output of df -h:

Filesystem             Size  Used Avail Use% Mounted on
udev                   3.8G     0  3.8G   0% /dev
tmpfs                  785M  2.0M  783M   1% /run
/dev/mapper/data-root  453G   90G  341G  21% /
tmpfs                  3.9G   67M  3.8G   2% /dev/shm
tmpfs                  5.0M  4.0K  5.0M   1% /run/lock
tmpfs                  3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/loop1              56M   56M     0 100% /snap/core18/2128
/dev/loop2              62M   62M     0 100% /snap/core20/1081
/dev/loop3             219M  219M     0 100% /snap/gnome-3-34-1804/72
/dev/loop5             128K  128K     0 100% /snap/bare/5
/dev/loop4              62M   62M     0 100% /snap/core20/1169
/dev/loop0              56M   56M     0 100% /snap/core18/2246
/dev/loop6             106M  106M     0 100% /snap/mailspring/506
/dev/loop7              33M   33M     0 100% /snap/snapd/13270
/dev/loop8              33M   33M     0 100% /snap/snapd/13640
/dev/loop9              66M   66M     0 100% /snap/gtk-common-themes/1519
/dev/sda2              457M  432M     0 100% /boot
/dev/sda1              263M   11M  252M   5% /boot/efi
tmpfs                  785M  184K  784M   1% /run/user/1000

Running autoremove did not fix the problem.

The output of sudo apt autoremove:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libclutter-gst-3.0-0
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 193 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 190571 files and directories currently installed.)
Removing libclutter-gst-3.0-0:amd64 (3.0.27-1) ...
Setting up linux-firmware (1.187.19) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-37-generic
W: Possible missing firmware /lib/firmware/i915/skl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cml_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_dmc_ver2_02.bin for module i915
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/data-swap)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-37-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 installed linux-firmware package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.11.0-38-generic (5.11.0-38.42~20.04.1) ...
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-20.04:
 linux-image-generic-hwe-20.04 depends on linux-firmware; however:
  Package linux-firmware is not configured yet.

dpkg: error processing package linux-image-generic-hwe-20.04 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for linux-image-5.11.0-38-generic (5.11.0-38.42~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-38-generic
W: Possible missing firmware /lib/firmware/i915/skl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/bxt_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/glk_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/kbl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/cml_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/icl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/ehl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_huc_7.5.0.bin for module i915
W: Possible missing firmware /lib/firmware/i915/tgl_guc_49.0.1.bin for module i915
W: Possible missing firmware /lib/firmware/i915/dg1_dmc_ver2_02.bin for module i915
I: The initramfs will attempt to resume from /dev/dm-2
I: (/dev/mapper/data-swap)
I: Set the RESUME variable to override this.
Error 24 : Write error : cannot write compressed block 
E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.11.0-38-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.11.0-38-generic (--configure):
 installed linux-image-5.11.0-38-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware
 linux-image-generic-hwe-20.04
 linux-image-5.11.0-38-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Machine Details:

  • eOS 6 20.04.3
  • Linux 5.11.0-37-generic
  • Dual-Core Intel® Core™ i5-6200U
1
  • See my updated output after running autoremove
    – TheTester
    Nov 2, 2021 at 22:39

1 Answer 1

0

The problem is reported there in your df output:


Filesystem             Size  Used Avail Use% Mounted on
…
/dev/sda2              457M  432M     0 100% /boot

If your /boot file system is full, updates will often fail. Fortunately, the fix is usually not too difficult.

Try this:

  1. Open Terminal (if it’s not already open)
  2. Remove the older, unused kernels from previous updates:
    sudo apt autoremove
    
  3. Use autoclean:
    sudo apt autoclean
    
  4. Verify that all installed packages are in a “clean” state:
    sudo apt clean
    
  5. Check the available space on /boot
    df -h /boot
    
    Hopefully the number is much lower.
  6. Run your updates:
    sudo apt dist-upgrade
    

If for any reason this does not do the job, you will need to manually remove old kernel packages first, then perform the steps above.

Manually Removing Older Kernels

  1. From Terminal, determine your current kernel version:
    uname -r
    
    Remember the number.
  2. List all installed kernels:
    dpkg --list 'linux-image*' | grep ^ii
    
  3. Delete one or two of the older kernels:
    sudo apt-get remove linux-image-{version}
    
    Note: Be sure to replace {version} with the version number you want to remove.
  4. Try the steps in the first part of the answer again.
4
  • Thanks for the help! Unfortunately, /boot is still at 100%. I got an error after running autoremove "E: Sub-process /usr/bin/dpkg returned an error code (1)"
    – TheTester
    Nov 2, 2021 at 16:02
  • Added a couple more steps …
    – matigo
    Nov 3, 2021 at 2:20
  • So far this solved the problem! Is there a way to keep the error from reoccuring?
    – TheTester
    Nov 5, 2021 at 2:01
  • This situation is very rare. In 10+ years of using Linux, I've had it happen maybe twice. If you've found the answer useful, do click the little checkmark to the left to mark the answer as "accepted". You can also push the little "up" arrow if you'd like to set the answer as useful 👍🏻
    – matigo
    Nov 5, 2021 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.