[SOLVED] Low disk space on "boot".......

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Function

[SOLVED] Low disk space on "boot".......

Post by Function »

Hello,

I'm a utterly novice on Linux mint and terminal!!!!!!

When updating I get the messages:

Low disk space on "boot".
and
The volume "boot" has only 9,1mb disk space remaining

An error occured
E: linux-image-4.4.0-116-generic: subprocess installed post-installation script returned error exit status 2
E: linux-image-extra-4.4.0-116-generic: dependency problems - leaving unconfigured
E: linux-image-generic-lts-xenial: dependency problems - leaving unconfigured
E: linux-generic-lts-xenial: dependency problems - leaving unconfigured

I have tried the follow in terminal:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair


with no changes

In "boot" (disk usage analyzer):
is the "efi" a full double red circle (1,6 % 3,3 mb 7 items).

In terminal de command "df"gives:

Code: Select all

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             3775632        4   3775628   1% /dev
tmpfs             759044     1372    757672   1% /run
/dev/dm-0      952856484 13295100 891136016   2% /
none                   4        0         4   0% /sys/fs/cgroup
none                5120        0      5120   0% /run/lock
none             3795208    28136   3767072   1% /run/shm
none              102400       16    102384   1% /run/user
/dev/sda2         241965   206658     22815  91% /boot
/dev/sda1         523248     3240    520008   1% /boot/efi
So in conclusion: can't update any more because of low disk apace in boot.

Is there somebody who can help me with this problem? (for terminal: please give exact commands)

greetings from the Netherlands....
Last edited by Function on Thu Mar 15, 2018 11:56 pm, edited 2 times in total.
WharfRat

Re: Low disk space on "boot".......

Post by WharfRat »

Hello Function Image

Welcome to Linux Mint and the Linux Mint forum :)

Your problem will be resolved if you follow these instructions from this thread viewtopic.php?f=46&t=256436&hilit=boot+full#p1383331

Good luck :wink:
Function

Re: Low disk space on "boot".......

Post by Function »

Thanx for the quick response!

I gonna copy and paste in terminal :

OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"
sudo apt-get purge $OLDKERNELS
Function

Re: Low disk space on "boot".......

Post by Function »

How do I know if it worked?

This is the result in Terminal:

Code: Select all

t@t-imedia-S2185 ~ $ OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
t@t-imedia-S2185 ~ $ CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
t@t-imedia-S2185 ~ $ LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
t@t-imedia-S2185 ~ $ METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
t@t-imedia-S2185 ~ $ OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
t@t-imedia-S2185 ~ $ YELLOW="\033[1;33m"
t@t-imedia-S2185 ~ $ RED="\033[0;31m"
t@t-imedia-S2185 ~ $ ENDCOLOR="\033[0m"
t@t-imedia-S2185 ~ $ sudo apt-get purge $OLDKERNELS
[sudo] password for XXXXXXXXXXXX
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libqt5serialport5
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-generic-lts-xenial* linux-headers-3.16.0-38*
  linux-headers-3.16.0-38-generic* linux-headers-4.4.0-109*
  linux-headers-4.4.0-109-generic* linux-headers-4.4.0-111*
  linux-headers-4.4.0-111-generic* linux-headers-4.4.0-116*
  linux-headers-4.4.0-116-generic* linux-headers-generic-lts-xenial*
  linux-image-3.16.0-38-generic* linux-image-4.4.0-109-generic*
  linux-image-4.4.0-111-generic* linux-image-4.4.0-116-generic*
  linux-image-extra-3.16.0-38-generic* linux-image-extra-4.4.0-109-generic*
  linux-image-extra-4.4.0-111-generic* linux-image-extra-4.4.0-116-generic*
  linux-image-generic-lts-xenial* linux-kernel-generic*
0 upgraded, 0 newly installed, 20 to remove and 21 not upgraded.
4 not fully installed or removed.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
t@t-imedia-S2185 ~ $
Last edited by Function on Sun Mar 04, 2018 10:18 am, edited 1 time in total.
Reason: Added code tag
WharfRat

Re: Low disk space on "boot".......

Post by WharfRat »

Your update manager might have been updating at the same time you attempted to clean the old kernels so check the check the update manager panel icon.

