So I’ve been trying to update/upgrade my system/applications for the last few days and it has been erroring, I ignored it and now when I try to sudo apt upgrade
it tells me that I have “Low Disk Space on “boot” The volume “boot” has only 0 bytes disk space remaining.”
What happens when I run sudo apt upgrade
:
user@user:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.187.25) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-43-generic
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-43-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-44-generic (5.11.0-44.48~20.04.2) ...
I: /boot/initrd.img.old is now a symlink to initrd.img-5.11.0-44-generic
Setting up linux-image-5.11.0-46-generic (5.11.0-46.51~20.04.1) ...
I: /boot/initrd.img is now a symlink to initrd.img-5.11.0-46-generic
Processing triggers for initramfs-tools (0.136ubuntu6.6) ...
update-initramfs: Generating /boot/initrd.img-5.11.0-43-generic
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-43-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.11.0-44-generic (5.11.0-44.48~20.04.2) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-44-generic
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-44-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-44-generic (--configure):
installed linux-image-5.11.0-44-generic package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.11.0-46-generic (5.11.0-46.51~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-46-generic
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-46-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-46-generic (--configure):
installed linux-image-5.11.0-46-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-firmware
initramfs-tools
linux-image-5.11.0-44-generic
linux-image-5.11.0-46-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Screenshot of /boot:
I am running elementary OS 6.1 Jólnir, built on Ubuntu 20.04.3 LTS using the Linux kernel 5.11.0-43-generic.
Removing linux-image-5.11.0-43-generic You are running a kernel (version 5.11.0-43-generic) and attempting to remove the same version. This can make the system unbootable as it will remove /boot/vmlinuz-5.11.0-43-generic and all modules under the
This happens when I run that command, it scares me, will something break? Is it better to expand my boot partition?
I’ve seen linux-image-5.11.0-40-generic and linux-image-5.11.0-41-generic too. You could try with these one first
With what first? Keep in mind that since elementary is built upon Ubuntu LTS I can’t use the newest version of the Linux kernel because it hasn’t been tested and such, maybe I should post on elementary’s subreddit. :/
You should be OK as long as you rerun apt upgrade and/or update-initramfs so it properly installs the new kernel.
Be sure to remove any other old kernels you may have installed.
So, as soon as I run the command to remove that kernel y run sudo apt upgrade or update-initramfs and that’s it? How do I know if I have any other old kernel installed?