Bug 2021083

Summary: Likely wrong WARNING: Do not edit this file by tools other than grub-editenv
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora <jpazdziora>
Component: grub2Assignee: Bootloader engineering team <bootloader-eng-team>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: jpazdziora, rharwood
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-08 19:02:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Pazdziora 2021-11-08 10:21:10 UTC
Description of problem:

The file /boot/grub2/grubenv on fresh RHEL 9 installation says

# GRUB Environment Block
# WARNING: Do not edit this file by tools other than grub-editenv!!!
saved_entry=b9710b7783ba4efd8d019215bd974d86-5.14.0-11.el9.x86_64
boot_success=0
#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################

The warning message suggests that grub-editenv should be used and for example grubby mustn't be used. However, that can easily lead to confusion about what the correct mechanism for editing grub configuration should be. See for example bug 1926715 or bug 2020556. Also, the RHEL product documentation at https://access.redhat.com/documentation/ prefers grubby over manual grub-editenv.

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

grub2-efi-x64-2.06-2.el9.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Install RHEL 9.
2. Try to figure out how to edit things that have traditionally been in /boot/grub2/grubenv.

Actual results:

/boot/grub2/grubenv points to grub-editenv.

Expected results:

/boot/grub2/grubenv points to grubby, and potentially to grub-editenv second.

Additional info:

Comment 1 Robbie Harwood 2021-11-08 19:02:57 UTC
grubby calls grub2-editenv.

Comment 2 Jan Pazdziora 2021-11-09 07:35:15 UTC
So should the message read "Do not edit this file by tools other than grub-editenv or tools that use it, like grubby"?

Please note that the correct or expected way of configuring GRUB seems to have changed multiple times throughout RHEL 8 and any messaging that only tells half of the truth is harmful.

Comment 3 Robbie Harwood 2021-11-09 14:54:35 UTC
I don't think that's worth carrying a downstream patch for it, no.