Change kernel order (bios)

I have 5.10-5.11-and 5.12 installed on my system.
5.10 is 1st on booting order and this is display on

uname-r
Which file do i have to edit to change this order?
I know how to change from grub start-up on advance option but i want a permanent solution.
Thanks in advance!

Hello what gives a sudo update-grub then a reboot?

Display the kernel options 5.10 5.11 5.12 and the reboot if not change ( manually ) the grub order boots with 5.10.

I’m not sure what you wish to accomplish. GRUB orders the kernels in the menu along their version, and if you have…

GRUB_DEFAULT=saved

… in your /etc/default/grub, then GRUB will remember the last kernel you booted with, and will use that kernel for the next boot if you didn’t select anything else.

That option exist! So if at next boot chose from advance grub menu to start with 5.12 on next boot starts with 5.12?

Yes, that is correct. GRUB always uses the last kernel that you booted with as the default for the next boot, unless you manually select another kernel, and then that one will in turn be remembered.

Thank you Aragorn

1 Like

Something is missing!
On startup change the kernel manually to start from 5.12 also use

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

but on next boot the kernel is 5.10!
also the

pacman -Syu grub

found grub outdated and update the latest ver but the 5.10 still here!

does it remind me of being a stable character? :rofl:
I found this on grub

GRUB_SAVEDEFAULT=“false”

now i put # on start and try again!
Νο did not help !
My /etc/default/grub is:

GRUB_DEFAULT=saved
GRUB_TIMEOUT="10"
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
#GRUB_SAVEDEFAULT="false"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK="y"

# Uncomment to use basic console
GRUB_TERMINAL_INPUT="console"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX="keep"

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
GRUB_DISABLE_OS_PROBER="false"

GRUB_DISABLE_LINUX_RECOVERY="true"

There is a second posibility: set

GRUB_DEFAULT=1>2

What does GRUB_DEFAULT=1>2
GRUB: Booting from Submenues

My booting order is:

5.10
5.10 fallback
5.12
5.12 fallback
5.11
5.11 fallback

Putting GRUB_DEFAULT=1>2 i think will start with 5.12 (count 0-1-2-3…)
No still 5.10
I’m sure I made some changes but I do not remember which one!
andreas85 ρε μπας και εισαι και απο Ελλαδα μερια ?

Have a look at /boot/grub/grub.cfg. If you did all right, there will be the new line with GRUB_DEFAULT=1>2
Sorry i had to look where it was in my filesystem. I do have btrfs, so savedefault will not work with grub and btrfs. So i had to disable savedefault:

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
#akf
GRUB_SAVEDEFAULT=false

But it is possible to save an default into /boot/grub/grubenv where grub would store its saved state. # WARNING: Do not edit this file by tools other than grub-editenv!!!

cat /boot/grub/grubenv                                                 
# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
menu_auto_hide=1
boot_success=1
saved_entry=1>2
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################%

So here i stored saved_entry=1>2 and since then it does start the second kernel by default

Summary

On /boot/grub/grub.cfg there is NO line with GRUB_DEFAULT

Sorry andreas85 now i realize my mistake looking on

grun.cfg

and not on


 grubenv

I make the changes and now start with 5.12.
Thank you!

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