Bug 752290

Summary: "DO NOT EDIT THIS FILE" inserted into grub.cfg by grub2-mkconfig is incorrect
Product: [Fedora] Fedora Reporter: T.C. Hollingsworth <tchollingsworth>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: a.sloman, dennis, mads, pcfe, pjones, the.ridikulus.rat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-27 09:41:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
patch to remove warning none

Description T.C. Hollingsworth 2011-11-09 03:52:34 UTC
Created attachment 532445 [details]
patch to remove warning

The "DO NOT EDIT THIS FILE" warning inserted at the top of grub.cfg by grub2-mkconfig is incorrect.  Since grub2-mkconfig is only run by anaconda, and Fedora uses grubby instead of Debian's update-grub, editing grub.cfg is safe.

The attached patch removes this warning.

Comment 1 Mads Kiilerich 2011-11-09 18:46:34 UTC
The warning is intentional. The fact that grubby manipulates the file directly does not make it less true.

grub2-mkconfig might be run again by anaconda on next upgrade and will overwrite the file.

The user might also run grub2-mkconfig manually to use some fancy new feature configured in /etc/default/grub.

Having two ugly ways of configuring the boot loader is indeed not perfect. That makes the warning relevant.

Comment 2 Patrick C. F. Ernzer 2011-12-01 21:06:47 UTC
yes, please keep the warning, a lot of the documentation tells users to use grub2-mkconfig

Comment 3 aaronsloman 2012-03-26 23:17:49 UTC
I have no choice but to edit grub.cfg after 'yum update kernel' in fedora 16, because grubby always inserts the wrong UUID for the root partition for the current kernel. For some reason it inserts the UUID for a partition previously used as root for fedora 15, even though I am running F16, and even though it gets the UUID right for the saved kernels.

The result of the error was a whole series of obscure errors after attempting to boot with new kernel. It was only by chance after much struggling that I discovered that this systematic error occurred EVERY time I used yum to upgrade the kernel. Others have reported the same problem. E.g. bug #751875

I suspect this problem is at the root of a large number of bugs involving obscure behaviour, and probably helps to explain the existence of 'hate grub2' web sites. Grubby needs to be fixed, urgently, or replaced.

Comment 4 Mads Kiilerich 2012-03-27 09:41:55 UTC
aaronsloman:
The fact that you have found that the best workaround for another bug is to edit grub.cfg does not change the fact that editing that file manually not is recommended.

The only good solution is to fix the other bug you mention ... and this issue is not the right place to discuss that.