How to make default kernel

Hii currently my manjaro running on 5.13 latest kernel & i just installed 5.10 LTS kernel now i want to make default kernel 5.10 , i don’t want to choose every time in grub in advance option so how can i do that I’m changing to lts because my virtual box on 5.13 facing problems , so please tell me how can i set 5.10 as my default kernel

Open the file /etc/default/grub and look for the line… :arrow_down:

GRUB_DEFAULT=saved

Change that into the number of the LTS kernel, starting from 0. So if you have two kernels installed and the LTS kernel is the second one, set it to… :arrow_down:

GRUB_DEFAULT=2

Also find the line that reads… :arrow_down:

GRUB_SAVEDEFAULT=true

… and change that into… :arrow_down:

GRUB_SAVEDEFAULT=false

Save the file and then run… :arrow_down:

sudo update-grub
1 Like

@Aragorn : That’s all well and good, but how does it work with btrfs if /etc/default/grub is not writable? The solution with a separate boot partition is also not the yellow of the egg, because there are problems to boot from snapshots.

The OP has not indicated that he’s using btrfs. I am therefore assuming that he’s using ext4, which is still the default in Manjaro.

Why would /etc/default/grub not be writable? If it’s not writable, then that means you have mounted your root filesystem read-only, and in that case, you need to remount it as read/write.

Either way, the solution I’ve given the original poster should also work with btrfs, because it doesn’t change /boot/grub/grub.cfg at boot time.

P.S.: Don’t hijack the thread.

Sorry, I assumed this question fits the topic, there is no hijacking …

I did every step you said but thing happens is the menu order change to manjaro linux to advance option by default still we have to choose manually lts kernel other wise it booting up with 5.13 kernel

I’m not even sure that OP has tried rebooting and choosing 5.10 to see that it is always saved with the default grub configuration :grinning_face_with_smiling_eyes: but was basing the question on other distros that always revert to a default, like OpenSUSE I think?

I did rebooted so many times but still it booting up with 5.13 kernel

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR=“Manjaro”
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash apparmor=1 security=apparmor resume=UU>
GRUB_CMDLINE_LINUX=”"

If you want to enable the save default function, uncomment the following

line, and set GRUB_DEFAULT to saved.

#GRUB_SAVEDEFAULT=“true”

I did tell you to replace… this line :arrow_down:

GRUB_DEFAULT=saved

… by… this :arrow_down:

GRUB_DEFAULT=2

Or at least, that is if the 5.10 kernel is the second kernel in the list if you choose “Advanced Options for Manjaro Linux”.

You have to set the correct number, starting with 0 for the 5.13 kernel. The next entry in the list is the fallback option for 5.13, which bears number 1, and then the next entry will be your 5.10 kernel, which will be option 2.

Vector

3m

GRUB_DEFAULT=1
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR=“Manjaro”
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash apparmor=1 security=apparmor resume=UU>
GRUB_CMDLINE_LINUX=”"

If you want to enable the save default function, uncomment the following

line, and set GRUB_DEFAULT to saved.

#GRUB_SAVEDEFAULT=“true”

: when i set 2 according to you default grub option change “manjaro linux” to manjaro /dev/sda1

:when i set 1 then grub option change "manjaro linux " to “advance option” it didnt change kernel it boots up by default 5.13 you have to change manually 5.10

now i uncommented #GRUB_SAVEDEFAULT still it didnt work it showing error : sparce file not allowed type any key to continue…

Just a thought but boot up into kernel 5.10 then open manjaro settings click on kernels and if your running kernel 5.10 then delete 5.13 and reboot

1 Like