Change Default Kernel in Grub

Hello all,

I found my current kernel version 5.10 got into some error when I tried to install wine software. so I removed the kernel from the system and did a grub update.

But unfortunately everytime I boot my system the grub loads the kernel 5.10 and gets into a error state. So I have manually load from kernel 5.9 which is working as expected. Kindly help me in changing the default grub to 5.9

└─[0] mhwd-kernel -li
Currently running: 5.9.11-3-MANJARO (linux59)
The following kernels are installed in your system:
   * linux54
   * linux59
   * linux59-rt
└─[2] ls -l /boot
total 172156
drwx------ 6 root root     4096 Jan  1  1970 efi
drwxr-xr-x 5 root root     4096 Feb  2 11:28 grub
-rw-r--r-- 1 root root  8646715 Feb  2 11:38 initramfs-5.10-x86_64-fallback.img
-rw-r--r-- 1 root root  8646715 Feb  2 11:38 initramfs-5.10-x86_64.img
-rw-r--r-- 1 root root 31183493 Feb  2 11:39 initramfs-5.4-x86_64-fallback.img
-rw-r--r-- 1 root root 10129848 Feb  2 11:38 initramfs-5.4-x86_64.img
-rw-r--r-- 1 root root 31807622 Feb  2 11:39 initramfs-5.9-rt-x86_64-fallback.img
-rw-r--r-- 1 root root 10146073 Feb  2 11:39 initramfs-5.9-rt-x86_64.img
-rw-r--r-- 1 root root 31341247 Feb  2 11:40 initramfs-5.9-x86_64-fallback.img
-rw-r--r-- 1 root root  9789819 Feb  2 11:39 initramfs-5.9-x86_64.img
-rw-r--r-- 1 root root  3621888 Nov 19 13:28 intel-ucode.img
-rw-r--r-- 1 root root       25 Oct 24 21:56 linux-59-rt-x86_64.kver
-rw-r--r-- 1 root root       21 Jan 16 02:40 linux510-x86_64.kver.old
-rw-r--r-- 1 root root       21 Jan 13 05:08 linux54-x86_64.kver
-rw-r--r-- 1 root root       21 Nov 28 14:38 linux59-x86_64.kver
drwxr-xr-x 2 root root     4096 Jun  6  2020 memtest86+
-rw-r--r-- 1 root root  8360832 Jan 22 13:46 vmlinuz-5.10-x86_64
-rw-r--r-- 1 root root  6502720 Jan 22 13:44 vmlinuz-5.4-x86_64
-rw-r--r-- 1 root root  7900032 Dec 19 16:35 vmlinuz-5.9-rt-x86_64
-rw-r--r-- 1 root root  8138944 Dec 19 18:00 vmlinuz-5.9-x86_64

When you install/remove a kernel using the normal tools - the kernel is removed from the /boot folder.

# mhwd-kernel -r linux510

If the kernel images is not removed - you may either have installed it manually or used non standard tools as the package manager usually takes care of it.

You will have to manually remove the kernel 5.10 files from your /boot folder

# rm -f /boot/*5.10*

Then rebuild your grub

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

@linux-aarhus – Hi I tried the steps mentioned and the cleaned the 5.10 kernel and it booted properly in 5.9 but after sometime my GURB menu is not loading after a reboot. I have dual partition with windows10 and manjaro and now it boot directly to manjaro and I cannot see neither my lenovo screen nor the grub selection during the boot process, can you assist me on it ?

can you help me, after updating, when booting my computer is saying that it can’t find the 5.10 kernel. is there a way to revert to the old kernel from the grub screen?

I wanted to point out here the main question of this thread has not been answered.

I have found the kernel tool in the menus. It’s cool because you can see the kernels available. I am currently running 5.13 which I gather is eol? It would be nice if the kernel tool also listed if a listed kernel was end of life. I can see when a kernel was released easily if there is a changelog, but eol, we’re sol.

The tool let’s you install or remove a kernel easy enough, but how do you change the default? I can advanced load 5.10.61-1, but when I let it load automatically it loads 5.13.13-1 again. Some step by step for greenhorns like myself will be much appreciated.

Also I think the solution may be at the end of the post by linux-aarhus, but I feel like I need a little more info.

The OP here is an example of an XY problem

The title of the thread is asking for help to change GRUB boot selection. But OP appears to be asking for this this to work around a different problem — removing the non-working entry for kernel v5.13. If responses only explained how to change from using first menuentry in GRUB there would still be a non-working boot option in GRUB

There are other other topics on here that explain the different GRUB options
I know of 2 discussions with useful information, but there are many more
How to disable grub2 editing itself on boot, for remembering the last selected entry - #10 by nikgnomic
Help setting default grub entry - #2 by bogdancovaciu

If you can’t find what you need from previous topics you should start a new topic rather than resurrecting an old one.

Kernel releases and EOL changes are published in
Stable Updates - Manjaro Linux Forum