The volume "boot" has only 0 bytes disk space remaining.[Solved]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
terry_g
Level 1
Level 1
Posts: 16
Joined: Mon Aug 28, 2017 11:10 am

The volume "boot" has only 0 bytes disk space remaining.[Solved]

Post by terry_g » Sun Oct 07, 2018 8:10 pm

I just did an update that included a kernel and got the following message:
The volume "boot" has only 0 bytes disk space remaining.
I suspect that there are a large number of kernels that could be cleaned up.
Any help would be greatly appreciated.

Terry
Last edited by terry_g on Mon Oct 08, 2018 7:37 pm, edited 1 time in total.

User avatar
WharfRat
Level 20
Level 20
Posts: 11699
Joined: Thu Apr 07, 2011 8:15 pm

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by WharfRat » Sun Oct 07, 2018 9:16 pm

Before removing anything make sure the update completed successfully and reboot to the latest kernel.

Check with ls -lh /boot/|grep vmlin and uname -r

Make sure uname -r returns the latest kernel version of the list.
ImageImage

User avatar
AZgl1500
Level 9
Level 9
Posts: 2746
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes sweeping down the plains
Contact:

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by AZgl1500 » Sun Oct 07, 2018 9:56 pm

at a minimum, keep the last oldest version, so you can backup if the newest kernel has a hiccup.

User avatar
Pierre
Level 17
Level 17
Posts: 7566
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by Pierre » Sun Oct 07, 2018 10:00 pm

this has become an re-occurring issue on the new LM 19 series,
& there is a few ways of dealing with it, & this is just one way:

