Bug 820454

Summary: Installation of new kernel via yum ignores entry in /etc/default/grub and in /etc/sysconfig/kernel to not update default boot
Product: [Fedora] Fedora Reporter: Sergio Monteiro Basto <sergio>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: bcl, dennis, elbin.p, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mads, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 808821 Environment:
Last Closed: 2012-05-14 07:45:06 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
/etc/default/grub
none
grub.cfg before yum update
none
grub.cfg after yum update none

Description Sergio Monteiro Basto 2012-05-09 20:46:58 EDT
Created attachment 583403 [details]
/etc/default/grub

+++ This bug was initially created as a clone of Bug #808821 +++

Description of problem:
I have the following entry in /etc/default/grub
GRUB_DEFAULT="WindowsXP" (without any space)
But when a new kernel is installed via yum this new kernel is made the default.



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


How reproducible:
Always

Steps to Reproduce:
1. Set GRUB_DEFAULT to some particular kernel or other entry
2. Install another kernel via yum
  
Actual results:
The new installed kernel is made the default in Grub

Expected results:
The default boot option should be what was set in GRUB_DEFAULT
Comment 1 Mads Kiilerich 2012-05-09 21:00:09 EDT
/etc/default/grub is _only_ used when grub2-mkconfig is run. That will not happen when new kernels are installed.

grubby is responsible for patching grub.cfg when new kernels are installed. There are known bugs that do that it might change the default boot target in unfortunate ways. This bug is probably a duplicate of an existing bug, but for now I will just reassign to grubby.
Comment 2 Sergio Monteiro Basto 2012-05-09 21:00:54 EDT
Created attachment 583405 [details]
grub.cfg before yum update
Comment 3 Sergio Monteiro Basto 2012-05-09 21:02:13 EDT
Created attachment 583406 [details]
grub.cfg after yum update
Comment 4 Sergio Monteiro Basto 2012-05-09 21:11:07 EDT
(In reply to comment #1)
> /etc/default/grub is _only_ used when grub2-mkconfig is run. That will not
> happen when new kernels are installed.
> 
> grubby is responsible for patching grub.cfg when new kernels are installed.
> There are known bugs that do that it might change the default boot target in
> unfortunate ways. This bug is probably a duplicate of an existing bug, but for
> now I will just reassign to grubby.

where grubby reads the defaults ? 
also doesn't read /etc/sysconfig/kernel
Comment 5 Mads Kiilerich 2012-05-09 21:41:14 EDT
"Grubby" do read /etc/sysconfig/kernel for some purposes, and /usr/sbin/grubby try to read and understand the boot loader file and patch it correctly.
Comment 6 Sergio Monteiro Basto 2012-05-13 17:04:16 EDT
this in a side effect of bug 768106 , which grubbt replace my default entry with "0"

I will study bug 768106 to understand if I got a better work around than edit grub.cfg, after every kernel update.
Comment 7 Mads Kiilerich 2012-05-14 07:45:06 EDT

*** This bug has been marked as a duplicate of bug 768106 ***