Bug 1653434 - grub.cfg default points to wrong entry
Summary: grub.cfg default points to wrong entry
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-26 20:49 UTC by George R. Goffe
Modified: 2019-01-29 09:32 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-01-29 09:32:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
flat file (/boot/grub2/grub.cfg); no compression... (57.69 KB, text/plain)
2018-11-26 20:49 UTC, George R. Goffe
no flags Details
uncompressed flat modified script file of commands and output. (3.74 KB, text/plain)
2018-12-05 22:48 UTC, George R. Goffe
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1598523 0 unspecified CLOSED Make BootLoaderSpec-style configuration files the default 2021-02-22 00:41:40 UTC

Internal Links: 1598523

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.


Note You need to log in before you can comment on or make changes to this bug.