Page 1 of 1

Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 11:16 am
by dgrc
When I did the upgrade to 20.1 I started getting error messages regarding a kernel upgrade. The update manager would notify of an available kernel upgrade. I'd apply the upgrade and get this error message:

Code: Select all

E: /var/cache/apt/archives/linux-modules-5.4.0-60-generic_5.4.0-60.67_amd64.deb: cannot copy extracted data for './boot/System.map-5.4.0-60-generic' to '/boot/System.map-5.4.0-60-generic.dpkg-new': failed to write (No space left on device)
E: /var/cache/apt/archives/linux-image-5.4.0-60-generic_5.4.0-60.67_amd64.deb: cannot copy extracted data for './boot/vmlinuz-5.4.0-60-generic' to '/boot/vmlinuz-5.4.0-60-generic.dpkg-new': failed to write (No space left on device)
I then got a lot of broken package error messages. I tried fixing them with synaptic package manager, then manually with various combinations for apt and dpkg as suggested by web searches. There have been no catastrophic failures but I'm stuck at my current kernel version. hostnamectl returns:

Code: Select all

  Operating System: Linux Mint 20.1
       Kernel: Linux 5.4.0-58-generic
      Architecture: x86-64
This is accurate, I'm running on a Dell Latitude with an Intel processor. Note that the error message refers to /var/cache/apt/archives/linux-modules-5.4.0-60-generic_5.4.0-60.67_amd64.deb I suspect this is somehow the source of the error but my CLI-fu is too weak to use that clue.

Any and all help and advice greatly appreciated.

-dgrc

Re: Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 11:39 am
by Termy
(No space left on device)
Check your disk space.

Re: Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 11:43 am
by Flemur
dgrc wrote:
Thu Jan 14, 2021 11:16 am
failed to write (No space left on device)
I lot of things will fail until you fix that problem.

Please post the output of

Code: Select all

df
and, to see where the disk space is being used, also run

Code: Select all

sudo du -d 1 -hx / | sort -h
which will list the directories under "/" and their sizes, with the largest at the end.

Re: Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 3:48 pm
by dgrc
Here's the df dump -- sorry the formatting is so bad, it looked OK when I entered it and I don't know how to toggle of whitespace stripping:

Code: Select all

Filesystem                           1K-blocks        Used      Available     Use%    Mounted on
udev                                  3968264            0        3968264       0%    /dev
tmpfs                                  802844         1644         801200       1%    /run
/dev/mapper/mint--vg-root           120817368     46214748       68422372      41%    /
tmpfs                                 4014204          800        4013404       1%    /dev/shm
tmpfs                                    5120            4           5116       1%    /run/lock
tmpfs                                 4014204            0        4014204       0%    /sys/fs/cgroup
/dev/sda1                              720368       701184              0     100%    /boot <===== full 100%
tmpfs                                  802840           20         802820       1%    /run/user/1000
The culprit seems to be /boot but I'm not sure since I went for whole disk encryption when I installed Linux.

GParted shows /dev/sda1 as the boot partition with size = 731 MB, Used = 712.27MB which is basically 0% available. GParted also says none of the partitions can be resized, presumably because they're inside the encrypted partition.

If any of this information provides a useful clue, again, thank you in advance.

Meantime I'll to some research on resizing encrypted partitions.

Re: Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 4:02 pm
by Termy
For future reference, you can use code tags around the output you posted, to keep its formatting in-tact. Here's an image which might help:

Image

Re: Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 7:14 pm
by dgrc
Thanks. my BBCode is very rusty.

Re: Kernel update fails with odd error message

Posted: Thu Jan 14, 2021 7:25 pm
by ajgringo619
You most likely need to remove an old kernel or 2. From the menu, click System --> Update Manager. Click View --> Linux Kernels. Then click Remove Kernels. I recommend keeping at least 2; one will be the current one which you can't remove.