Description of problem: Grub after upgrade tries to boot from previous (fc29) version. After successful boot the details in "grubenv" (bootsuccess) aren't updated (value always = 0). grub.cfg doesn't actually detail *any* kernel versions - shouldn't it hold the kernels installed? Why is my grub defaulting to "fc29" version of the kernel? Version-Release number of selected component (if applicable): Fedora 30 How reproducible: Every boot Steps to Reproduce: 1. Start up / reboot laptop 2. Get forced into FC29 kernel Actual results: Booting into the wrong kernel version Expected results: Booting into FC30 kernel Additional info: [root@cassie boot]# cat /boot/grub2/grubenv # GRUB Environment Block saved_entry=1f92fdd7a9854a4fa9a23105352c03f7-5.0.11-300.fc30.x86_64 boot_success=0 boot_indeterminate=0 kernelopts=root=UUID=553f2975-81a5-4fe6-9e4b-9a918b12e314 ro rhgb quiet [root@cassie boot]# grep -iE "fc[23][90]" /boot/grub2/grub.cfg [root@cassie boot]# [root@cassie boot]# ls -l /boot/loader/entries/ total 12 -rw-r--r--. 1 root root 402 May 6 21:17 1f92fdd7a9854a4fa9a23105352c03f7-0-rescue.conf -rw-r--r--. 1 root root 264 May 6 21:17 1f92fdd7a9854a4fa9a23105352c03f7-5.0.10-200.fc29.x86_64.conf -rw-r--r--. 1 root root 259 May 6 21:17 1f92fdd7a9854a4fa9a23105352c03f7-5.0.11-300.fc30.x86_64.conf ... So it seems the "menu" is generated from the "loader" entries (even though that's not seemingly documented anywhere, and the fedora docs say to use "grub2-mkconfig"... which again doesn't change the main config file... the main config file doesn't seem to detail how it loads the "loader" directory either.. Although I google found "bls" config here: https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault Thi still doesn't help grub pick the "default" menu option though and still has it boot the OLD fc29 kernel.
My loader/entries file contains new kernels. grubenv shows the new kernel is the default, but only the oldest kernel is ever loaded. grub2-mkconfig doesn't have any effect on the default kernel. dnf upgrade set the newest kernel as default, but that has no effect on the boot order. Still oldest kernel is the only default that actually gets loaded. Jim Shipman
# grubby --default-kernel /boot/vmlinuz-5.0.16-300.fc30.x86_64 [root@laurie shipman]# grubby --default-index 0 [root@laurie shipman]# grubby --default-title Fedora (5.0.16-300.fc30.x86_64) 30 (Thirty) [root@laurie shipman]# ls /boot/loader/entries/ 2b4f8b50ab3f4354ae4eeda4909aa686-0-rescue.conf 2b4f8b50ab3f4354ae4eeda4909aa686-5.0.13-300.fc30.x86_64.conf 2b4f8b50ab3f4354ae4eeda4909aa686-5.0.14-300.fc30.x86_64.conf 2b4f8b50ab3f4354ae4eeda4909aa686-5.0.16-300.fc30.x86_64.conf Everything I have tried WILL NOT change the default kernel. Only the 5.0.13 (oldest) kernel comes up in the grub menu as default. After dnf upgrade the new kernel is installed and set as the new default, however, only the (new) oldest kernel comes up as default when the system actually boots. Jim Shipman
(In reply to Jim Shipman from comment #2) > # grubby --default-kernel > /boot/vmlinuz-5.0.16-300.fc30.x86_64 > [root@laurie shipman]# grubby --default-index > 0 > [root@laurie shipman]# grubby --default-title > Fedora (5.0.16-300.fc30.x86_64) 30 (Thirty) > [root@laurie shipman]# ls /boot/loader/entries/ > 2b4f8b50ab3f4354ae4eeda4909aa686-0-rescue.conf > 2b4f8b50ab3f4354ae4eeda4909aa686-5.0.13-300.fc30.x86_64.conf > 2b4f8b50ab3f4354ae4eeda4909aa686-5.0.14-300.fc30.x86_64.conf > 2b4f8b50ab3f4354ae4eeda4909aa686-5.0.16-300.fc30.x86_64.conf > > Everything I have tried WILL NOT change the default kernel. Only the 5.0.13 > (oldest) kernel comes up in the grub menu as default. After dnf upgrade the > new kernel is installed and set as the new default, however, only the (new) > oldest kernel comes up as default when the system actually boots. > > Jim Shipman Do you have a legacy BIOS install? Did you try to update your GRUB with grub2-install /dev/sda (or whatever is your block device where GRUB is installed).
I have legacy BIOS. I have not tried to re-install GRUB. Will try it later and get back. This is a Fedora 30 from a dnf system-upgrade from Fedora 29. Jim Shipman
grub2-install fixed my problem. Working correctly now. Thanks, Jim Shipman
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
I had the same problem after upgrade between F30 and F31 Beta on KVM. grub2-install fixed. I suspect that the reason was that I changed disk type from virtio (vda) to virtscsi (sda) in VM definition.