LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2020, 04:29 PM   #1
BigVig
Member
 
Registered: Feb 2006
Location: Chicago
Distribution: Linux Mint 21.2 (xfce)
Posts: 143

Rep: Reputation: 16
Question Why is my /boot directory so very crowded?


I am using Linux Mint 20 Ulyana Xfce on an old laptop I bought from Freegeek Chicago. The original install was Linux Mint 19.4, I think.

Below is my boot directory.
matthew@matthew-ThinkPad-T430:~$ ls /boot
config-4.15.0-101-generic memtest86+.elf
config-4.15.0-106-generic memtest86+_multiboot.bin
config-4.15.0-108-generic System.map-4.15.0-101-generic
config-4.15.0-109-generic System.map-4.15.0-106-generic
config-4.15.0-54-generic System.map-4.15.0-108-generic
config-4.15.0-96-generic System.map-4.15.0-109-generic
config-4.15.0-99-generic System.map-4.15.0-54-generic
config-5.0.0-32-generic System.map-4.15.0-96-generic
config-5.3.0-45-generic System.map-4.15.0-99-generic
config-5.3.0-46-generic System.map-5.0.0-32-generic
config-5.3.0-51-generic System.map-5.3.0-45-generic
config-5.3.0-53-generic System.map-5.3.0-46-generic
config-5.3.0-59-generic System.map-5.3.0-51-generic
config-5.3.0-61-generic System.map-5.3.0-53-generic
config-5.3.0-62-generic System.map-5.3.0-59-generic
config-5.4.0-40-generic System.map-5.3.0-61-generic
grub System.map-5.3.0-62-generic
initrd.img System.map-5.4.0-40-generic
initrd.img-5.3.0-45-generic vmlinuz
initrd.img-5.3.0-46-generic vmlinuz-5.3.0-45-generic
initrd.img-5.3.0-51-generic vmlinuz-5.3.0-46-generic
initrd.img-5.3.0-53-generic vmlinuz-5.3.0-51-generic
initrd.img-5.3.0-59-generic vmlinuz-5.3.0-53-generic
initrd.img-5.3.0-61-generic vmlinuz-5.3.0-59-generic
initrd.img-5.3.0-62-generic vmlinuz-5.3.0-61-generic
initrd.img-5.4.0-40-generic vmlinuz-5.3.0-62-generic
initrd.img.old vmlinuz-5.4.0-40-generic
memtest86+.bin vmlinuz.old
matthew@matthew-ThinkPad-T430:~$


matthew@matthew-ThinkPad-T430:~$ uname -a
Linux matthew-ThinkPad-T430 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


My question is why is there so much stuff in the /boot directory? It doesn't seem to be affecting the operation of the computer, but it does bug me that there could so much 'cruft' (is that what is called?) on my laptop.

Is it worth erasing all of the init, vmlinuz, System.map and config files that are not the current kernel?

The laptop runs fine, and I have used it for personal and professional tasks with almost no problem.

Thanks in advance!

Last edited by BigVig; 07-09-2020 at 04:30 PM.
 
Old 07-09-2020, 04:37 PM   #2
Meow1234
Member
 
Registered: Jul 2020
Distribution: Kubuntu 21.04
Posts: 56

Rep: Reputation: Disabled
You have upgraded your kernel many times, it seems. That’s why there are many kernels and initrds. If you want you can delete some but I recommend you keep at least 2 kernels with their config files and initrds. Also keep the memory test and don’t touch the grub folder. Then run sudo update-grub to remove any useless entries in the grub menu.
 
1 members found this post helpful.
Old 07-09-2020, 04:39 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
Code:
initrd.img-5.3.0-45-generic vmlinuz
initrd.img-5.3.0-46-generic vmlinuz-5.3.0-45-generic
initrd.img-5.3.0-51-generic vmlinuz-5.3.0-46-generic
initrd.img-5.3.0-53-generic vmlinuz-5.3.0-51-generic
initrd.img-5.3.0-59-generic vmlinuz-5.3.0-53-generic
initrd.img-5.3.0-61-generic vmlinuz-5.3.0-59-generic
initrd.img-5.3.0-62-generic vmlinuz-5.3.0-61-generic
initrd.img-5.4.0-40-generic vmlinuz-5.3.0-62-generic
Those are kernels. When you update, looks like the old kernels are staying put. Are you suppose to delete them manually, or with your package manager?
 
Old 07-09-2020, 04:45 PM   #4
Meow1234
Member
 
Registered: Jul 2020
Distribution: Kubuntu 21.04
Posts: 56

