Boot drive 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.
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Boot drive full

Post by Overkill »

I was doing some updates on my laptop, and I get a message saying my 500mb boot drive is almost full :? How do I fix this? Should I make my boot drive bigger?

EDIT:
I was searching in the forums, and found this script so will this help in my situation?

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
LanceM

Re: Boot drive full

Post by LanceM »

If you want to remove old kernels, run

Code: Select all

sudo apt autoremove
Or you can do it with the Update Manager>View>Kernels>Remove Old Kernels.
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Re: Boot drive full

Post by Overkill »

LanceM wrote: Sat Jun 12, 2021 5:47 pm If you want to remove old kernels, run

Code: Select all

sudo apt autoremove
Or you can do it with the Update Manager>View>Kernels>Remove Old Kernels.
How many old kernels should I leave if any?

Problem!
Image
LanceM

Re: Boot drive full

Post by LanceM »

If you can't boot at all, you need to enter the grub menu at boot and go to Advanced. There you will see root. Use it to get to a command prompt. Then try

Code: Select all

sudo apt autoremove
I don't know if it will free space in your boot partition. I never create that partition, and am puzzled why a beginner would want that.
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Re: Boot drive full

Post by Overkill »

I never create that partition, and am puzzled why a beginner would want that.
Mint said I had to create a boot partition when installing. :?


Fixed!
I had to delete a few kernels in recovery mode.
Thanks Lance
LanceM

Re: Boot drive full

Post by LanceM »

You do not need a boot partition. Not in the official documentation. Besides that, a default install doesn't create one either. Generally it't just a bad idea unless you know why you want or need to. Guide: https://linuxmint-installation-guide.re ... stall.html
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Re: Boot drive full

Post by Overkill »

LanceM wrote: Sat Jun 12, 2021 8:06 pm You do not need a boot partition. Not in the official documentation. Besides that, a default install doesn't create one either. Generally it't just a bad idea unless you know why you want or need to. Guide: https://linuxmint-installation-guide.re ... stall.html
Then why does it always say I need an EFI Boot partition?
LanceM

Re: Boot drive full

Post by LanceM »

That will be created by a default install. It is different than a boot partition. The EFI partition It is needed on an EFI system, but not Legacy (older systems)
DPM
Level 4
Level 4
Posts: 430
Joined: Thu Sep 24, 2020 9:21 am

Re: Boot drive full

Post by DPM »

Overkill wrote: Sat Jun 12, 2021 7:33 pmFixed!
Then please edit the title of your first posting in this thread and add <SOLVED> before the title (use the leftmost of the four buttons on the right side of the start posting).
I had to delete a few kernels in recovery mode.
You should leave at least one older kernel than the current kernel so that you can switch back if need be. To prevent the problem from happening again, you can go to Mint's Update Manager where you go to Edit->Preferences->Automation, then activate the switch "Remove obsolete kernels and dependencies". Make sure you have set up your Timeshift properly before activating that switch.
LanceM

Re: Boot drive full

Post by LanceM »

I did a test. An offline install of Mint 20.1 Cinnamon. I created a 600MB Boot partition plus the 512MB EFI partition. I updated only one kernel, and it added about 100MB to the boot partition. Obviously it wouldn't take many to fill it.
4.jpg
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Re: Boot drive full

Post by Overkill »

LanceM wrote: Sat Jun 12, 2021 9:38 pm That will be created by a default install. It is different than a boot partition. The EFI partition It is needed on an EFI system, but not Legacy (older systems)
That's what my system is, uefi 2013 Laptop
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Re: Boot drive full

Post by Overkill »

Overkill wrote: Thu Jun 17, 2021 12:23 am
LanceM wrote: Sat Jun 12, 2021 9:38 pm That will be created by a default install. It is different than a boot partition. The EFI partition It is needed on an EFI system, but not Legacy (older systems)
That's what my system is, uefi 2013 Laptop
So I should add both a boot and efi from now on?
User avatar
Moem
Level 22
Level 22
Posts: 16230
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Boot drive full

Post by Moem »

Why do you want a boot partition? I've never had one.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1372
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Boot drive full

Post by ricardogroetaers »

Overkill wrote: Sat Jun 12, 2021 8:54 pm Then why does it always say I need an EFI Boot partition?
EFI partition is only needed on GPT disks and or firmware in UEFI mode only for booting.

Summary:
Has GPT disk -> mandatory EFI partition to boot (BIOS or UEFI mode) -> CORRECTION: disregard BIOS
It has UEFI mode enabled -> mandatory EFI partition to boot (MBR or GPT disk)
Last edited by ricardogroetaers on Fri Jun 18, 2021 2:40 am, edited 2 times in total.
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Boot drive full

Post by AndyMH »

ricardogroetaers wrote: Thu Jun 17, 2021 5:38 am
Overkill wrote: Sat Jun 12, 2021 8:54 pm Then why does it always say I need an EFI Boot partition?
EFI partition is only needed on GPT disks and or firmware in UEFI mode only for booting.

Summary:
Has GPT disk -> mandatory EFI partition to boot (BIOS or UEFI mode)
It has UEFI mode enabled -> mandatory EFI partition to boot (MBR or GPT disk)
Wrong in that you don't need an EFI partition on a GPT format drive if you want to boot legacy, you do need a bios_grub partition. You do need an EFI partition if you want to boot UEFI on either a legacy or GPT drive.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
Overkill
Level 3
Level 3
Posts: 130
Joined: Wed Dec 23, 2020 5:13 pm

Re: Boot drive full

Post by Overkill »

Moem wrote: Thu Jun 17, 2021 3:49 am Why do you want a boot partition? I've never had one.
So you just create a root and that's it? Do you manually partition or let Linux do all of the work?
DAMIEN1307

Re: Boot drive full

Post by DAMIEN1307 »

let the installer do all of the work...If this is the only operating system on this computer and not requireing a dual boot situation...just let the installer overwrite the disk and do its own thing...Thats how mine is configured and everything has always worked perfectly for me...DAMIEN
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1372
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: Boot drive full

Post by ricardogroetaers »

AndyMH wrote: Thu Jun 17, 2021 10:43 am Wrong in that you don't need an EFI partition on a GPT format drive if you want to boot legacy, you do need a bios_grub partition.
Perfect, thanks for the correction.
User avatar
Moem
Level 22
Level 22
Posts: 16230
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Boot drive full

Post by Moem »

Overkill wrote: Thu Jun 17, 2021 7:06 pm So you just create a root and that's it? Do you manually partition or let Linux do all of the work?
I create a root and a home. But that's because I like my home as a separate partition which is a preference.
I believe the second question has been answered, too.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Boot drive full

Post by AndyMH »

ricardogroetaers wrote: Fri Jun 18, 2021 12:42 am
AndyMH wrote: Thu Jun 17, 2021 10:43 am Wrong in that you don't need an EFI partition on a GPT format drive if you want to boot legacy, you do need a bios_grub partition.
Perfect, thanks for the correction.
This was linux only, I've no idea how windows behaves, suspect that it will sulk if you try and install in legacy on a gpt drive.

Note there are problems with the mint installer (ubiquity taken from ubuntu):
  • UEFI - if installing to separate drives in dual boot, it will use the first EFI partition it finds irrespective of what you tell it. Fixable by either disconnecting the first drive before install or disabling the esp & boot flags on the EFI partition you don't want it to use (and re-enabling after install).
  • Legacy - in the 'erase and install' and 'install alongside' options it will create a useless EFI partition and put everything else in an extended partition. The solution is to pre-partition your drive and use the 'something else' option. This is new to LM20, LM19 was okay.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Installation & Boot”