How to set a default kernel?

Iam having two kernals 5.13 and 5.4 LTS and I want set kernel 5.4 as default kernal.

I have tried to select the kernel 5.4 LTS on the grub when booting and it booted into kernel 5.4 but on next startup it automatically booted into 5.13

I have to manually switch to kernal 5.4, but I want to boot into kernel 5.4 as default.

It’s because My dgpu works fine on kernel 5.4 LTS only.

System info:

System:    Kernel: 5.13.12-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.13-x86_64 root=UUID=25ef3aaf-fb0a-4b8d-a4e3-27c0c1dd2336 rw 
           rootflags=subvol=@ quiet apparmor=1 security=apparmor udev.log_priority=3 radeon.si_support=0 radeon.cik_support=0 
           amdgpu.si_support=1 amdgpu.cik_support=1 
           Desktop: KDE Plasma 5.22.4 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:   Type: Laptop System: Dell product: Inspiron 15-3567 v: N/A serial: <filter> Chassis: type: 9 serial: <filter> 
           Mobo: Dell model: 0D53F5 v: A00 serial: <filter> UEFI: Dell v: 2.15.0 date: 06/16/2021 
Battery:   ID-1: BAT0 charge: 24.5 Wh (67.7%) condition: 36.2/41.4 Wh (87.3%) volts: 15.2 min: 14.8 
           model: LGC-LGC2.80 DELL 7PY0D0A type: Li-ion serial: <filter> status: Discharging 
CPU:       Info: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP arch: Amber/Kaby Lake note: check family: 6 
           model-id: 8E (142) stepping: 9 microcode: EA cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21607 
           Speed: 800 MHz min/max: 400/2500 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel HD Graphics 620 vendor: Dell driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:5916 
           class-ID: 0300 
           Device-2: AMD Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] vendor: Dell driver: amdgpu 
           v: kernel alternate: radeon bus-ID: 01:00.0 chip-ID: 1002:6660 class-ID: 0380 
           Device-3: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo bus-ID: 1-5:3 chip-ID: 0bda:5769 class-ID: 0e02 
           serial: <filter> 
           Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: amdgpu,ati,modesetting 
           alternate: fbdev,vesa display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") s-diag: 414mm (16.3") 
           Monitor-1: eDP-1 res: 1366x768 hz: 60 dpi: 101 size: 344x194mm (13.5x7.6") diag: 395mm (15.5") 
           OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.2.1 direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel v: kernel alternate: snd_soc_skl 
           bus-ID: 00:1f.3 chip-ID: 8086:9d71 class-ID: 0403 
           Sound Server-1: ALSA v: k5.13.12-1-MANJARO running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: yes 
           Sound Server-4: PipeWire v: 0.3.33 running: yes 
Network:   Device-1: Intel Wireless 3165 driver: iwlwifi v: kernel port: e000 bus-ID: 02:00.0 chip-ID: 8086:3165 
           class-ID: 0280 
           IF: wlp2s0 state: up mac: <filter> 
           Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell driver: r8169 v: kernel port: d000 
           bus-ID: 03:00.0 chip-ID: 10ec:8136 class-ID: 0200 
           IF: enp3s0 state: down mac: <filter> 
Bluetooth: Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 1-8:5 chip-ID: 8087:0a2a 
           class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running rfk-block: hardware: no software: yes 
           address: see --recommends 
Drives:    Local Storage: total: 931.51 GiB used: 174.87 GiB (18.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB block-size: physical: 4096 B 
           logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: SDM3 scheme: GPT 
Partition: ID-1: / raw-size: 100.1 GiB size: 100.1 GiB (100.00%) used: 9.63 GiB (9.6%) fs: btrfs dev: /dev/sda1 maj-min: 8:1 
           ID-2: /boot/efi raw-size: 200.2 MiB size: 197.1 MiB (98.45%) used: 554 KiB (0.3%) fs: vfat dev: /dev/sda4 
           maj-min: 8:4 
           ID-3: /home raw-size: 828.19 GiB size: 828.19 GiB (100.00%) used: 165.24 GiB (20.0%) fs: btrfs dev: /dev/sda2 
           maj-min: 8:2 
           ID-4: /var/log raw-size: 100.1 GiB size: 100.1 GiB (100.00%) used: 9.63 GiB (9.6%) fs: btrfs dev: /dev/sda1 
           maj-min: 8:1 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 44.0 C mobo: 42.0 C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 224 Uptime: 1h 8m wakeups: 2 Memory: 7.64 GiB used: 2.13 GiB (27.8%) Init: systemd v: 248 
           tool: systemctl Compilers: gcc: 11.1.0 Packages: pacman: 1254 lib: 356 flatpak: 0 Shell: Bash v: 5.1.8 
           running-in: konsole inxi: 3.3.06

If you only want to use 5.4, you could delete the others.

Otherwise, this forum has a search function which will reveal this thread: How to make a Kernel default? - #3 by linux-aarhus

2 Likes

To get relevant search results, “kernel” needs to spelled correctly.

4 Likes

A little bit more of explication there to understand how is it under the hood :

https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Recall_previous_entry

This is not your case according to your system infos, but this works only if /boot is NOT btrfs, good to know though.

Cheers.

1 Like

See also:
https://wiki.archlinux.org/title/GRUB/Tips_and_tricks#Changing_the_default_menu_entry

1 Like

This subject has been discussed before:

1 Like

I’ve marked this answer as the solution to your question as it is by far the best answer you’ll get.

However, if you disagree with my choice, please feel free to take any other answer as the solution to your question or even remove the solution altogether: You are in control! (If you disagree with my choice, just send me a personal message and explain why I shouldn’t have done this or :heart: or :+1: if you agree)

:innocent:
P.S. In the future, please don’t forget to come back to your question after your issue has been solved and click the 3 dots below the answer to mark a solution like this below the answer that helped you most:
Solution
so that the next person that has the exact same problem you just had will benefit from your post as well as your question will now be in the “solved” status.

1 Like

Thank you sir for your kind reply, Iam going with the solution that you provided, Iam not that good in linux.

As mentioned I had marked your reply as the solution for this post.

And I want to know whether this is the permanent solution or this will be solved in the future?

Thank you, sir

  1. Please don’t call me “sir”: I’m an a-sexual :alien: that reproduces using mitosis. :grin:
  2. Please read this:

Especially the Linux has multiple kernels section, but if you don’t know about any of the other sections, you might find these informative as well.

:bowing_man: