I've tried many of the answers I could find repeatedly. They all result in the same error. I'm not sure the cause, but the state feels like it's still half way between upgrading from 6.2.0-26 to 6.2.0-27. But that's totally conjecture on my side. I can't figure why it's in this state, and every document I've tried to follow to purge old kernels fails because it seems like while the old kernels are visible they are not installed?
I tried following the suggestion in the software updater, by changing the COMPRESS=xz in /etc/initramfs-tools/initramfs.conf but that also difference in the available space.
> sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Requesting to save current system state
ERROR couldn't save system state: Minimum free space to take a snapshot and preserve ZFS performance is 20%.
Free space on pool "bpool" is 9%.
Please remove some states manually to free up space.
Setting up initramfs-tools (0.142ubuntu2) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.2.0-27-generic (6.2.0-27.28) ...
I: /boot/initrd.img is now a symlink to initrd.img-6.2.0-27-generic
Setting up linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.5) ...
update-initramfs: Generating /boot/initrd.img-6.2.0-26-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p2
I: (UUID=9707427f-ea21-4f24-a222-71616b39623d)
I: Set the RESUME variable to override this.
xz: (stdout): Write error: No space left on device
E: mkinitramfs failure xz --check=crc32 --threads=0 1
update-initramfs: failed for /boot/initrd.img-6.2.0-26-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-6.2.0-26-generic (6.2.0-26.26) ...
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-firmware; however:
Package linux-firmware is not configured yet.
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 6.2.0.27.27); however:
Package linux-image-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the err
or message indicates its a followup error from a previous failure.
Processing triggers for initramfs-tools (0.142ubuntu2) ...
ln: failed to create hard link '/boot/initrd.img-6.2.0-26-generic.dpkg-bak': No space left on device
cp: cannot create regular file '/boot/initrd.img-6.2.0-26-generic.dpkg-bak': No space left on device
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
Processing triggers for linux-image-6.2.0-27-generic (6.2.0-27.28) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 6.2.0-27-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.2.0-27-generic
touch: cannot touch '/boot/initrd.img-6.2.0-27-generic.new': No space left on device
I: The initramfs will attempt to resume from /dev/nvme0n1p2
I: (UUID=9707427f-ea21-4f24-a222-71616b39623d)
I: Set the RESUME variable to override this.
xz: (stdout): Write error: No space left on device
E: mkinitramfs failure xz --check=crc32 --threads=0 1
update-initramfs: failed for /boot/initrd.img-6.2.0-27-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.2.0-27-generic (--configure):
installed linux-image-6.2.0-27-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
Processing triggers for linux-image-6.2.0-26-generic (6.2.0-26.26) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 6.2.0-26-generic
...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.2.0-26-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p2
I: (UUID=9707427f-ea21-4f24-a222-71616b39623d)
I: Set the RESUME variable to override this.
xz: (stdout): Write error: No space left on device
E: mkinitramfs failure xz --check=crc32 --threads=0 1
update-initramfs: failed for /boot/initrd.img-6.2.0-26-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.2.0-26-generic (--configure):
installed linux-image-6.2.0-26-generic package post-installation script subprocess returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-firmware
linux-image-generic
linux-generic
initramfs-tools
linux-image-6.2.0-27-generic
linux-image-6.2.0-26-generic
ZSys is adding automatic system snapshot to GRUB menu
E: Sub-process /usr/bin/dpkg returned an error code (1)
Disk use:
> df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.2G 2.9M 3.2G 1% /run
rpool/ROOT/ubuntu_zwy26j 794G 7.9G 786G 1% /
tmpfs 16G 97M 16G 1% /dev/shm
tmpfs 5.0M 16K 5.0M 1% /run/lock
rpool/USERDATA/matt_7cxeqg 846G 61G 786G 8% /home/matt
rpool/USERDATA/root_7cxeqg 786G 1.2M 786G 1% /root
rpool/ROOT/ubuntu_zwy26j/srv 786G 128K 786G 1% /srv
rpool/ROOT/ubuntu_zwy26j/usr/local 786G 177M 786G 1% /usr/local
rpool/ROOT/ubuntu_zwy26j/var/lib 795G 9.1G 786G 2% /var/lib
rpool/ROOT/ubuntu_zwy26j/var/games 786G 128K 786G 1% /var/games
rpool/ROOT/ubuntu_zwy26j/var/snap 786G 2.4M 786G 1% /var/snap
rpool/ROOT/ubuntu_zwy26j/var/log 787G 766M 786G 1% /var/log
rpool/ROOT/ubuntu_zwy26j/var/mail 786G 128K 786G 1% /var/mail
rpool/ROOT/ubuntu_zwy26j/var/www 786G 128K 786G 1% /var/www
rpool/ROOT/ubuntu_zwy26j/var/spool 786G 128K 786G 1% /var/spool
rpool/ROOT/ubuntu_zwy26j/var/lib/AccountsService 786G 128K 786G 1% /var/lib/AccountsService
rpool/ROOT/ubuntu_zwy26j/var/lib/NetworkManager 786G 256K 786G 1% /var/lib/NetworkManager
rpool/ROOT/ubuntu_zwy26j/var/lib/apt 786G 97M 786G 1% /var/lib/apt
rpool/ROOT/ubuntu_zwy26j/var/lib/dpkg 786G 50M 786G 1% /var/lib/dpkg
bpool/BOOT/ubuntu_zwy26j 288M 258M 30M 90% /boot
/dev/nvme0n1p1 511M 72M 440M 14% /boot/efi
tmpfs 3.2G 128K 3.2G 1% /run/user/1000
Kernel images
> dpkg -l | tail -n +6 | grep -E 'linux-image'
ic linux-image-5.13.0-40-generic 5.13.0-40.45 amd64 Signed kernel image generic
ic linux-image-5.15.0-27-generic 5.15.0-27.28 amd64 Signed kernel image generic
ic linux-image-5.15.0-30-generic 5.15.0-30.31 amd64 Signed kernel image generic
ic linux-image-5.15.0-33-generic 5.15.0-33.34 amd64 Signed kernel image generic
ic linux-image-5.15.0-35-generic 5.15.0-35.36 amd64 Signed kernel image generic
ic linux-image-5.15.0-37-generic 5.15.0-37.39 amd64 Signed kernel image generic
ic linux-image-5.15.0-39-generic 5.15.0-39.42 amd64 Signed kernel image generic
ic linux-image-5.15.0-40-generic 5.15.0-40.43 amd64 Signed kernel image generic
ic linux-image-5.15.0-41-generic 5.15.0-41.44 amd64 Signed kernel image generic
ic linux-image-5.15.0-43-generic 5.15.0-43.46 amd64 Signed kernel image generic
ic linux-image-5.15.0-46-generic 5.15.0-46.49 amd64 Signed kernel image generic
ic linux-image-5.15.0-47-generic 5.15.0-47.51 amd64 Signed kernel image generic
ic linux-image-5.15.0-48-generic 5.15.0-48.54 amd64 Signed kernel image generic
ic linux-image-5.15.0-52-generic 5.15.0-52.58 amd64 Signed kernel image generic
ic linux-image-5.19.0-23-generic 5.19.0-23.24 amd64 Signed kernel image generic
ic linux-image-5.19.0-26-generic 5.19.0-26.27 amd64 Signed kernel image generic
ic linux-image-5.19.0-28-generic 5.19.0-28.29 amd64 Signed kernel image generic
ic linux-image-5.19.0-29-generic 5.19.0-29.30 amd64 Signed kernel image generic
ic linux-image-5.19.0-31-generic 5.19.0-31.32 amd64 Signed kernel image generic
ic linux-image-5.19.0-35-generic 5.19.0-35.36 amd64 Signed kernel image generic
ic linux-image-5.19.0-40-generic 5.19.0-40.41 amd64 Signed kernel image generic
ic linux-image-5.19.0-41-generic 5.19.0-41.42 amd64 Signed kernel image generic
ic linux-image-6.2.0-20-generic 6.2.0-20.20 amd64 Signed kernel image generic
ic linux-image-6.2.0-23-generic 6.2.0-23.23 amd64 Signed kernel image generic
ic linux-image-6.2.0-24-generic 6.2.0-24.24 amd64 Signed kernel image generic
ic linux-image-6.2.0-25-generic 6.2.0-25.25 amd64 Signed kernel image generic
iF linux-image-6.2.0-26-generic 6.2.0-26.26 amd64 Signed kernel image generic
iF linux-image-6.2.0-27-generic 6.2.0-27.28 amd64 Signed kernel image generic
iU linux-image-generic 6.2.0.27.27 amd64 Generic Linux kernel image
Fail to remove old images that aren't there?
> sudo apt remove linux-image-5.13.0-40-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'linux-image-5.13.0-40-generic' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
^C⏎
> uname -r
6.2.0-26-generic
ls -l /boot
total 263675
-rw-r--r-- 1 root root 275950 Jul 10 17:25 config-6.2.0-26-generic
-rw-r--r-- 1 root root 275939 Jul 12 18:22 config-6.2.0-27-generic
drwxr-xr-x 4 root root 4096 Dec 31 1969 efi/
drwxr-xr-x 5 root root 4096 Aug 16 10:05 grub/
-rw-r--r-- 1 root root 235906921 Aug 11 09:16 initrd.img-6.2.0-26-generic
lrwxrwxrwx 1 root root 27 Aug 11 09:16 initrd.img.old -> initrd.img-6.2.0-26-generic
-rw-r--r-- 1 root root 138712 Feb 11 2023 memtest86+ia32.bin
-rw-r--r-- 1 root root 139776 Feb 11 2023 memtest86+ia32.efi
-rw-r--r-- 1 root root 144312 Feb 11 2023 memtest86+x64.bin
-rw-r--r-- 1 root root 145408 Feb 11 2023 memtest86+x64.efi
-rw------- 1 root root 8163538 Jul 10 17:25 System.map-6.2.0-26-generic
-rw------- 1 root root 8166850 Jul 12 18:22 System.map-6.2.0-27-generic
lrwxrwxrwx 1 root root 24 Aug 11 09:16 vmlinuz -> vmlinuz-6.2.0-27-generic
-rw------- 1 root root 14482632 Jul 10 17:31 vmlinuz-6.2.0-26-generic
-rw------- 1 root root 13872968 Jul 12 18:23 vmlinuz-6.2.0-27-generic
lrwxrwxrwx 1 root root 24 Aug 11 09:16 vmlinuz.old -> vmlinuz-6.2.0-26-generic
As you can see by the directory listing. The boot space is used primarily by a single file which cannot be removed
initrd.img-6.2.0-26-generic is using 225M of the 258M used in the /boot directory. I cannot remove the only active kernel so I cannot follow the steps in removing extra kernels. Please do not close this as duplicate.
The boot partition was created with default installation settings for Ubuntu. The updates were always applied from the software updater. The dpkg shows a bunch of kernels but using the remove command shows they aren't installed to be removed.
When I open the "Disks" application I can't even see the /boot partition. Only /boot/efi which still has plenty of space, as well as other unmounted partitions?