[Solved] Boot partition is full

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
User avatar
boris241
Level 1
Level 1
Posts: 11
Joined: Thu May 11, 2017 9:00 pm
Location: SK Canada

[Solved] Boot partition is full

Postby boris241 » Wed Nov 01, 2017 5:19 pm

hello peeps...

my linux mint boot appears to be full. Yesterday message on bootup was 0 bytes remaining. After examaining as best I could and digging around, I freed up awhopping 560 bytes. Don't know what's up. Running inxi... reveals (snipt)
<Drives: HDD Total Size: 500.1GB (3.9% used)
ID-1: /dev/sda model: ST500LT012 size: 500.1GB temp: 33C
Partition: ID-1: / size: 454G used: 15G (4%) fs: ext4 dev: /dev/dm-0
ID-2: /boot size: 473M used: 448M (100%) fs: ext2 dev: /dev/sda2
ID-3: swap-1 size: 3.72GB used: 0.00GB (0%) fs: swap dev: /dev/dm-1
RAID: No RAID devices: /proc/mdstat, md_mod kernel module pre....>

boot is full.
examining filesysyem and it reveals:
whole whack of archived and binary files in BOOT folder that I don't think belong there.
They can't be deleted or trashed or moved. It says I am not the owner and options to delete or otherwise are all greyed out.

The archive files are each 44.4MB, 8 of them, and go:
initrd.img -4.8.0.-53- generic thru to 4.10.0.-38 and labelled as archive files. There goes 400MB.
But wait there's more...
also... system map 4.80.thru 4.10.0 , each of which is 3.7 MB x 7. These are binaries.

also... vinlinuz (same sequence) 7.4MB x 8 . These are binaries too.
The archive files (each 44.4MB )are all dated Oct 25 so there was seeming to be some sort of update mishap at tht time. Yes? What are archive files doing in boot folder, and how do I rid them or move?

I tried to install gparted in interim to increase boot size but install failed.
Also, same thing for clonezilla (for backup) ... won't install.

YIKES!

Is there help for my situationne?
Last edited by boris241 on Thu Nov 02, 2017 3:55 am, edited 1 time in total.

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

Re: Boot partition is full

Postby WharfRat » Wed Nov 01, 2017 5:32 pm

Don't expand the boot partition :?

You have to clean-out the older kernels.

Paste back ls -lh /boot/vmlin*
Image ImageImage

User avatar
boris241
Level 1
Level 1
Posts: 11
Joined: Thu May 11, 2017 9:00 pm
Location: SK Canada

Re: Boot partition is full

Postby boris241 » Wed Nov 01, 2017 5:51 pm

thanks for quick reply...

-rw------- 1 root root 7.1M Jul 20 08:11 /boot/vmlinuz-4.10.0-28-generic
-rw------- 1 root root 7.1M Aug 1 21:58 /boot/vmlinuz-4.10.0-30-generic
-rw------- 1 root root 7.1M Aug 9 05:08 /boot/vmlinuz-4.10.0-32-generic
-rw------- 1 root root 7.1M Aug 11 11:59 /boot/vmlinuz-4.10.0-33-generic
-rw------- 1 root root 7.1M Sep 13 05:16 /boot/vmlinuz-4.10.0-35-generic
-rw------- 1 root root 7.1M Oct 6 18:35 /boot/vmlinuz-4.10.0-37-generic
-rw------- 1 root root 7.1M Oct 10 12:32 /boot/vmlinuz-4.10.0-38-generic
-rw-r--r-- 1 root root 7.0M Jun 28 09:43 /boot/vmlinuz-4.8.0-53-generic

so what did that do?

did it change permissions? If so, what about systym map files and especially initrd files. will they necessarily follow as children to this?

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

Re: Boot partition is full

Postby WharfRat » Wed Nov 01, 2017 5:58 pm

The easiest way to do this is to copy and paste the following in the terminal (you can do it in one fell swoop)

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

It was submitted by another user in a script and works well.
Image ImageImage

User avatar
boris241
Level 1
Level 1
Posts: 11
Joined: Thu May 11, 2017 9:00 pm
Location: SK Canada

Re: Boot partition is full

Postby boris241 » Thu Nov 02, 2017 12:06 am

I will try that and will post back here as being solved, should that be the case.
I'll save this gem as a file somewhere for possible future use too.

Thank you very much.

o.t.: I smile at your animated bug gif. I e-mailed it to a friend as inline attach a year or so ago and never heard back from her. I think she thought I sent her a virus. lol. cheers and thx agn.

M.

User avatar
boris241
Level 1
Level 1
Posts: 11
Joined: Thu May 11, 2017 9:00 pm
Location: SK Canada

[Solved] Re: Boot partition is full

Postby boris241 » Thu Nov 02, 2017 12:38 am

Your script worked a wonder. Took about 6 minutes to run and did the trick.
Wonderful. Happy happy happy.
Freed up 2,162 MB
And boot folder now shows only latest kernel sans junk.

much obliged. :D

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

Re: [Solved] Boot partition is full

Postby WharfRat » Thu Nov 02, 2017 8:29 am

That script is available at viewtopic.php?f=213&t=250801

However it also does some additional clean-up tasks and there appears to be a bug with it.

What I provided here just cleared-out old and unused kernels.

You should do that when you're sure a kernel upgrade is OK and not let them pile-up :wink:
Image ImageImage

