| Summary: | "DO NOT EDIT THIS FILE" inserted into grub.cfg by grub2-mkconfig is incorrect | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | T.C. Hollingsworth <tchollingsworth> | ||||
| Component: | grub2 | Assignee: | Peter Jones <pjones> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 16 | CC: | 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: |
|
||||||
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. yes, please keep the warning, a lot of the documentation tells users to use grub2-mkconfig 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. 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. |
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.