Grub Menu shows kernels in wrong order

Issues related to applications and software problems and general support
Post Reply
watchingdogs
Posts: 6
Joined: 2019/10/14 20:17:16

Grub Menu shows kernels in wrong order

Post by watchingdogs » 2019/10/25 23:44:39

I'm trying to make a kernel booted by default, I usually do

Code: Select all

grubby --set-default=/boot/4.18.debug
and that does the trick.

Output from grubby --info=ALL

Code: Select all

/boot/4.18.debug
index=0
..
/boot/someotherkernel
index=1
...
/boot/another
index=2
...etc
However when my grub menu comes up when I boot the kernels are listed in a different order.
  • someotherkernel
    another
    4.18.debug
So "someotherkernel" is being booted instead of 4.18.debug. Since it's now using the new bootloader specification, how do I fix the order the grub menu is showing?
I am still able to edit default in /etc/default/grub to "2", but I want to avoid having to reboot machine to see the order of the kernels on the menu if I add more kernels in the future.

nouvo09
Posts: 183
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Grub Menu shows kernels in wrong order

Post by nouvo09 » 2019/10/26 07:23:51

grub2-install /dev/sdax
Not relevant with the problem. Besides that sdaX <-- is not correct.
Member of centos-FR forum

nouvo09
Posts: 183
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Grub Menu shows kernels in wrong order

Post by nouvo09 » 2019/10/27 16:18:07

Curiously grub shows the entries of the menu in the same order they are in /boot/loader/entries i-e in alphabetic order !!

Code: Select all

# ls -l /boot/loader/entries
total 12
-rw-r--r--. 1 root root 325 26 oct.  08:15 f78e00f22e9d47c3814a60a9dffa8afb-0-rescue.conf
-rw-r--r--. 1 root root 273 26 oct.  08:15 f78e00f22e9d47c3814a60a9dffa8afb-5.3.7-200.fc30.x86_64.conf
-rw-r--r--. 1 root root 379 25 août  19:08 fb0c7db0921149639d5f00295eb34d23-0-rescue.conf
-rw-r--r--. 1 root root 277  9 oct.  11:03 fb0c7db0921149639d5f00295eb34d23-5.2.18-200.fc30.x86_64.conf
-rw-r--r--. 1 root root 273 16 oct.  07:52 fb0c7db0921149639d5f00295eb34d23-5.3.5-200.fc30.x86_64.conf
-rw-r--r--. 1 root root 273 18 oct.  09:42 fb0c7db0921149639d5f00295eb34d23-5.3.6-200.fc30.x86_64.conf
# 
and UUID are in first place.
Member of centos-FR forum

watchingdogs
Posts: 6
Joined: 2019/10/14 20:17:16

Re: Grub Menu shows kernels in wrong order

Post by watchingdogs » 2019/10/28 17:57:44

nouvo09 wrote:
2019/10/27 16:18:07
Curiously grub shows the entries of the menu in the same order they are in /boot/loader/entries i-e in alphabetic order !!

Code: Select all

# ls -l /boot/loader/entries
total 12
-rw-r--r--. 1 root root 325 26 oct.  08:15 f78e00f22e9d47c3814a60a9dffa8afb-0-rescue.conf
-rw-r--r--. 1 root root 273 26 oct.  08:15 f78e00f22e9d47c3814a60a9dffa8afb-5.3.7-200.fc30.x86_64.conf
-rw-r--r--. 1 root root 379 25 août  19:08 fb0c7db0921149639d5f00295eb34d23-0-rescue.conf
-rw-r--r--. 1 root root 277  9 oct.  11:03 fb0c7db0921149639d5f00295eb34d23-5.2.18-200.fc30.x86_64.conf
-rw-r--r--. 1 root root 273 16 oct.  07:52 fb0c7db0921149639d5f00295eb34d23-5.3.5-200.fc30.x86_64.conf
-rw-r--r--. 1 root root 273 18 oct.  09:42 fb0c7db0921149639d5f00295eb34d23-5.3.6-200.fc30.x86_64.conf
# 
and UUID are in first place.
I see, however doing grubby --info=ALL does not show these /boot/loader/entries in order. Is there a way to fix what grubby shows to correspond to this list of .conf?

nouvo09
Posts: 183
Joined: 2009/09/19 19:21:36
Location: Paris, France

Re: Grub Menu shows kernels in wrong order

Post by nouvo09 » 2019/10/28 18:25:48

Not I know about.
Member of centos-FR forum

Post Reply

Return to “CentOS 8 - General Support”