1

i'm on ubuntu 21.04 trying to update to 21.10, and getting the usual error

The upgrade has aborted. The upgrade needs a total of 287 M free space on disk '/boot'. Please free at least an additional 31,6 M of disk space on '/boot'. You can remove old kernels using 'sudo apt autoremove' and you could also set COMPRESS=xz in /etc/initramfs-tools/initramfs.conf to reduce the size of your initramfs.

i usually fix this error by following obvious instructions like those here, but not this time:

$ ls /boot
config-5.11.0-22-generic      lost+found                    vmlinuz
config-5.11.0-25-generic      memtest86+.bin                vmlinuz-5.11.0-22-generic
grub                          memtest86+.elf                vmlinuz-5.11.0-25-generic
initrd.img                    memtest86+_multiboot.bin      vmlinuz.old
initrd.img-5.11.0-22-generic  System.map-5.11.0-22-generic
initrd.img.old                System.map-5.11.0-25-generic
$ dpkg -l linux-image-\* | grep ^ii
ii  linux-image-5.11.0-22-generic          5.11.0-22.23 amd64        Signed kernel image generic
ii  linux-image-5.11.0-25-generic          5.11.0-25.27 amd64        Signed kernel image generic

it doesn't look like i have too many kernels. (5.11.0-22 is what i'm running, i think 5.11.0.25 is what i'm upgrading to?) i'm guessing there may be some issue with LVM and having an encrypted LUKS partition?

ludant
  • 63
  • 3
    Do you actually have that much space on the partition? what does df -h tell you? – James S. Oct 18 '21 at 16:26
  • 3
    The message you've quoted is very imformative, so do what it says. There are two kernels, which is one more then needed. 21.10 has kernel 5.13. – mikewhatever Oct 18 '21 at 16:34
  • Also have a look at the contents of /boot/grub. If /boot is mounted on a large enough partition, there might be unneeded files hiding in a subdirectory. – llywrch Oct 18 '21 at 16:57
  • df -h gives /dev/sda2 447M 169M 244M 41% /boot, so total disk space is 447M. i guess i'll delete the extra kernel and resize my partition after i've done a backup. thank you! – ludant Oct 18 '21 at 17:01
  • Be careful, it looks like you don't have a complete 5.11.0-25 install, the initrd is missing. Look at the /etc/initramfs-tools/initramfs.conf file and ensure the COMPRESS is set to something to reduce the initrd images from 150M to 50M. – ubfan1 Oct 18 '21 at 17:10

0 Answers0