Bug 1242315 - default entry in grub.conf is wrong after kernel update
Summary: default entry in grub.conf is wrong after kernel update
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-13 02:29 UTC by Dusty Mabe
Modified: 2016-04-12 20:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-12 20:29:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
/var/log/grubby (1.56 KB, text/plain)
2015-07-13 16:18 UTC, Dusty Mabe
no flags Details
Compressed /var/log/grubby like requested from reporter by the bug maintainer (5.50 KB, application/x-xz)
2016-01-09 12:25 UTC, Albert Flügel
no flags Details

Description Dusty Mabe 2015-07-13 02:29:59 UTC
Description of problem:

Exact same problem as described in:

https://bugzilla.redhat.com/show_bug.cgi?id=1147328

Would expect the updated kernel to be the default after a kernel upgrade:

[root@localhost ~]# cp /boot/grub2/grub.cfg{,.orig}
[root@localhost ~]# dnf update kernel -y
...
[root@localhost ~]# diff /boot/grub2/grub.cfg{.orig,} | grep default
<    set default="0"
>    set default="1"

Where 0th entry is the latest kernel and the 1 entry is the older kernel.


Version-Release number of selected component (if applicable):
[root@localhost ~]# rpm -q grubby
grubby-8.40-1.fc22.x86_64
[root@localhost ~]# rpm -q kernel
kernel-4.0.4-301.fc22.x86_64
kernel-4.0.7-300.fc22.x86_64

How reproducible:
Always


Steps to Reproduce:
1. -> see description

Comment 1 Brian Lane 2015-07-13 16:06:07 UTC
Please attach /var/log/grubby

Comment 2 Dusty Mabe 2015-07-13 16:18:51 UTC
Created attachment 1051469 [details]
/var/log/grubby

Comment 3 Albert Flügel 2016-01-09 12:25:09 UTC
Created attachment 1113138 [details]
Compressed /var/log/grubby like requested from reporter by the bug maintainer

Comment 4 Albert Flügel 2016-01-09 12:26:13 UTC
The same thing is annoying me since years, could be since Fedora 21 like noted in 1147328. I attached by /var/log/grubby. Hope it helps.

Comment 5 Dusty Mabe 2016-04-10 22:32:25 UTC
I figured out my problem here. Somehow /etc/sysconfig/kernel did not exist on my machine. The contents of this file should have been: 

```
# UPDATEDEFAULT specifies if new-kernel-pkg should make
# new kernels the default
UPDATEDEFAULT=yes

# DEFAULTKERNEL specifies the default kernel package type
DEFAULTKERNEL=kernel-core
```

I believe once I created the file the default gets updated appropriately.

Albert, Can you check to see if /etc/sysconfig/kernel exists for you? If not put the above contents in there and retry.

Comment 6 Albert Flügel 2016-04-12 20:03:58 UTC
Indeed it had to do with the contents of this file. In mine i found:
DEFAULTKERNEL=kernel-PAE

No idea, where this came from. I have a 64 bit x86_64 AMD processor. PAE
should not make any sense here.

I modified to kernel-core and now with new kernel installed it became the
default as i'd expect.

Thank you !

Comment 7 Dusty Mabe 2016-04-12 20:29:54 UTC
The reason why mine was messed up is because I'm not using anaconda to install my system. It would be nice if the contents of that file were written by an rpm rather than anaconda itself, but I won't complain too much about that because I know I'm doing something way outside of the norm.

Closing this now as the problem seems to be found.


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