Rep: Reputation: Disabled
Oh, one more thing. DON’T DELETE YOUR CURRENT KERNEL!!! Applications and drivers might become incompatible and you’ll brick your Linux Mint install.
 
1 members found this post helpful.
Old 07-09-2020, 04:50 PM   #5
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 338

Rep: Reputation: Disabled
Quote:
Originally Posted by BigVig View Post
My question is why is there so much stuff in the /boot directory?
AS the previous poster has said, the kernel appears to have been updated a few times, and each time the kernel is updated the system creates the necessary files it needs to boot the "new" kernel.

The previous poster also suggested keeping at least two kernels. Which means you have a rescue kernel if something changes and the latest kernel does not boot.

Quote:
Is it worth erasing all of the init, vmlinuz, System.map and config files that are not the current kernel?
My return question is are they taking up so much room that space on the hard drive that your data can not be retained? If not I'd leave them there.

Quote:
The laptop runs fine, and I have used it for personal and professional tasks with almost no problem.
Why would you consider fixing something which is giving you almost no problem?

By the way, when you say almost no problem, what are the problem(s)?
 
1 members found this post helpful.
Old 07-09-2020, 05:21 PM   #6
BigVig
Member
 
Registered: Feb 2006
Location: Chicago
Distribution: Linux Mint 21.2 (xfce)
Posts: 143

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by quickbreakfast View Post
Why would you consider fixing something which is giving you almost no problem?

By the way, when you say almost no problem, what are the problem(s)?
The short answer is just Mint being Mint. Plus, it bugs me when I look at it.

Long answer is I wanted some of the functionality to be the same as when typing in Windows10. For example, ctrl+esc opens a floating menu, not the 'start' menu, in Mint Xfce. And I have not had the time to search for the way to change that. So just little things.

Also, due to the way things are, I am working from home about 70% of the time, and I cannot take the chance of not being able to work on Windows files while at home. That is not to say I don't have a Windows pc, but it is pretty old and my linux mint laptop runs much better than the Windows laptop with nearly identical specs and only being a couple of years younger. T410 vs. T430.

I am not planning on going in and erasing most of the older files. I was just curious. Thank you for the knowledge.
 
Old 07-10-2020, 06:14 PM   #7
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,876
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
Apt autoremove will erase all but the two most recent kernels, and orphaned packages.
 
1 members found this post helpful.
Old 07-10-2020, 07:42 PM   #8
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,675

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
In Mint you can remove older kernels via the update manager (Small shield icon, bottom right panel, usually has a tick in it if everything's up to date.) Under the "View" tab at the top you can access the kernels. You get a big "Warning! Proceed with caution." windoid. Hitting "continue" will give you a list of kernels; 4.8, 4.10, etc. 5.3 is current, select that to get a list of the kernels installed plus the one active one. (The one you're using) Clicking on any of them will add a "Remove" button which will remove the kernel and associated config-version-generic, initrd.img-version-generic, System.map-vesion-generic and vmlinuz-version-generic files. It'll then run a grub update to refresh the grub menu.

I used to remove old kernels directly from the /boot directory with a knife and fork (command line, files deleted one at a time!) but doing it via the update manager is much neater and quicker and less prone to mistakes being made.

I've currently got seven kernels available which can be accessed via the advanced bit of the grub menu during boot, I'll have to clean some out but generally keep a couple of the newest ones plus the active one just in case I get boot problems and need to drop down a version for maintenance.

My

Play Bonny!


Last edited by Soadyheid; 07-10-2020 at 07:43 PM.
 
1 members found this post helpful.
Old 07-11-2020, 03:26 PM   #9
Meow1234
Member
 
Registered: Jul 2020
Distribution: Kubuntu 21.04
Posts: 56

Rep: Reputation: Disabled
I always just manually delete the kernels because it’s easier. More prone to mistakes though and one time I accidentally deleted the whole /boot folder (oops). I backed up /etc, /var, /home, /root, /usr, /bin, and /sbin. Formatted my swap partition to ext4 and put them there. Reinstalled and put them back then reformatted the swap drive.

Also there was no Linux Mint 19.4 AFAIK.

Last edited by Meow1234; 07-11-2020 at 03:27 PM.
 
1 members found this post helpful.
  


Reply

Tags
boot, newbie



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A very very very very big problem!! Elbryan Linux - Software 2 09-23-2005 05:56 AM
Crowded $HOME Kocil Linux - General 8 09-22-2003 12:28 AM
Computer Stupidities dont miss very very very funny nakkaya General 13 05-14-2003 01:32 PM
Slack is being very very very slack ExEleven Slackware 9 08-28-2002 05:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration