[Solved] Boot partition is full

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.
boris241

[Solved] Boot partition is full

Post by boris241 »

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.
WharfRat

Re: Boot partition is full

Post by WharfRat »

Don't expand the boot partition :?

You have to clean-out the older kernels.

Paste back ls -lh /boot/vmlin*
boris241

Re: Boot partition is full

Post by boris241 »

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?
WharfRat

Re: Boot partition is full

Post by WharfRat »

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.
boris241

Re: Boot partition is full

Post by boris241 »

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.
boris241

[Solved] Re: Boot partition is full

Post by boris241 »

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
WharfRat

Re: [Solved] Boot partition is full

Post by WharfRat »

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:
boris241

Re: [Solved] Boot partition is full

Post by boris241 »

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: 94
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Post by DeltaTango »

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: 78
Joined: Sun Oct 04, 2015 5:01 am

Re: [Solved] Boot partition is full

Post by jean.jordaan »

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

Re: [Solved] Boot partition is full

Post by rlslemmer »

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: 94
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Post by DeltaTango »

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

Re: [Solved] Boot partition is full

Post by rlslemmer »

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: 94
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Post by DeltaTango »

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

Re: [Solved] Boot partition is full

Post by rlslemmer »

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

Re: [Solved] Boot partition is full

Post by rlslemmer »

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: 94
Joined: Tue May 10, 2016 4:25 am

Re: [Solved] Boot partition is full

Post by DeltaTango »

Ok. Than : happy to know you sorted it out.
Nona
Level 1
Level 1
Posts: 30
Joined: Sun Nov 12, 2017 8:28 pm

Re: [Solved] Boot partition is full

Post by Nona »

Well, issue is still there as of today.
I got no space left in boot.
As a result I got 4.13.0-32.35 Installed but 4.13.0-32.35 Active.
And bunch of old kernels in /boot littering space.

Setting up linux-image-extra-4.13.0-32-generic (4.13.0-32.35~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-32-generic
Warning: No support for locale: en_CA.utf8

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.13.0-32-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.13.0-32-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.13.0-32-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up linux-image-extra-4.13.0-32-generic (4.13.0-32.35~16.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.0-32-generic /boot/vmlinuz-4.13.0-32-generic
update-initramfs: Generating /boot/initrd.img-4.13.0-32-generic
Warning: No support for locale: en_CA.utf8

gzip: stdout: No space left on device
cpio: write error: Broken pipe
E: mkinitramfs failure cpio 1 gzip 1
update-initramfs: failed for /boot/initrd.img-4.13.0-32-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.13.0-32-generic (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.13.0-32-generic
User avatar
Moem
Level 22
Level 22
Posts: 16193
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: [Solved] Boot partition is full

Post by Moem »

Nona wrote:Well, issue is still there as of today.
I got no space left in boot.
As a result I got 4.13.0-32.35 Installed but 4.13.0-32.35 Active.
And bunch of old kernels in /boot littering space.
Can you remove them in the usual way, through the update manager?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Nona
Level 1
Level 1
Posts: 30
Joined: Sun Nov 12, 2017 8:28 pm

Re: [Solved] Boot partition is full

Post by Nona »

Moem wrote:Can you remove them in the usual way, through the update manager?
This is exactly what I did.
But why user have to do it manually ?
Locked

Return to “Installation & Boot”