If it's not updating then you probably have a dangling lock file so run sudo rm /var/cache/apt/archives/lock first.
Function

Re: Low disk space on "boot".......

Post by Function »

i Did

Code: Select all

sudo rm /var/cache/apt/archives/lock


with no effect in terminal

Update managers says now it's up to date. But the update before that couldn't fully update.

I think there will be an issue again with a new update....
WharfRat

Re: Low disk space on "boot".......

Post by WharfRat »

If nothing showed in the terminal then it removed the lock file otherwise you would have gotten a file not found error.

Try pasting the lines from the link I provided again.
Function

Re: Low disk space on "boot".......

Post by Function »

rm: cannot remove ‘/var/cache/apt/archives/lock’: No such file or directory
Sir Charles

Re: Low disk space on "boot".......

Post by Sir Charles »

Function wrote: Sun Mar 04, 2018 10:52 am rm: cannot remove ‘/var/cache/apt/archives/lock’: No such file or directory
Hi Function,
You are already done with removing the lock file. Therefore there is no more such file to remove.
Proceed as suggested by @WharfRat with running the script you got from that link.
Good luck!
Function

Re: Low disk space on "boot".......

Post by Function »

Thanx you, I thought I had to do the above: sudo rm /var/cache/apt/archives/lock

So again:

Code: Select all

OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
YELLOW="\033[1;33m"
RED="\033[0;31m"
ENDCOLOR="\033[0m"
sudo apt-get purge $OLDKERNELS
There is happening something: Asks:
After this operation, 1191 MB disk space will be freed.
Do you want to continue? [Y/n] y

Yes yeah :)

Then there is a pop up whit the message: Low disk Space on "Boot", the volume has only 11,6 MB disk place remaining: examine/ignore
Function

Re: Low disk space on "boot".......

Post by Function »

Code: Select all

t@t-imedia-S2185 ~ $ OLDCONF=$(dpkg -l|grep "^rc"|awk '{print $2}')
t@t-imedia-S2185 ~ $ CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
t@t-imedia-S2185 ~ $ LINUXPKG="linux-(image|headers|ubuntu-modules|restricted-modules)"
t@t-imedia-S2185 ~ $ METALINUXPKG="linux-(image|headers|restricted-modules)-(generic|i386|server|common|rt|xen)"
t@t-imedia-S2185 ~ $ OLDKERNELS=$(dpkg -l|awk '{print $2}'|grep -E $LINUXPKG |grep -vE $METALINUXPKG|grep -v $CURKERNEL)
t@t-imedia-S2185 ~ $ YELLOW="\033[1;33m"
t@t-imedia-S2185 ~ $ RED="\033[0;31m"
t@t-imedia-S2185 ~ $ ENDCOLOR="\033[0m"
t@t-imedia-S2185 ~ $ sudo apt-get purge $OLDKERNELS
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following package was automatically installed and is no longer required:
  libqt5serialport5
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
  linux-generic-lts-xenial* linux-headers-3.16.0-38*
  linux-headers-3.16.0-38-generic* linux-headers-4.4.0-109*
  linux-headers-4.4.0-109-generic* linux-headers-4.4.0-111*
  linux-headers-4.4.0-111-generic* linux-headers-4.4.0-116*
  linux-headers-4.4.0-116-generic* linux-headers-generic-lts-xenial*
  linux-image-3.16.0-38-generic* linux-image-4.4.0-109-generic*
  linux-image-4.4.0-111-generic* linux-image-4.4.0-116-generic*
  linux-image-extra-3.16.0-38-generic* linux-image-extra-4.4.0-109-generic*
  linux-image-extra-4.4.0-111-generic* linux-image-extra-4.4.0-116-generic*
  linux-image-generic-lts-xenial* linux-kernel-generic*
