Bug 752290 - "DO NOT EDIT THIS FILE" inserted into grub.cfg by grub2-mkconfig is incorrect
Summary: "DO NOT EDIT THIS FILE" inserted into grub.cfg by grub2-mkconfig is incorrect
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
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-11-09 03:52 UTC by T.C. Hollingsworth
Modified: 2012-03-27 09:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-27 09:41:55 UTC
Type: ---


Attachments (Terms of Use)
patch to remove warning (504 bytes, patch)
2011-11-09 03:52 UTC, T.C. Hollingsworth
no flags Details | Diff

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.


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