Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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 (Red Hat) <jpazdziora>
Component: grub2Assignee: Bootloader engineering team <bootloader-eng-team>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: jpazdziora, rharwood
Target Milestone: rcFlags: pm-rhel: mirror+
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 (Red Hat) 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 (Red Hat) 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.