0 upgraded, 0 newly installed, 20 to remove and 21 not upgraded.
4 not fully installed or removed.
After this operation, 1191 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 303835 files and directories currently installed.)
Removing linux-kernel-generic (4.4.0-lts1) ...
Removing linux-generic-lts-xenial (4.4.0.116.98) ...
Removing linux-image-generic-lts-xenial (4.4.0.116.98) ...
Removing linux-image-extra-4.4.0-116-generic (4.4.0-116.140~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
Error! Bad return status for module build on kernel: 4.4.0-116-generic (x86_64)
Consult /var/lib/dkms/ndiswrapper/1.59/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-116-generic
Warning: No support for locale: en_US.utf8
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
Generating grub configuration file ...
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-116-generic
Found initrd image: /boot/initrd.img-4.4.0-116-generic
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
Found linux image: /boot/vmlinuz-4.4.0-111-generic
Found initrd image: /boot/initrd.img-4.4.0-111-generic
Found linux image: /boot/vmlinuz-4.4.0-109-generic
Found initrd image: /boot/initrd.img-4.4.0-109-generic
Found linux image: /boot/vmlinuz-3.16.0-38-generic
Found initrd image: /boot/initrd.img-3.16.0-38-generic
Adding boot menu entry for EFI firmware configuration
done
Purging configuration files for linux-image-extra-4.4.0-116-generic (4.4.0-116.140~14.04.1) ...
Removing linux-image-4.4.0-116-generic (4.4.0-116.140~14.04.1) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
dkms: removing: virtualbox-guest 4.3.36 (4.4.0-116-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  virtualbox-guest
Version: 4.3.36
Kernel:  4.4.0-116-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxguest.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-116-generic/
rmdir: failed to remove ‘’: No such file or directory
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxsf.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-116-generic/
rmdir: failed to remove ‘’: No such file or directory
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxvideo.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-116-generic/
rmdir: failed to remove ‘’: No such file or directory
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-116-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-116-generic /boot/vmlinuz-4.4.0-116-generic
Generating grub configuration file ...
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-112-generic
Found initrd image: /boot/initrd.img-4.4.0-112-generic
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
error: cannot read `/dev/sda': Input/output error.
..................and still going..................
WharfRat

Re: Low disk space on "boot".......

Post by WharfRat »

You shouldn't let outdated kernels pile up. After a kernel upgrade, if everything is OK with the latest one after a few day of running, you should run the script lines to remove the prior kernel.

You can also save the lines as a script so you can run it with one line in the terminal e,g,, sudo ./clean_kernels.sh
Function

Re: Low disk space on "boot".......

Post by Function »

It's done.

It took a while.....

And now????
Function

Re: Low disk space on "boot".......

Post by Function »

Do I still have to run

Code: Select all

sudo ./clean_kernels.sh
????
Function

Re: Low disk space on "boot".......

Post by Function »

In

Code: Select all

dh
I see a change:

/dev/sda2 241965 58137 171336 26% /boot
instead of
/dev/sda2 241965 206658 22815 91% /boot

That's promising....
WharfRat

Re: Low disk space on "boot".......

Post by WharfRat »

If you run ls -lh /boot/|grep vmlin you should only show one kernel now.

As far as the messages error: cannot read `/dev/sda': Input/output error. I've never encountered those before purging old kernels :?

If df now shows /dev/sda2 241965 58137 171336 26% /boot then your boot partition was cleaned-up.

Hopefully there are no ill effects related to those Input/output errors.
Function

Re: Low disk space on "boot".......

Post by Function »

Code: Select all

ls -lh /boot/|grep vmlin 
gives: -rw------- 1 root root 6,7M Jan 24 00:00 vmlinuz-4.4.0-112-generic

Looks like the problem is solved. Can't wait for the next update.



Can those 'input/output errors' have to do with that there is a 'partition' that won't 'mount'?
There is windows 7 (?) on a partition of the disk that doesn't mount any more.
WharfRat

Re: Low disk space on "boot".......

Post by WharfRat »

Function wrote: Sun Mar 04, 2018 1:36 pm [Can those 'input/output errors' have to do with that there is a 'partition' that won't 'mount'?
There is windows 7 (?) on a partition of the disk that doesn't mount any more.
That's possible although the reference is /dev/sda and not a partition e.g., /dev/sda4

Another possibility is your / partition being on a raid device /dev/dm-0 and not /dev/sda or a combination of both.
Function

Re: Low disk space on "boot".......

Post by Function »

That's another problem for another day.....

WharfRat and Marziano,


Thanks for the effort and have a nice day (in the sun:-)
Sir Charles

Re: Low disk space on "boot".......

Post by Sir Charles »

You too, have a nice day, Function!
Cheers
Locked

Return to “Installation & Boot”