Bug 796976 - /boot/grub2/grub.cfg contains invalid information about its origin
Summary: /boot/grub2/grub.cfg contains invalid information about its origin
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-24 00:11 UTC by Ivo Sarak
Modified: 2012-04-17 21:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-17 21:49:43 UTC
Type: ---


Attachments (Terms of Use)

Description Ivo Sarak 2012-02-24 00:11:22 UTC
Description of problem:

The /boot/grub2/grub.cfg does list as:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

Obviously it is wrong as if to issue that given command ('grub2-mkconfig -o /boot/grub2/grub.cfg'), that command will generate substantially different grub2.cfg file as it is there by itself.

What does generate that file and where are those templates it is being generated from?

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

rpm -qa|grep grub
grub2-1.99-14.fc17.x86_64
grub-efi-0.97-87.fc18.x86_64
grubby-8.8-3.fc17.x86_64

How reproducible:

Always.

Steps to Reproduce:
1. Install a new kernel with 'yum update';
2. Make a backup of the /boot/grub2/grub.cfg file;
3. Issue a 'grub2-mkconfig -o /boot/grub2/grub.cfg' command;
4. Compare those files. 
  
Actual results:

These files are different. For example the 'grub2-mkconfig -o /boot/grub2/grub.cfg' will add a "recovery mode" menu entry for each installed kernels, but 'yum update' does not do that.

Expected results:

Both files must be the same - according to the /boot/grub2/grub.cfg its origin is from 'grub2-mkconfig', so there should be no differences when it will get updated by 'yum update'.

Additional info:

Comment 1 Mads Kiilerich 2012-04-17 21:49:43 UTC
grub.cfg _is_ generated as described.

grubby do however patch the file directly. The result should be very similar to what would be generated, but there are various bugs and quirks in this area.

The most obvious reason for getting a substantially different grub.cfg is however that grub2 has been updated since last time grub.cfg was generated.


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