Bug 768376 - Kernel updates ignore user configurations made to grub when it generates it's own entries to grub.cfg on updates
Kernel updates ignore user configurations made to grub when it generates it's...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: grubby (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-16 08:44 EST by Jóhann B. Guðmundsson
Modified: 2011-12-16 12:38 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-16 11:54:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Grub cfg generated on kernel update (2.35 KB, text/plain)
2011-12-16 08:54 EST, Jóhann B. Guðmundsson
no flags Details
Grub cfg generated manually from the cli (2.95 KB, text/plain)
2011-12-16 08:55 EST, Jóhann B. Guðmundsson
no flags Details
Diff of both the files (2.40 KB, text/plain)
2011-12-16 08:55 EST, Jóhann B. Guðmundsson
no flags Details

  None (edit)
Description Jóhann B. Guðmundsson 2011-12-16 08:44:01 EST
Description of problem:

First of all kernel updates seem to be depended on the present of /dev/root which is afaik obsolete on the 21 century and breaks update on initramfs img less setups

Secondly kernel updates seem to be ignoring user made changes and adding additional parameters when generating new grub.cfg on updates.

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

Any kernel update

How reproducible:

Always

Steps to Reproduce:
1. Make custom changes to grub2 configuration files 
2. Run grub2-mkconfig -o /boot/grub2/grub.cfg
3. Copy /boot/grub2/grub.cfg to /tmp
4. Update to new kernel 
5. Diff the kernel generated /boot/grub2/grub.cfg with the one manually generated in /tmp
  
Actual results:

Difference

Expected results:

No difference 

Additional info:

Any particular reason why kernel updates are not simply calling grub2-mkconfig -o /boot/grub2/grub.cfg  on updates ?
Comment 1 Jóhann B. Guðmundsson 2011-12-16 08:54:22 EST
Created attachment 547810 [details]
Grub cfg generated on kernel update
Comment 2 Jóhann B. Guðmundsson 2011-12-16 08:55:05 EST
Created attachment 547811 [details]
Grub cfg generated manually from the cli
Comment 3 Jóhann B. Guðmundsson 2011-12-16 08:55:55 EST
Created attachment 547812 [details]
Diff of both the files
Comment 4 Josh Boyer 2011-12-16 09:09:37 EST
The grubby package deals with this, not the kernel itself.
Comment 5 Peter Jones 2011-12-16 11:54:35 EST
(In reply to comment #0)
> Description of problem:
> 
> First of all kernel updates seem to be depended on the present of /dev/root
> which is afaik obsolete on the 21 century and breaks update on initramfs img
> less setups

Please file this as a separate bug against grubby.

> 1. Make custom changes to grub2 configuration files 
> 2. Run grub2-mkconfig -o /boot/grub2/grub.cfg
> 3. Copy /boot/grub2/grub.cfg to /tmp
> 4. Update to new kernel 
> 5. Diff the kernel generated /boot/grub2/grub.cfg with the one manually
> generated in /tmp

This is the wrong workflow.  grub2-mkconfig is only really useful to create the initial configuration file, not to update in general.  You shouldn't use it unless you're expecting to clobber old configuration entries and any changes you've made there, which may be necessary in cases where one kernel needs different command line flags than another one.

> 
> Actual results:
> 
> Difference
> 
> Expected results:
> 
> No difference 
> 
> Additional info:
> 
> Any particular reason why kernel updates are not simply calling grub2-mkconfig
> -o /boot/grub2/grub.cfg  on updates ?
Comment 6 Jóhann B. Guðmundsson 2011-12-16 12:38:32 EST
(In reply to comment #5)
> (In reply to comment #0)
> > Description of problem:
> > 
> > First of all kernel updates seem to be depended on the present of /dev/root
> > which is afaik obsolete on the 21 century and breaks update on initramfs img
> > less setups
> 
> Please file this as a separate bug against grubby.

Roger

> 
> > 1. Make custom changes to grub2 configuration files 
> > 2. Run grub2-mkconfig -o /boot/grub2/grub.cfg
> > 3. Copy /boot/grub2/grub.cfg to /tmp
> > 4. Update to new kernel 
> > 5. Diff the kernel generated /boot/grub2/grub.cfg with the one manually
> > generated in /tmp
> 
> This is the wrong workflow.  grub2-mkconfig is only really useful to create the
> initial configuration file, not to update in general.  You shouldn't use it
> unless you're expecting to clobber old configuration entries and any changes
> you've made there, which may be necessary in cases where one kernel needs
> different command line flags than another one.

In which cases has that been the case and I cant ever recall if updates behaving like this with old grub.cfg changes you made there where honoured during updates. 

Even if it has ever been the case I could always reboot into older kernel that supported those entries making necessary updates to /etc/default/grub and regenerate grub.cfg

After initial installation I made changes to /etc/default/grub and other necessary changes to configuration grub2 configuration files. 

Upon update grubby completely ignores those changes and just generates well apparently whatever it feel is right like adding UUID entry to the kernel command line after it has been disabled adding initramfs.img to an imitramfs img less setup after it has been disabled etc.


Anyway I'm not going to debate this with you here. 

Grubby is ignoring/overwriting user defined grub2 configuration upon update and given that grub2 is officially is supported by the distribution this becomes an QA issue.

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