Bug 768376 - Kernel updates ignore user configurations made to grub when it generates it's own entries to grub.cfg on updates
Summary: Kernel updates ignore user configurations made to grub when it generates it's...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: 16
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: 2011-12-16 13:44 UTC by Jóhann B. Guðmundsson
Modified: 2011-12-16 17:38 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-16 16:54:35 UTC
Type: ---
Embargoed:


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

Description Jóhann B. Guðmundsson 2011-12-16 13:44:01 UTC
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 13:54:22 UTC
Created attachment 547810 [details]
Grub cfg generated on kernel update

Comment 2 Jóhann B. Guðmundsson 2011-12-16 13:55:05 UTC
Created attachment 547811 [details]
Grub cfg generated manually from the cli

Comment 3 Jóhann B. Guðmundsson 2011-12-16 13:55:55 UTC
Created attachment 547812 [details]
Diff of both the files

Comment 4 Josh Boyer 2011-12-16 14:09:37 UTC
The grubby package deals with this, not the kernel itself.

Comment 5 Peter Jones 2011-12-16 16:54:35 UTC
(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 17:38:32 UTC
(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.