Score:0

Not enough free space on boot - uname returns older version (OK to reboot?); resizing /boot if encrypted

mx flag

This issues is a perennial one, here is one of the classic questions and answers, althought there are some nuances that might need some answers:

Not enough free disk space on /boot

The 'not enough free space' message appeared when upgrading, and I'm a bit concerned, and don't know if there are any issues in rebooting.

It seems my machine (20.04 LTS) has updated, but, since it hasn't rebooted in a few days, doing a 'uname -r' still shows the older kernel in use:

me@home:uname -r

5.15.0-73-generic

Doing an ls -l on /boot shows the new kernel (-75), and of course, the old one. Another machine (also running 20.04 LTS) I've got shows the exact same sizes for System.map-5.15.0-75-generic, and vmlinuz-5.15.0-75-generic (although initrd.img-5.15.0-73 and -75.generic on the other machine is different; the sizes are close, but smaller; 1285887067 and 128598091), and config-5.15.0-73 and -75 are the same. Is it correct to assume that the new kernel has been downloaded and is ready to go?

rwxr-xr-x  5 root root      4096 Jun 22 06:39 .
drwxr-xr-x 20 root root      4096 Sep 29  2014 ..
-rw-r--r--  1 root root    262214 May 17 10:12 config-5.15.0-73-generic
-rw-r--r--  1 root root    262224 Jun  7 15:21 config-5.15.0-75-generic
drwx------  2 root root      4096 Dec 31  1969 efi
drwxr-xr-x  4 root root      4096 Jun 22 06:39 grub
lrwxrwxrwx  1 root root        28 Jun 22 06:36 initrd.img -> initrd.img-5.15.0-75-generic
-rw-r--r--  1 root root 177971432 Jun  8 00:10 initrd.img-5.15.0-73-generic
-rw-r--r--  1 root root 177979513 Jun 22 06:37 initrd.img-5.15.0-75-generic
lrwxrwxrwx  1 root root        28 Jun 22 06:36 initrd.img.old -> initrd.img-5.15.0-73-generic
drwx------  2 root root     16384 Nov 26  2020 lost+found
-rw-r--r--  1 root root    182704 Aug 18  2020 memtest86+.bin
-rw-r--r--  1 root root    184380 Aug 18  2020 memtest86+.elf
-rw-r--r--  1 root root    184884 Aug 18  2020 memtest86+_multiboot.bin
-rw-------  1 root root   6229204 May 17 10:12 System.map-5.15.0-73-generic
-rw-------  1 root root   6230131 Jun  7 15:21 System.map-5.15.0-75-generic
lrwxrwxrwx  1 root root        25 Jun 22 06:36 vmlinuz -> vmlinuz-5.15.0-75-generic
-rw-------  1 root root  11473896 May 17 10:16 vmlinuz-5.15.0-73-generic
-rw-------  1 root root  11493608 Jun  7 15:23 vmlinuz-5.15.0-75-generic
lrwxrwxrwx  1 root root        25 Jun 22 06:36 vmlinuz.old -> vmlinuz-5.15.0-73-generic

The nuances:

Is the system OK to be restarted? Is there a way to know if the kernel has been downloaded correctly? The worst case scenario is we have to reboot with the old kernel, as per: How can I boot with an older kernel version?

Why would we get an error about boot size, if there are only two kernels (-73 and -75), and there does seem to be room in /boot:

me@home: /boot$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5       703M  382M  270M  59% /boot

For resizing /boot, it seems that you can boot off of an Ubuntu Live USB and run gparted from there. My system boots to a screen that asks for a password 'Please unlock disk sda6_crypt' first. This may be a separate question, but it seems related - can you resize /boot even if encrypted? A note here is from 16.04, not 20.04: resize an encrypted disk? ; surely there must be others who have a similar setup.

user535733 avatar
cn flag
The 'not enough free space' message is usually a terminating error. On the other hand, your output clearly shows the correct kernel for 22.04, so it seems that there was enough space...and that's even more curious: The system cannot proceed after a terminating error, so wondering how the human overcame that and forced the upgrade.
asylumax avatar
mx flag
Even if on 20.04? You wrote 22.04. BTW, a search didn't turn up the list of kernels available. The system hasn't been rebooted, uname -r shows .73, not .75.
asylumax avatar
mx flag
Is it still OK to reboot then? The command 'sudo apt autoremove' was run after the message popped up, but very little was removed (wish that output was saved; it seemed a small amount of stuff was removed, but this happened after the popup).
asylumax avatar
mx flag
Rebooting worked, BTW.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.