Bug 1653434

Summary: grub.cfg default points to wrong entry
Product: [Fedora] Fedora Reporter: George R. Goffe <grgoffe>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: fmartine, jpokorny, lkundrak, pjones, riehecky
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-29 09:32:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
flat file (/boot/grub2/grub.cfg); no compression...
none
uncompressed flat modified script file of commands and output. none

Description George R. Goffe 2018-11-26 20:49:21 UTC
Created attachment 1508659 [details]
flat file (/boot/grub2/grub.cfg); no compression...

Description of problem:

grub.cfg does NOT point to most recent kernel. Rebuilt grub.cfg with grub2-mkconfig -o /boot/grub2/grub.cfg but problem still exists. Current kernel is 4.20.0-0.rc3.git1.1.fc30.x86_64

Version-Release number of selected component (if applicable):

grub2-common-2.02-63.fc30.noarch

How reproducible:

always

Steps to Reproduce:
1.see above
2.
3.

Actual results:

grub2 list of kernels appears but does not point to most current kernel. the default kernel entry is about 8 entries below the current kernel.

Expected results:

boot produces a grub2 menu of available kernels. the most current kernel is usually/always at the top.

Additional info:

Comment 1 Jan Pokorný [poki] 2018-12-03 23:11:04 UTC
It's fairly possible it's related to:

  https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault

I also observe a broken pre-selection problem with current Rawhide,
see the bottom of [bug 1598523 comment 9].

Comment 2 Javier Martinez Canillas 2018-12-05 19:21:32 UTC
(In reply to George R. Goffe from comment #0)
> Created attachment 1508659 [details]
> flat file (/boot/grub2/grub.cfg); no compression...
> 
> Description of problem:
> 
> grub.cfg does NOT point to most recent kernel. Rebuilt grub.cfg with
> grub2-mkconfig -o /boot/grub2/grub.cfg but problem still exists. Current
> kernel is 4.20.0-0.rc3.git1.1.fc30.x86_64
>

Can you please provide the output of the following commands:

grub2-editenv list | grep saved_entry
 
grubby --info ALL

grubby --default-kernel

Also, can you try setting the default with:

grubby --set-default /boot/vmlinuz-4.20.0-0.rc3.git1.1.fc30.x86_64

Or whatever is your latest kernel.

If that fail, can you please try to set the saved_entry variable:

grub2-editenv - set saved_entry=$id

where $id is the "id" field shown by grubby --info ALL.

Comment 3 George R. Goffe 2018-12-05 22:46:54 UTC
Javier,

Thank you for your response.

A few days after writing this bug report, I re-installed this system onto a different and larger hard drive. I still have the original hard drive though.

The enclosed file is from the "new" system which I suspect doesn't do you any good. In case I'm wrong, I'm including the log of these commands.

I can send you files from the older system if you'd like to see them. Just give me a list of their names. 

Also, in an attempt to resolve the problem, I modified /etc/default/grub (see below). I think that this resolved the problem. I added a commented line "GRUB_SAVEDAFAULT=true" and commented the next line as well.

Here's what that file looks like now.

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
#GRUB_SAVEDEFAULT=true
#GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_CMDLINE_LINUX="nomodeset net.ifnames=0 biosdevname=0 rd.shell rd.debug log_buf_len=1M"
GRUB_CMDLINE_LINUX="nomodeset net.ifnames=0 biosdevname=0"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

I'm concerned that I have muddied the water enough to make trouble shooting difficult to accomplish. I hope not.

Thanks again,

George...

Comment 4 George R. Goffe 2018-12-05 22:48:00 UTC
Created attachment 1511906 [details]
uncompressed flat modified script file of commands and output.

Comment 5 George R. Goffe 2019-01-19 00:04:09 UTC
I have not seen this problem since reporting this bug (and the reinstall of fc30). Dare I suggest that the problem doesn't exist any more?

Thanks for your help!

George...

Comment 6 Javier Martinez Canillas 2019-01-19 00:08:56 UTC
Hello George,

I’m glad that’s working for you now.

Comment 7 George R. Goffe 2019-01-19 09:17:48 UTC
Javier,

You're welcome and again, thanks for your help/time.

George...

Comment 8 Javier Martinez Canillas 2019-01-29 09:32:48 UTC
Closing this bug since the reporter said that it works on the current release.