1

Few days ago, after I did an apt upgrade, I got something like this in the log, multiple times

Error 24 : Write error : cannot write compressed block
E: mkinitramfs failure cpio 141 lz4 -9 -I 24
update-initramfs: failed for /boot/initrd.img-5.4.0-52-generic with 1.
dpkg: error processing package initramfs-tools (--configure):

This is not the exact message I was getting cause I already reboot my computer.

After I got the message, I tried to search for solution, and I ran this code, after the upgrade: sudo dpkg -P `dpkg --list | grep linux-image | grep ^rc | awk {'print $2'}`

Then after reboot I got this Text

I can't boot from the "linux mint 20" option in boot manager, though I could still use recovery options in "Advanced option for linux Mint", but not the first one, which is "linux 5.4.0-65-generic".

I tried to login to my system, with different version of linux image, recovery mode other than 5.4.0-65, and reinstall the linux-image(I think that command was for deleting linux image right?) with sudo apt install --reinstall linux-image-5.4.0-65-generic 5.4.0-65.73, but I'm getting errors

E: Unable to locate package 5.4.0-65.73
E: Couldn't find any package by glob '5.4.0-65.73'

Sorry I'm pretty bad at this, what should I do... I'm using linux mint distro

This is my linux-image list with dpkg --list | grep linux-image

ii  linux-image-5.4.0-26-generic                                5.4.0-26.30                                amd64        Signed kernel image generic
ii  linux-image-5.4.0-59-generic                                5.4.0-59.65                                amd64        Signed kernel image generic
ii  linux-image-5.4.0-60-generic                                5.4.0-60.67                                amd64        Signed kernel image generic
ii  linux-image-5.4.0-62-generic                                5.4.0-62.70                                amd64        Signed kernel image generic
iF  linux-image-5.4.0-65-generic                                5.4.0-65.73                                amd64        Signed kernel image generic
iU  linux-image-generic                                         5.4.0.65.68                                amd64        Generic Linux kernel image

Also, Im wondering what does this do grep ^rc | awk {'print $2'}

#####################################################

I ran into the same error again, when I was removing old kernels.

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.4.0-65-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returne
d error exit status 1

and I think the below part is new

Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

And somehow removing linux-image ver 5.4.0-26 only free up 8mb of space on /boot

By checking apt-cache policy intel-microcode, it says installed

intel-microcode:
  Installed: 3.20201110.0ubuntu0.20.04.2
  Candidate: 3.20201110.0ubuntu0.20.04.2
  Version table:
 *** 3.20201110.0ubuntu0.20.04.2 500
        500 http://mirror.0x.sg/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     3.20191115.1ubuntu3 500
        500 http://mirror.0x.sg/ubuntu focal/main amd64 Packages

##############################################

This is the message I got by running apt-cache policy linux-image-5.4.0.65:

linux-image-5.4.0-65-lowlatency:
  Installed: (none)
  Candidate: 5.4.0-65.73
  Version table:
     5.4.0-65.73 500
        500 http://mirror.0x.sg/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
linux-image-5.4.0-65-generic:
  Installed: 5.4.0-65.73
  Candidate: 5.4.0-65.73
  Version table:
 *** 5.4.0-65.73 500
        500 http://mirror.0x.sg/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status

Now that I have enough space on my /boot, I'll try to change source and do sudo apt install --reinstall linux-image-5.4.0-65-generic 5.4.0-65.73


(My CPU is Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz if relevant.)

0
2

First let's have a look at:

I just checked my /boot, it seems that there's no more available space left...

So, now you could basically run the Mint Update manager, and uninstall the oldest kernel(s) in order to install a new one:

Mint Update manager - kernels

Also, please check if you have intel-microcode package installed for your Haswell CPU, a simple check could be with:

apt-cache policy intel-microcode

The grep ^rc filters out uninstalled packages with remained configuration.

There could be data not exactly in sync in your source mirror too, which would explain why you got the message about:

Unable to locate package 5.4.0-65.73

which is in central archive:

apt-cache policy linux-image-5.4.0.65

linux-image-5.4.0-65-lowlatency:
  Installed: (none)
  Candidate: 5.4.0-65.73
  Version table:
     5.4.0-65.73 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
linux-image-5.4.0-65-generic:
  Installed: 5.4.0-65.73
  Candidate: 5.4.0-65.73
  Version table:
 *** 5.4.0-65.73 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status

Please remove one more old kernel and reset sources:

reset mint sources

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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