User avatar
boris241
Level 1
Level 1
Posts: 11
Joined: Thu May 11, 2017 9:00 pm
Location: SK Canada

Re: [Solved] Boot partition is full

Postby boris241 » Thu Nov 02, 2017 1:08 pm

That script is available at viewtopic.php?f=213&t=250801

However it also does some additional clean-up tasks and there appears to be a bug with it.

What I provided here just cleared-out old and unused kernels.

You should do that when you're sure a kernel upgrade is OK and not let them pile-up :wink:


that script is way long and appears to be buggy ( viz: as per log file deletions). What you kindly provided was sufficient for my needs and cleaned up considerably more than I was expecting. eg: [my] boot sector is only about 500mb , wherein my problem lay, yet your shorter script cleaned not only boot but also other fles to the extent of 2.1 gigs. bravo.
As for letting these 'pile up', I have been relying on 'bleach bit' for occasional housecleaning. It's available through the repos manager. -- must be used with discretion. Has usually worked great .

but... this is getting offtopic.
tnks for your help input.

cheers

Michael

DeltaTango
Level 2
Level 2
Posts: 56
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Postby DeltaTango » Sun Nov 12, 2017 10:40 am

Hello.

I tried the script because I have a similar problem (boot partition 100% full), but it seems it does not work .. because the partition is so full that it cannot event purge the old kernels.
viewtopic.php?f=46&t=256877&p=1387319#p1387319

jean.jordaan
Level 2
Level 2
Posts: 52
Joined: Sun Oct 04, 2015 5:01 am

Re: [Solved] Boot partition is full

Postby jean.jordaan » Tue Nov 21, 2017 2:40 am

I got the same thing: kernel install failed because `/boot` full.

On top of this, the way it's handled by Mint is disappointing:

- the failed kernel doesn't show up in the list of upgrades any more. I.e. the install took a nosedive, leaving the system in an undefined state, silently.
- manually running `apt-get install --fix-missing` (after moving a bunch of old `abi-`, `config-`, `System.map-`, and `vmlinux-` files out of the way) looks like it successfully completed installation of 4.10.0-40, but there was no indication from Mint that this was necessary or how to do it.

I think Mint should play safe: if there's not enough room in `/boot`, refuse to install new kernels.
Offer a safe way to purge old kernels, that's discoverable and usable by "Mint-level" end-users (not Arch users).

rlslemmer
Level 1
Level 1
Posts: 24
Joined: Fri Apr 21, 2017 3:41 am

Re: [Solved] Boot partition is full

Postby rlslemmer » Tue Nov 21, 2017 3:00 am

I too had my boot sector get too full. It happened after I used the update manager. I got the warning boot disc full. When I tried to reboot I got a kernel panic string. I found I could boot using an old kernel. I pasted the recommended string to the terminal and ran it and it appears to have removed all but the old kernel I used for the successful boot. Haven't tried to reboot yet to see if it works normally. I will have to eventually. Before I ran the string i copied what appeared to be the newest kernel to my desktop. Not all of the files for that kernel appeared to successfully copy. The archive did. Do you think I need to do anything else before attempting to reboot? :?:

DeltaTango
Level 2
Level 2
Posts: 56
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Postby DeltaTango » Tue Nov 21, 2017 6:54 am

If you have enough space now you deleted old kernels, try to install also the latest kernel properly.

rlslemmer
Level 1
Level 1
Posts: 24
Joined: Fri Apr 21, 2017 3:41 am

Re: [Solved] Boot partition is full

Postby rlslemmer » Wed Nov 22, 2017 6:51 am

rlslemmer wrote:I too had my boot sector get too full. It happened after I used the update manager. I got the warning boot disc full. When I tried to reboot I got a kernel panic string. I found I could boot using an old kernel. I pasted the recommended string to the terminal and ran it and it appears to have removed all but the old kernel I used for the successful boot. Haven't tried to reboot yet to see if it works normally. I will have to eventually. Before I ran the string i copied what appeared to be the newest kernel to my desktop. Not all of the files for that kernel appeared to successfully copy. The archive did. Do you think I need to do anything else before attempting to reboot? :?:


After having used the recommended string, I am able to reboot but for some reason when I suspend and try to come back from it all I get is a black screen. I have to shut down and restart to get anything at all. Is there something else going on here? :?:

DeltaTango
Level 2
Level 2
Posts: 56
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Postby DeltaTango » Wed Nov 22, 2017 7:21 am

I am not sure I understand your problem .. Could you describe it more precisely ?

rlslemmer
Level 1
Level 1
Posts: 24
Joined: Fri Apr 21, 2017 3:41 am

Re: [Solved] Boot partition is full

Postby rlslemmer » Wed Nov 22, 2017 3:48 pm

I used to come back to a sign in as user when I came back from suspend. Now I get a black screen - nothing. I have to reboot every time. My current desktop is then gone.

rlslemmer
Level 1
Level 1
Posts: 24
Joined: Fri Apr 21, 2017 3:41 am

Re: [Solved] Boot partition is full

Postby rlslemmer » Thu Nov 23, 2017 12:02 pm

Not sure what happened. Things are back to normal and I didn't do anything. So, now no problem. :?

DeltaTango
Level 2
Level 2
Posts: 56
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Postby DeltaTango » Fri Nov 24, 2017 4:57 am

Ok. Than : happy to know you sorted it out.


Return to “Installation & Boot”