Skip to main content
Topic: How to customize GRUB menu entries (order, what they say, etc.)? (Read 2810 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to customize GRUB menu entries (order, what they say, etc.)?

So, ever since I installed the LTS kernel to get around a specific issue I was having with the Artix kernel & Flashrom, I noticed that the top Artix kernel menu entry started loading the LTS kernel, even after I booted from the Artix kernel again, So basically, the top menu option didn't seem to "remember" what kernel I last used, and instead, just defaulted to LTS for some reason. What I ended up doing was changing my grub config to remember which menu entry I chose instead of changing the order of the entries around, and changing what those menu entries themselves do.

But that was kind of a quick and dirty fix, so now, whenever I want to load my main kernel (Artix kernel instead of LTS), the menu entry selector is on the second row, and to switch back to it from LTS, I must enter the "Advanced options" entry and select the right sub-entry.

However,  I decided that not only do I want to soothe my OCD by fixing this issue, but I also want to change the menu options to how I want. Instead of having a menu entry that selects what GRUB thinks is the main kernel (in my case, the LTS kernel, even though I want it to be the Artix kernel again) followed by the "Advanced options" menu entry which leads to sub entries, including one which is the same as the first entry, which I think is redundant, followed by the memtest86+ option, I want the entries to be like this (in quotes are what I want to menu entries to say):

  • "Artix Kernel" which leads to whatever version of the Artix Linux kernel I have installed
  • "LTS Kernel" which is same as above except with the LTS kernel instead
  • "More options..." which leads to a submenu (below)
    • "Artix Kernel (initramfs)"
    • "LTS Kernel (initramfs)"
    • "Memory Test" memtest86+ software/firmware

How would I do this?

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #1
The easiest way IMHO is to install grub-customizer from the Arch repos. Then you can customise your grub menu however you wish.

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #2
.../... install grub-customizer from the Arch repos.../...
grub-customizer is now in omniverse :

Code: [Select]
pacman -Ss grub-customizer
omniverse/grub-customizer 5.2.1-1
    A graphical grub2 settings manager

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #3
grub-customizer is now in omniverse :

Code: [Select]
pacman -Ss grub-customizer
omniverse/grub-customizer 5.2.1-1
    A graphical grub2 settings manager

Thank you for the correction!  ;D 

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #4
The easiest way IMHO is to install grub-customizer from the Arch repos. Then you can customise your grub menu however you wish.

I would've just liked to modify the GRUB config files directly, but I guess I can use grub-customizer and then look at what it's doing so that I can do it manually if I like. Thanks

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #5
I would've just liked to modify the GRUB config files directly, but I guess I can use grub-customizer and then look at what it's doing so that I can do it manually if I like. Thanks

It is very easy, and you can set it to boot the previously booted entry if you wish (under the General Settings tab), which is useful sometimes when updating the kernel.

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #6
The easiest way IMHO is to install grub-customizer from the Arch repos. Then you can customise your grub menu however you wish.

I installed it because I will have to learn how to run grub in Artix (and eventually make Artix my 'grubbing' distro, issues raised in another thread).  Does running grub-customizer automatically end with running grub (for which I'm not ready) or is that a separate operation?
Who, has loved us more?

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #7
I installed it because I will have to learn how to run grub in Artix (and eventually make Artix my 'grubbing' distro, issues raised in another thread).  Does running grub-customizer automatically end with running grub (for which I'm not ready) or is that a separate operation?

No, I don't believe it does, but I am not an expert on it, I just use it and find the options to configure it very useful.

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #8
I installed it because I will have to learn how to run grub in Artix (and eventually make Artix my 'grubbing' distro, issues raised in another thread).  Does running grub-customizer automatically end with running grub (for which I'm not ready) or is that a separate operation?


If you want to use Grub-customizer, you need to use grub (like the name already give the hint :-) ).

To use grub, isnt hard at all (for my opinion the easiest way to install and have a bootloader wich works in the end).

Sure there is bunch other bootloaders, but for example systemd one (no problem with artix :D) didnt work on one notebook i have, because systemd is buggy or (possible that) the uefi from the notebook. It simply fails to set himself as bootoption.

For me, grub is for me the most stable and mature one, but other "smaller" bootloaders could be faster (didnt tested that, only theory).

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #9
I would've just liked to modify the GRUB config files directly, ...
The correct way would be to read the coments in /etc/default/grub.

The solution looks like this:

Code: [Select]
GRUB_DEFAULT="saved"
GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_SUBMENU="y"

don't forget update-grub after that.
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: How to customize GRUB menu entries (order, what they say, etc.)?

Reply #10
Possibly irrelevant to note as no FS is mentioned, you can't use GRUB_SAVEDEFAULT="true" if /boot is BTRFS as it doesn't support the sparse file Grub tries to save the last boot choice info in. Perhaps that has been or will be fixed sometime? It was still the case until quite recently anyhow. But you can still set the GRUB_DEFAULT value numerically to select your choice.