Grub option GRUB_TOP_LEVEL | Changing default kernel

This is a continuation of Changing Default Kernel which is locked…

I want to run the linux-clear kernel and after tinkering a bunch I believe the best way to make it the default kernel is to add

GRUB_TOP_LEVEL="/boot/vmlinuz-linux-clear"

into /etc/default/grub. Adjust the kernel name to whichever you choose…

2 Likes

Thanks for sharing this, I was not aware of this (relatively new) possibility.
And I see a confirmation here from a person I fully trust :wink:

Ops, and in the Arch Wiki. My bad!
https://wiki.archlinux.org/title/GRUB#Setting_the_top-level_menu_entry

3 Likes

excellent.
thank you very much for this info.

EDIT: functionality report:

i had selected a specific kernel within Garuda’s boot options GUI, so i changed it back to the default ‘Garuda’, applied the changes there and then followed the instructions in Filo’s link so my etc/default/grub looks like this:

# GRUB boot loader configuration

GRUB_TOP_LEVEL="/boot/vmlinuz-linux-lts"
GRUB_DEFAULT="0"
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR="Garuda"

i then ran

sudo grub-mkconfig -o /boot/grub/grub.cfg

and

sudo update-grub

i then rebooted my system and it worked perfectly, the LTS is now selected as my default kernel.

thanks again to Surfr and Filo.

2 Likes

@petsam wrote such a guide for us as well back in November 2022:

At the time it was temporarily unlisted because we were shipping a frozen version of Grub (remember that whole Grub fiasco where so many systems could not boot?), and our version did not have the new feature. But I think no one ever remembered to relist it! :face_with_hand_over_mouth:

4 Likes

Is this necessary in this case? It works for me without… But probably doesn’t hurt either.

It is not necessary to do both like this:

These two commands do the same thing; running either one or the other is sufficient.

4 Likes

i didn’t know that, but now i do!
thanks lmao

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.