antiX / MX LinuxThis forum is for the discussion of antiX and MX Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everyone.
Well, the grub configuration seems to have changed a lot during the past 5+ years ...
Utilizing MX Linux which has been updated & upgraded multiple times now, I can no longer figure out precisely where I can go in order to remove obsolete entries. There seem to be several locations with grub related files. Currently I have 8 entries for the previous 4 kernels. I would like to simply remove the oldest two entries, since it annoys me to have the startup screen cluttered with things that I don't want to see.
Perhaps an automated process, to delete older kernel entries automatically?
Any helpful thoughts would be appreciated. Thanks.
The best way to modify GRUB is to use the update-grub script. First uninstall the kernels you don't want. Check them in synaptic and you'll probably find them listed as autoremovable. Then run update-grub.
Sorry, I thought you meant some different script somewhere.
Utilizing sudo update-grub doesn't change anything on the startup (grub) screen.
And when I use the MX Tools Grub Menu, I can't remove any grub entries from there.
I think there is or used to be a grub-customizer tool that I'd used in the past. Don't have it now though.
The laptop was originally Windows 10; i installed Slackware but i noticed when running efibootmgr entry for Windows was still there, even though it was wiped when i installed slackware. I did remove that using
efibootmgr. The entries should be listed somethting like:
Thanks, but that's not what I'm looking for.
I just utilized the grub-customizer tool, followed by saving the new configuration.
Then installed the saved configuration into the master boot record ... but oddly no changes occurred during a reboot.
During system start, right now the screen still displays the same eight grub / kernel entries.
What I'm looking for is the actual grub.cnfg script or whatever it's called these days, which contains all the entries that show up during boot. In the past this used to be a single file with a single backup file. But now the grub menu has been split into several files which are combined ??? during the boot process. I just want those obsolete entries that I'm never going to use ... to go away ... visually.
I don't care if the kernels still exist on the system, I just don't want to see the entries ...
I don't see how that can help me any further. I don't understand why I can't locate a single file to edit anymore. Even looking at this link was was the closest that I could find for what I'm looking to do, the grub folder names & file locations in the link don't match up what I have ... even though it's based on Debian as is MX Linux ... ??? https://olinux.net/change-grub-boot-order-linux/
I don't understand why I can't locate a single file to edit anymore.
The reason why is that they have made GRUB2 insanely complicated compared with the original GRUB (now called grub-legacy). That's why I really hate it. The way it works now is something like this:
1) When GRUB runs, it creates its menu from /boot/grub.d/grub.cfg, which is a actually a script written in the GRUB shell language.
2) The grub.cfg file is created by grub-mkconfig, which is conveniently wrapped up as update-grub. These are both ordinary shell scripts.
3) grub-mkconfig uses information in a set of files in /etc/default/grub. At least, that's how it's done in the Debian family.
Did you actually uninstall the kernels you don't want any more before running update-grub? If you did and that didn't work, then I think you will need to look at the files in /etc/default/grub, find the one that contains the unwanted kernels and edit them out. Good luck with that!
I don't think you need to bother about efibootmgr. That's a red herring in your case. The uefi (if you have one) is booting GRUB correctly; it's GRUB that's misbehaving.
I agree, this is complete insanity. Who the heck over thought of this madness ???
Looking at your recommended path/file of ... /etc/default/grub ... doesn't yield the required information either. Same as a few others that I found, at the top of the file it just says ... if you make changes to this file, yada yada yada.
This is truly maddening, and one would think that these entries would be easier to adjust. Anyone who plays around with their own grub configuration obviously knows that they're doing so at their own risk, so why make such a minor adjustment intentionally more difficult and more confusing?
You're right, the laptop that I'm working with doesn't have a UEFI boot.
No, I didn't actually uninstall the kernels because when I looked at the kernels in the MX package manager ... Kernels ... there were only 5 items listed. Two of them with Antix, one Debian, one Liceurix (or something like that) and one Kernel file for the 4.19 Kernel that I'm currently on. Stable Repository shows me a list of "gazillion" image/kernel files, none of which are greyed out which would indicate to me that any of them are installed. And when I look for Kernels within Debian Backports, there are still a (fewer) number of Kernel related files, also none of which are greyed out to indicate that any of them have been installed.
I have never used boot repair tool or any other grub repair method on this system. To my knowledge it's pretty much all stock, with updates & dist-upgrades during the past 2 to 3 years.
If you don't want to keep the older kernels, remove them. There are several how-to's of different ways to do this on the net.
As so often in the past, your comments are of no help whatsoever. I've been looking Online for hours and can't find anything which would resolve the excessive grub entries. Really, I wish you would just stay away from my posts. Every time that you comment, it's without any useful information whatsoever. Someone who responds with comments designed to pad their stats. Ridiculous. Do you really believe that I don't know how to use the internet or how to look for solutions there? Going to a forum is always my *LAST* stop, only after I couldn't find the correct solution on my own.
@hazel @captain_sensible
My apologies, but I have seen this the above users comments literally hundreds of times on this forum already, where instead of help there's nothing but a blank or criticism. It's ridiculous, as if there's nothing better to do than to leave useless remarks (see my signature too).
Anyway, I'm afraid that I'll have to give up on this for now. As I've already explained previously, I can't find the older installed kernels within Synaptic, MX Packager Manager Stable, or MX Package Manager Debian Backports. So if I can't find something, then obviously I can't delete it either.
As far as grub is concerned, I found grub, grub config, and grub backup files in no less than 4 different locations. Altogether within their folders/sub-folders probably a dozen of them. But I can't find a single file that would account for the eight kernel entries that I'm seeing upon startup. I'll be checking out the dedoimedo link sometime in the next few days.
Last but not least, I also installed/re-installed everything grub and grub-customizer related. Nothing that I tried made any difference. Grub customizer displays the correct grub menu as it should appear during startup, but for some reason that's not what I get on the screen. No matter what I try with the grub-customizer as a last resort, even though changes take place without errors as they're applied, those same changes do not remain present when the machine is started up again.
On a positive note ... no matter what I edited, re-installed, or -reconfigured, the system didn't get borked. At least that's something.
I wonder, did you ever install any kernels by hand? For example, you say you have a liquorix kernel. They certainly aren't standard, though I remember them being very fashionable a few years ago. Anything that gets installed independently of the apt system can't be uninstalled by the apt system.
Also you shouldn't have such a lot of grub files, only the ones in the two directories I mentioned and the original installation files which are in the lib tree somewhere.
I can't help you with grub-customiser. I never heard of that before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.