/boot out of space ?

11 posts / 0 new
Last post
#1 Sun, 03/24/2019 - 05:58
briand

/boot out of space ?

I am trying to update packages and tells me out of space. see log below.

Virtualmin Edit Mount shows : Disk usage Size 189.68 MB Free 8.81 MB

however, I did command: df -h /dev/sda1 190M 64M 112M 37% /boot

do I need to refresh something ? thanks Brian

Dependencies Resolved

================================================================================

Package Arch Version Repository Size

Installing: kernel x86_64 3.10.0-957.10.1.el7 updates 48 M Updating: kernel-headers x86_64 3.10.0-957.10.1.el7 updates 8.0 M kernel-tools x86_64 3.10.0-957.10.1.el7 updates 7.1 M kernel-tools-libs x86_64 3.10.0-957.10.1.el7 updates 7.0 M Removing: kernel x86_64 3.10.0-957.1.3.el7 @updates 63 M kernel x86_64 3.10.0-957.5.1.el7 @updates 63 M

Transaction Summary

Install 1 Package Upgrade 3 Packages Remove 2 Packages

Total size: 70 M Downloading packages: Running transaction check Running transaction test

Transaction check error: installing package kernel-3.10.0-957.10.1.el7.x86_64 needs 23MB on the /boot filesystem

Error Summary

Disk Requirements: At least 23MB more space needed on the /boot filesystem.

.. install failed!

Mon, 03/25/2019 - 08:12
Welshman
Welshman's picture

Hi, try removing the old kernels first.

You can search for them with … depending on your distro.

rpm -qa | grep kernel

A list like this should show up e.g.:

kernel

kernel-old

kernel-older

You can remove the old kernels with e.g.:

rpm -e kernel-old

rpm -e kernel-older

Ubuntu is a bit different.

dpkg --list | grep linux-image

apt-get purge linux-image-******** etc

I personally make /boot to be 500MB

Be careful when removing kernels, always leave at least 1 currently being used. ;)

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Mon, 03/25/2019 - 13:06
scotwnw

If its Ubuntu/Debian you just 'apt autoremove'. This it will remove old unused kernels and will remove any unneeded packages from previously uninstalled programs as well.

Mon, 03/25/2019 - 13:37
Welshman
Welshman's picture

[post removed[

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Mon, 03/25/2019 - 14:18
andreychek

Welshman, name calling is for grade school. This is not the place for that kind of nonsense.

If you can't treat folks here with professionalism and respect, you're going to need to go somewhere else.

The rules here are very clear. You've been warned several times for the content of your posts, and you're not getting another.

Knock it off.

-Eric

Tue, 03/26/2019 - 13:09
Welshman
Welshman's picture

Sorry guys, drunk again.

Btw the apt-get autoremove will only work after the install of a new kernel so you still need to make space to get it installed in the first place yeah?

Make sense?

The 200MB auto setup for /boot needs increasing.

Kind regards,

Welshman.

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Tue, 03/26/2019 - 13:19
Welshman
Welshman's picture

Btw, you talk about grade school, when you going to use some decent forum software, not sure what Virtualmins hangup with Drupal is.

Woltlab is well today software.

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Wed, 03/27/2019 - 11:59
Welshman
Welshman's picture

Hi Briand, did removing some of the old kernels as suggested allow you to execute your desired command or are you still having difficulties?

Kind regards,

Welshman.

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Thu, 03/28/2019 - 08:43
Welshman
Welshman's picture

A more crude way, if you have sftp access as root is to login using a client like winscp etc go to the dir and delete the unwanted kernels directly to make space so you can run your update command successfully.

Care needed though. It's what I did a number of years ago when I had the same problem, the console commands above are actually from a Leaseweb server engineer

Regards.

Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.

Mon, 04/01/2019 - 03:15
briand

sorry for the late reply, I didn't get the responses from above, so I will have a look at this today (as I need to get it fixed) I belive I did remove old kernels,

** the issue seems to me to be the discrepancy between what free space there is : -- Virtualmin Edit Mount shows : Disk usage Size 189.68 MB Free 8.81 MB" -- df -h /dev/sda1 190M 64M 112M 37% /boot

thanks for the tips. Brian

Mon, 04/01/2019 - 04:05
Kiekomick
Kiekomick's picture

Many years ago I had a similar problem and found a way to remove all old kernels from my Ubuntu system in one go.
Only the current one remains.

sudo apt-get remove -y --purge $(dpkg -l 'linux-*') | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')   sudo apt-get autoremove -y && apt-get autoclean -y && apt-get clean -y && apt-get update && reboot

After every kernel update I used this and since then I have a clean boot directory.
And by clean boot directory I mean that only the current kernel is represented.
I hope it helps you with your problem and you can implement it in your distro accordingly.

regards