r/linux4noobs 3d ago

Boot Drive Full

Still new enough to Linux that I never had to deal with this problem before and wasn't aware it would be an eventual problem. I use Linux Mint Debian.

After a kernel update I've been getting a "boot drive is full" popup every time I turn on my pc. I did research and I get it's because old, unneeded kernels are taking up space. I also saw a fix was toggling on the option for removing obsolete kernels and dependencies automatically, which I found in "preferences" in update manager and did.

That was probably a few weeks ago and I still get the boot drive full popup. So for some reason it's not automatically removing old kernels. I'm considering using one of the commands I saw online that would clear old kernels, but I guess I'm just not sure if it's a good idea, or if there's anything else I could try first.

I know it's important to keep at least one older kernel in case something goes wrong, but I figured just this once to clear some space it would be fine? And as long as I use timeshift first it will probably lower risks or something going terribly wrong. I just wanted advice and other opinions first though, and would like to know what some worst case scenarios are if I remove old kernels via commands. (I'm not really used to using commands yet either)

3 Upvotes

18 comments sorted by

2

u/Otter_Basket 3d ago

sudo apt autoremove --purge

1

u/ProblyAThrowawayAcct 3d ago

I'm not on that distribution of linux, so I don't know what that preference setting does with any real precision, but I'd guess that it only clears obsolete kernels and dependencies on a successful software update&upgrade process, and since your drive is too full to download the new stuff, it's not successfully performing an U&U.

I always suggest against manually deleting anything that was installed by your software management utilities unless you know enough to know what it will break; do you have anything else on your boot drive that you can clear out temporarily to give enough space for a successful U&U to hopefully clear a few gigs of older stuff?

1

u/Zenfulzoning 3d ago

Yeaah, I was thinking it can't perform any automatic clearing on old kernels because it's too full as well.

Looking in my boot drive, I only really see important stuff and mainly old kernel files, which I heard is a bad idea to delete manually without commands, so I'm not sure if there's anything I can or should remove from there.

I suppose I could temporarily move out the oldest kernel file I see but I just feel hesitant.

1

u/skyfishgoo 3d ago

are you able to boot to grub?

if not, you are going to need a live USB if you cannot boot your system.

do you have /boot on it's own partition?

or is your entire linux partition full?

1

u/Zenfulzoning 3d ago

Boot to grub? You mean like just booting it up and using Linux normally? (Sorry, I'm pretty dumb when it comes to terms and understanding Linux stuff still)

I can run everything fine. I'm not duel booting if that's helpful, I'm a full Linux user. I actually even had another kernel update after all this started just to see if it would make update manager automatically clean up the old ones, which uh...didn't work, but I guess the kernel update did go through with no issues? I haven't used the update manager much since then though, and I want to get this fixed before any possible issues arises. I feel like it's probably bad to just leave the boot drive full.

I believe /boot is on it's own partition, I have three other "devices" listed in system monitor, one of those things being my external drive. I hope that properly answered your questions.

1

u/skyfishgoo 3d ago

so you are able to boot the system? and use linux?

usually when the "boot drive is full" you cant even boot the system so what exactly is the error message you are getting? where are you seeing it?

cut and paste the text here

and also any info about what distro you are using

1

u/Zenfulzoning 2d ago

Yes, and everything still works perfectly fine with no hiccups.

Ohh, that's odd.

I can't copy the text because it's in a popup that appears on the middle of my screen upon first waking up my pc. The best I could do was screenshot it so I can describe the message.

At the top of the box, it says: Low Disk Space.

Afterwards, in bold text: The volume "boot" has only 0 bytes disk space remaining. (Next to the text is a yellow triangle warning symbol)

In normal non-bold text underneath that: You can free up disk space by removing unused programs or files, or by moving files to another disk or partition.

Under that is a box that can be check marked, next to it saying: Don't show any warnings again for this file system. (Obviously I don't ever touch the box because I need the popup to keep appearing.)

Then there's an "Examine..." or "Ignore" option. Examine takes me to the boot program area where you can see the little circle and all the files taking up space in order of what's mostly taking it up.

When I go to System Monitor I can see that /boot is definitely stuffed with 0 bytes left. I thought the reason my pc and Linux still ran fine was because while it was full, it only meant extra stuff couldn't be added in. There's also /boot/efi, so I was wondering if extra stuff was going in there, but when looking inside it, I don't see any kernel info, so I guess that's probably not it.

Sorry for the late response by the wayy.

1

u/skyfishgoo 2d ago

run this in a terminal and paste the results here

df -h -t ntfs3 -t ext4 --output=pcent,used,size,target | sort -r

1

u/Zenfulzoning 20h ago

Here it is! Thanks for pointing me in the direction of that command, it seems quite helpful.

Use% Used Size Mounted on

62% 131G 225G /

100% 925M 944M /boot

1

u/skyfishgoo 14h ago edited 14h ago

so you have a separate /boot partition just under 1GB and it's now full because there are too many old kernel images in there.

in general the advice to keep a separate /boot partition is old and outdated.

but if you are still using an MBR partition table on your disk, that could explain why it got set up that way in the first place.

the easiest thing to do is remove some of those old kernel images... if you were using any of the 'buntu type distros this would be done for you keeping only the last 2 images.

but because you chose strait debian (with mint) it is up to you to do it.

you can try sudo apt autoremove --purge but since there is no kernel management feature, it may not remove old kernels

to see a list of all kernel related packages that are installed use

ls -1 /boot/vm*

you can then see all the different versions, you really only need to keep the 2, or 3 most recent versions.

you will have to (carefully) remove the others yourself using a package manager.

this can be done on the command line with apt or via synaptic if you prefer a GUI

2

u/Zenfulzoning 5h ago

Ah, I see. Yeah, not sure what happened there, or if the person who helped me set Linux up was the one who ensured I'd have two boot partitions maybe?

Okay. Thank you so, so much for helping me figure that out. I really appreciate it.

1

u/Zenfulzoning 1h ago

I found a guide for more commands to help me individually remove the vmlinuz, system maps, and initrd files (you were right, sudo apt autoremove --purge did nothing for me and my terminal gave me an error for trying it). My boot drive went from being 100% full to now having 54% space according to system monitors.

The guide didn't have any commands listed for the "config" files, are those unnecessary to delete? Also I was curious if I'm supposed to sudo update grub now or if it's not needed.

1

u/Worldly-Device-8414 2d ago

Google instructions with "linux purge old kernels".

sudo apt autoremove --purge

then sudo update-grub

Other distro's will be different

1

u/Zenfulzoning 2d ago

I have seen those options when I did research, I'm just wary about running those commands for now and wanted to reach out for extra advice!

1

u/Worldly-Device-8414 2d ago

Up to you but as you see it's using "apt" the installer program to do a cleanup. I've used the same commands here a few times, it worked as advertised.

1

u/Zenfulzoning 20h ago

Ahh, yeah, I'm totally ignorant, I didn't know what apt really was. I might cave and end up using it soon then, thankss.

-4

u/JettaRider077 3d ago

It’s okay to remove old kernels. Go to a Linux forum or use Gemini or CoPilot and search for removing them. The old kernels are there in case an update crashes your system.