Ubuntu – Error 24 : Write error : cannot write compressed block

initramfskernel

I recently updated from Ubuntu 18.04 to 19.10. It looks to me as if the update installed an older kernel (5.3.0-29) than the one I had running under 18.04 (5.0.0-36). Since then I've had errors on all apt updates which show initramfs failing:

Setting up initramfs-tools (0.133ubuntu10) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.133ubuntu10) ...
update-initramfs: Generating /boot/initrd.img-5.3.0-29-generic
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.3.0-29-generic with 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)

My output of uname -r is

5.3.0-29-generic

and

alex@acer:~$ dpkg --list | grep linux-image
ii  linux-image-5.0.0-36-generic                  5.0.0-36.39                                         amd64        Signed kernel image generic
ii  linux-image-5.3.0-29-generic                  5.3.0-29.31                                         amd64        Signed kernel image generic
ii  linux-image-generic                           5.3.0.29.33                                         amd64        Generic Linux kernel image

Any ideas on how to solve? I'm not even sure what the issue is, but have gone through plenty of other solutions.

Best Answer

  • OK I think I may have just solved this. I didn't notice at first that I was actually using the newer kernel rather than the old one. In my first couple of boots after update, the older kernel (5.0.-) was in use, rather than the newer one (5.3.-). So with sudo apt purge linux-image-5.0.0-36-generic it looked like that freed some some space on /boot and voila computer says

    Setting up initramfs-tools (0.133ubuntu10) ...
    update-initramfs: deferring update (trigger activated)
    (Reading database ... 328490 files and directories currently installed.)
    Purging configuration files for linux-image-5.0.0-36-generic (5.0.0-36.39) ...
    rmdir: failed to remove '/lib/modules/5.0.0-36-generic': Directory not empty
    Processing triggers for initramfs-tools (0.133ubuntu10) ...
    update-initramfs: Generating /boot/initrd.img-5.3.0-29-generic
    
  • Related Question