Bug 1111790

Summary: grubby doing wrong thing updating saved_entry
Product: [Fedora] Fedora Reporter: Gene Czarcinski <gczarcinski>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 22CC: bcl, horsley1953, orion, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 19:02:22 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:

Description Gene Czarcinski 2014-06-21 13:44:33 UTC
Description of problem:
Recently, anaconda was change to set the value of saved_entry to "0" rahter than some idea of what a valid title might be ... because it was guessing wrong.  By setting saved_entry (grub2-set-default) to "0", the expected thing happens and the most recent (first in the list) kernel is booted.

Unfortunately, grubby then comes along and incorrectly sets saved_entry to the title string for the old first kernel.  What should happend is that "normally" the most recent kernel installed will be selected.

Suggested solution:

1. If saved_entry is a numeric value, set it to "0".  This will cause the most recently installed kernel to be booted and what most, if not all, users expect to happen.

2. If saved_entry is **NOT** numeric,l do nothing!  That is, leave the setting as the user has specified it.  The user has set saved_entry to some specific title (e.g., a menuentry in 40_custom) and just because the kernel has been updated want the default to be anothe manuentry item.

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

Comment 1 Tom Horsley 2014-09-15 11:47:25 UTC
Why are any of these tools setting anything in grubenv? I fixed my f21 install by simply clearing grubenv and it now boots the first entry. Isn't leaving grubenv alone the simplest solution of all?

Comment 2 Gene Czarcinski 2014-09-15 15:42:52 UTC
The set of patches submitted to update grubby here:
https://lists.fedorahosted.org/pipermail/anaconda-patches/2014-September/013212.html

include the suggested solution described above.

Comment 3 Orion Poplawski 2014-09-16 20:47:14 UTC
Seems to me a user could use either method to change the default kernel.  If a user doesn't want the default kernel updated, they need to update /etc/sysconfig/kernel and set UPDATEDEFAULT=no.  NOTABUG IMO.

Comment 4 Gene Czarcinski 2014-09-26 12:17:59 UTC
Sorry Orion, using UPDATEDEFAULT=no should work the way you think it should but it does no!  Please see BZ #1141414

Comment 5 Jaroslav Reznik 2015-03-03 16:03:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Fedora End Of Life 2016-07-19 19:02:22 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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.