Edit to clarify that this is different to other questions where upgrade is prevented by lack of space on /boot. I don't have lots of old kernels I can remove. I have only one and I can't remove that!
So I'm trying to update from Ubuntu 19.10 to 20.04. I've got full disk encryption so I have to enter a password before boot up. On the cli when I try to
sudo do-release-upgrade
The process aborts with
"The upgrade has aborted. The upgrade needs a total of 212 M free space on disk '/boot'. Please free at least an additional 102 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've done the autoremove but in any case I've only got one kernel:
$ dpkg --list | grep linux-image
ii linux-image-5.3.0-46-generic 5.3.0-46.38 amd64 Signed kernel image generic
Editing initramfs.conf to COMPRESS=xz also did not allow the upgrade.
Here's the output of ls -l /boot
$ ls -las /boot
total 112120
3 drwxr-xr-x 5 root root 3072 May 23 11:14 .
4 drwxr-xr-x 24 root root 4096 Dec 3 17:50 ..
232 -rw-r--r-- 1 root root 235824 Mar 26 18:54 config-5.3.0-45-generic
232 -rw-r--r-- 1 root root 235846 Mar 27 16:22 config-5.3.0-46-generic
4 drwx------ 3 root root 4096 Jan 1 1970 efi
1 drwxr-xr-x 5 root root 1024 May 23 11:17 grub
0 lrwxrwxrwx 1 root root 27 Apr 7 10:10 initrd.img -> initrd.img-5.3.0-46-generic
90678 -rw-r--r-- 1 root root 92489165 May 23 11:04 initrd.img-5.3.0-46-generic
0 lrwxrwxrwx 1 root root 27 Apr 7 10:09 initrd.img.old -> initrd.img-5.3.0-46-generic
12 drwx------ 2 root root 12288 Oct 3 2015 lost+found
180 -rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
182 -rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
182 -rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
4614 -rw------- 1 root root 4704521 Mar 26 18:54 System.map-5.3.0-45-generic
4614 -rw------- 1 root root 4704973 Mar 27 16:22 System.map-5.3.0-46-generic
0 lrwxrwxrwx 1 root root 24 Apr 7 10:10 vmlinuz -> vmlinuz-5.3.0-46-generic
11182 -rw------- 1 root root 11404024 Mar 27 16:48 vmlinuz-5.3.0-46-generic
0 lrwxrwxrwx 1 root root 24 Apr 7 10:09 vmlinuz.old -> vmlinuz-5.3.0-46-generic
and here's the output of df -h /boot
$ df -h /boot
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 237M 120M 105M 54% /boot
Other than risking partition editing to increase in the size of the boot partition, is there anything I can safely delete from /boot to get the upgrade processed?
THanks in advance.
Well, since you only have about 5M of old ...5.3.0-45 files, removing them wont solve your problem (and you will have other problems if you remove(d) them manually. Looks like you simply need more space, so put an ext filesystem onto a USB with a few G of space, copy in your existing /boot files, mount your USB at /boot and run the dist-upgrade. When finished, copy back the new files from the USB, and remove the old ones. You probably don't even need to alter the /etc/fstab file since the USB mount is not needed again. But really, your /boot is awfully tight, expect problems with every kernel upgrade, so do consider redoing the partitioning to leave yourself a larger /boot.