- reboot your machine & from the Main Boot Menu:
select the Option "Advanced Options for Linux Mint 19 XXXX"
( where XXXX is your Desktop version & on this machine,, that is the Mate version.
then select the Option "Linux Mint 19 XXXX, with Linux 4.15.0-36- generic ( recovery mode )
( select the Kernel version that is the highest version - 4.15.0-36 in this case )

- wait for the Recovery Menu to load:
select the "Clean" option - which is the second option in the Menu
- select Yes at the prompt screen & then type Y for the next CLI prompt,
in order to Remove some of the Older Kernels in your system.

- Press Enter at the Final Prompt, to return to the Main Recovery Screen,
and then Resume to start a Normal Boot Sequence.

NB: in some cases, the Normal Resume may fail, as the Video may be incorrect,
and in this case,, force a Full Shutdown of your machine,
by holding down the Power Button, until you can see the Shutdown Sequence on the screen,
& then release that Power Button - - then restart your machine, as normal.

NB2: if you hold that Power Button down for too long, then you will force the machine to Hard Shutdown .. ..

NB3: this method does use the sudo apt-get autoremove command, to achieve this.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

terry_g
Level 1
Level 1
Posts: 16
Joined: Mon Aug 28, 2017 11:10 am

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by terry_g » Mon Oct 08, 2018 9:31 am

Thanks Pierre
I ran the commands as you said and still get the same warning after boot.
I have seven kernels installed and am running the latest.

Terry

User avatar
Pierre
Level 17
Level 17
Posts: 7566
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by Pierre » Mon Oct 08, 2018 9:36 am

did that give any indication, as to if anything did get removed ?.

from Gparted, can you post a screen_shot of that HDD?
- this can be installed from Package Manager AKA synaptic - if it's not already installed.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

User avatar
WharfRat
Level 20
Level 20
Posts: 11699
Joined: Thu Apr 07, 2011 8:15 pm

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by WharfRat » Mon Oct 08, 2018 12:10 pm

This might be easier to use.

Copy the following into a text editor page

Code: Select all

#!/bin/bash
#     
# clean_boot
#
CURKERNEL=$(uname -r|sed 's/-*[a-z]//g'|sed 's/-386//g')
LINUXPKG="linux-(image|headers|modules|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"
     
if [ $USER != root ]; then
	echo -e $RED"Error: must be root"
	echo -e $YELLOW"Exiting..."$ENDCOLOR
	exit 0
fi
     
echo -e $YELLOW"Removing old kernels..."$ENDCOLOR
sudo apt-get purge $OLDKERNELS
   
echo -e $YELLOW"Script Finished!"$ENDCOLOR

exit $?


Save it as clean_boot then in the terminal chmod u+x clean_boot then sudo ./clean_boot

You will have the chance to say no if things don't look right.
ImageImage

gm10
Level 12
Level 12
Posts: 4135
Joined: Thu Jun 21, 2018 5:11 pm

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by gm10 » Mon Oct 08, 2018 12:14 pm

Pierre wrote:
Sun Oct 07, 2018 10:00 pm
NB3: this method does use the sudo apt-get autoremove command, to achieve this.
You cannot autoremove kernels on Ubuntu, they are specifically excluded from that. I don't have the script the clean option runs at hand though, maybe it overrides that.

OP, if you still need help after the suggestions above (I doubt the clean boot option will work but maybe I'm wrong, I'm sure the script one up will fail though), please first post output of this terminal command

Code: Select all

inxi -Fxz
and I'll talk you through it.
Pierre wrote:
Sun Oct 07, 2018 10:00 pm
this has become an re-occurring issue on the new LM 19 series,
sadly... I've also had a bunch of full / root partitions here recently. They should add a better warning for this and/or automated remedies. :?

terry_g
Level 1
Level 1
Posts: 16
Joined: Mon Aug 28, 2017 11:10 am

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by terry_g » Mon Oct 08, 2018 3:26 pm

Here it is:

Code: Select all

tglover@tglover-desktop ~ $ inxi -Fxz
System:    Host: tglover-desktop Kernel: 4.15.0-36-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: MATE 1.18.0 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.2 Sonya
Machine:   Mobo: ASRock model: J4205-ITX
           Bios: American Megatrends v: P1.40 date: 07/14/2017
CPU:       Quad core Intel Pentium J4205 (-MCP-) cache: 1024 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11980
           clock speeds: max: 2600 MHz 1: 1339 MHz 2: 1369 MHz 3: 1342 MHz
           4: 1299 MHz
Graphics:  Card: Intel Device 5a84 bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1920x1080@60.00hz
           GLX Renderer: Mesa DRI Intel HD Graphics 505 (Broxton)
           GLX Version: 3.0 Mesa 18.0.5 Direct Rendering: Yes
Audio:     Card Intel Device 5a98 driver: snd_hda_intel bus-ID: 00:0e.0
           Sound: Advanced Linux Sound Architecture v: k4.15.0-36-generic
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: e000 bus-ID: 01:00.0
           IF: enp1s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 1320.3GB (11.2% used)
           ID-1: /dev/sda model: ST3320620AS size: 320.1GB
           ID-2: /dev/sdb model: ST1000DM010 size: 1000.2GB
Partition: ID-1: / size: 286G used: 54G (20%) fs: ext4 dev: /dev/dm-0
           ID-2: /boot size: 472M used: 451M (100%) fs: ext2 dev: /dev/sda1
           ID-3: swap-1 size: 8.23GB used: 0.00GB (0%) fs: swap dev: /dev/dm-1
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 31.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 176 Uptime: 8 min Memory: 712.8/7635.4MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35 
tglover@tglover-desktop ~ $
Last edited by Moem on Mon Oct 08, 2018 3:32 pm, edited 1 time in total.
Reason: Adding [code] tags. They retain some formatting that makes your output easier to read.

gm10
Level 12
Level 12
Posts: 4135
Joined: Thu Jun 21, 2018 5:11 pm

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by gm10 » Mon Oct 08, 2018 3:36 pm

Interesting, isn't that the latest kernel? Surprised you managed to boot to that despite the error message.

Here, let's have some fun, run this in a terminal (copy & paste as a whole):

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed s/-generic//)/d" -e 's/.*/sudo rm -rfv \/boot\/*-&-*/'|source /dev/stdin
Followed by this:

Code: Select all

sudo apt-get install -f -y
sudo apt-get autoremove --purge -y
sudo update-grub
(I don't need to see the output, the first one will probably generate a bunch of errors)

and finally this:

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed 's/-generic//')/d" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
It's possible this one generates errors, in that case I'd like to see them. They'll probably be repetitive for every kernel this runs through, one example of that is enough. :)
Last edited by gm10 on Mon Oct 08, 2018 7:39 pm, edited 1 time in total.

User avatar
administrollaattori
Level 14
Level 14
Posts: 5471
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by administrollaattori » Mon Oct 08, 2018 3:37 pm

LVM is a headache if (and when) /boot partition is too small for normal use. :roll:

terry_g
Level 1
Level 1
Posts: 16
Joined: Mon Aug 28, 2017 11:10 am

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by terry_g » Mon Oct 08, 2018 7:32 pm

Thanks! gm10
The last command did not generate any errors. I will reboot now and see what happens.

Terry

terry_g
Level 1
Level 1
Posts: 16
Joined: Mon Aug 28, 2017 11:10 am

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by terry_g » Mon Oct 08, 2018 7:36 pm

Thanks again gm10 I rebooted and using gparted my /boot is at 19%.

Terry

gm10
Level 12
Level 12
Posts: 4135
Joined: Thu Jun 21, 2018 5:11 pm

Re: The volume "boot" has only 0 bytes disk space remaining.[Solved]

Post by gm10 » Mon Oct 08, 2018 7:38 pm

Ah, a smooth run, those are my preferred, and no doubt yours, too. You're welcome. ;)

User avatar
Pierre
Level 17
Level 17
Posts: 7566
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by Pierre » Mon Oct 08, 2018 11:02 pm

gm10 wrote:
Mon Oct 08, 2018 12:14 pm
Pierre wrote:
Sun Oct 07, 2018 10:00 pm
NB3: this method does use the sudo apt-get autoremove command, to achieve this.
You cannot autoremove kernels on Ubuntu, they are specifically excluded from that. I don't have the script the clean option runs at hand though, maybe it overrides that.
so far - - my method has worked for my machine,
but there is another machine, that also has the Disk Full Error,
and when I'm able to get over to that house, then I'll be able to check again, what does work.
8)
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.

