Red Hat Bugzilla – Bug 820454
Installation of new kernel via yum ignores entry in /etc/default/grub and in /etc/sysconfig/kernel to not update default boot
Last modified: 2012-05-14 07:45:06 EDT
Created attachment 583403 [details]
+++ 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):
Steps to Reproduce:
1. Set GRUB_DEFAULT to some particular kernel or other entry
2. Install another kernel via yum
The new installed kernel is made the default in Grub
The default boot option should be what was set in GRUB_DEFAULT
/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.
Created attachment 583405 [details]
grub.cfg before yum update
Created attachment 583406 [details]
grub.cfg after yum update
(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
"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.
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.
*** This bug has been marked as a duplicate of bug 768106 ***