gm10
Level 12
Level 12
Posts: 4135
Joined: Thu Jun 21, 2018 5:11 pm

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by gm10 » Tue Oct 09, 2018 2:05 am

Pierre wrote:
Mon Oct 08, 2018 11:02 pm
so far - - my method has worked for my machine,
but there is another machine, that also has the Disk Full Error,
and when I'm able to get over to that house, then I'll be able to check again, what does work.
8)
Interesting. The usual problem with disk full on separate boot partitions is that the removal script needs to create temporary files on the partition and fails because of that. That's why I didn't expect the clean to work. Might have to give this a try in a VM one of these days.

Tootler
Level 1
Level 1
Posts: 28
Joined: Sun Jul 17, 2011 11:50 am
Location: Middlesbrough, UK

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by Tootler » Tue Oct 16, 2018 3:20 pm

gm10 wrote:
Mon Oct 08, 2018 3:36 pm
Interesting, isn't that the latest kernel? Surprised you managed to boot to that despite the error message.

Here, let's have some fun, run this in a terminal (copy & paste as a whole):

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed s/-generic//)/d" -e 's/.*/sudo rm -rfv \/boot\/*-&-*/'|source /dev/stdin
Followed by this:

Code: Select all

sudo apt-get install -f -y
sudo apt-get autoremove --purge -y
sudo update-grub
(I don't need to see the output, the first one will probably generate a bunch of errors)

and finally this:

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed 's/-generic//')/d" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r sudo apt-get remove --purge -y
It's possible this one generates errors, in that case I'd like to see them. They'll probably be repetitive for every kernel this runs through, one example of that is enough. :)
Many thanks for this. I had the same problem and this worked a treat. It both updated the failed kernel update and I then tested by trying the pending updates which had failed and they went in fine. I'll have to hang on to these scripts for future use.

Once again thanks.
Geoff Walker
Middlesbrough, UK
HP G72 Laptop: Linux Mint 17

gm10
Level 12
Level 12
Posts: 4135
Joined: Thu Jun 21, 2018 5:11 pm

Re: The volume "boot" has only 0 bytes disk space remaining.

Post by gm10 » Tue Oct 16, 2018 3:25 pm

Tootler wrote:
Tue Oct 16, 2018 3:20 pm
Many thanks for this. I had the same problem and this worked a treat. It both updated the failed kernel update and I then tested by trying the pending updates which had failed and they went in fine. I'll have to hang on to these scripts for future use.

Once again thanks.
Thanks for the feedback, and you are very welcome. :D

Preferably you remove old kernels before it gets to this situation though (you can use Update Manager or the last script from my post for that).

Tootler
Level 1
Level 1
Posts: 28
Joined: Sun Jul 17, 2011 11:50 am
Location: Middlesbrough, UK

Re: The volume "boot" has only 0 bytes disk space remaining.[Solved]

Post by Tootler » Wed Oct 17, 2018 9:45 am

Thanks for the hint.

I wasn't aware of the issue until this happened. It seems to be a weakness in the update system that they don't deal with the old kernel in some way when you install an update to avoid the boot partition filling up with redundant files. If they did, this problem wouldn't arise at all.

The first thing I tried was autoremove and autoclean. When that didn't work, I looked in the forum. It took a bit of searching to find this thread as I was looking in the boot section of the forum not the newbies but a targeted search found it in the end and I didn't need to post a new query.

I've saved your scripts for future use, thanks.

Cheers

Geoff
Last edited by Tootler on Wed Oct 17, 2018 9:49 am, edited 1 time in total.
Geoff Walker
Middlesbrough, UK
HP G72 Laptop: Linux Mint 17

gm10
Level 12
Level 12
Posts: 4135
Joined: Thu Jun 21, 2018 5:11 pm

Re: The volume "boot" has only 0 bytes disk space remaining.[Solved]

Post by gm10 » Wed Oct 17, 2018 9:47 am

Tootler wrote:
Wed Oct 17, 2018 9:45 am
I wasn't aware of the issue until this happened. It seems to be a weakness in the update system that they don't remove . the old kernel or, at least move it somewhere else in case in case problems arise when you install an update. If they did, this problem wouldn't arise at all.
I agree. If you want, here's a version of my script that will set it up to run automatically every week, removing all but your current kernel, that way you won't have to worry about it again:

Code: Select all

F=/etc/cron.weekly/purge_old_kernels;echo '#!/bin/bash'|sudo tee $F;echo "dpkg-query -W -f '\${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e \"/\$(uname -r|sed 's/-generic//')/d\" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r apt-get remove --purge -y"|sudo tee -a $F;sudo chmod +x $F
(yes, I enjoy creating super long and complicated looking command lines :lol:)

Post Reply

Return to “Newbie Questions”