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 1657218 - DOCUMENTATION: grub2-editenv command will break boot of a system
Summary: DOCUMENTATION: grub2-editenv command will break boot of a system
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: Documentation
Version: 8.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: 8.0
Assignee: Jaroslav Klech
QA Contact: RHEL DPM
URL:
Whiteboard:
: 1661591 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-07 13:46 UTC by Charles Haithcock
Modified: 2019-05-22 04:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-16 09:45:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Charles Haithcock 2018-12-07 13:46:24 UTC
Document URL: 

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html-single/managing_monitoring_and_updating_the_kernel/


Section Number and Name: 

2.4.1. Changing kernel command line parameters for all boot entries


Describe the issue: 

The grub2-editenv command, if ran as is, would cause a system to fail to boot on reboot for all kernels. 

# grub2-editenv - set kernelopts=”rd.debug=1 rhgb”

This wipes _all_ kernel parameters and resets the kernelopts to the list provided. Likewise, the 'kernelopts=' needs to be enclosed in the quotation marks as well. 


Suggestions for improvement: 

A KCS goes through great detail on how to change it: 

https://access.redhat.com/solutions/3710121

Alternatively, some sed magic and subshell fun could be used to make this option less scary since the entire parameter list must be provided: 

# grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) <NEEW_PARAM>"
# grub2-editenv - set "$(grub2-editenv - list | grep kernelopts | sed -e 's/<PARAM_TO_REMOVE>//')"


For example, if the parameter you want to add/remove is "example": 

# grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) example"
# grub2-editenv - set "$(grub2-editenv - list | grep kernelopts | sed -e 's/example//')"


Additional information: 

The grub2-editenv command does not add or subtract from the environment variables but rather overwrites the entire parameter value being changed. 

The BZ is set to high only because the documentation, as is, could legitimately break customer systems.

Comment 1 Javier Martinez Canillas 2018-12-12 10:45:21 UTC
(In reply to Charles Haithcock from comment #0)
> Document URL: 
> 
> https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-
> beta/html-single/managing_monitoring_and_updating_the_kernel/
> 
> 
> Section Number and Name: 
> 
> 2.4.1. Changing kernel command line parameters for all boot entries
> 
> 
> Describe the issue: 
> 
> The grub2-editenv command, if ran as is, would cause a system to fail to
> boot on reboot for all kernels. 
> 
> # grub2-editenv - set kernelopts=”rd.debug=1 rhgb”
> 
> This wipes _all_ kernel parameters and resets the kernelopts to the list
> provided. Likewise, the 'kernelopts=' needs to be enclosed in the quotation
> marks as well. 
> 
> 
> Suggestions for improvement: 
> 
> A KCS goes through great detail on how to change it: 
> 
> https://access.redhat.com/solutions/3710121
> 
> Alternatively, some sed magic and subshell fun could be used to make this
> option less scary since the entire parameter list must be provided: 
> 
> # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts)
> <NEEW_PARAM>"
> # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts | sed -e
> 's/<PARAM_TO_REMOVE>//')"
> 
> 
> For example, if the parameter you want to add/remove is "example": 
> 
> # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts) example"
> # grub2-editenv - set "$(grub2-editenv - list | grep kernelopts | sed -e
> 's/example//')"
> 
> 
> Additional information: 
> 
> The grub2-editenv command does not add or subtract from the environment
> variables but rather overwrites the entire parameter value being changed. 
> 
> The BZ is set to high only because the documentation, as is, could
> legitimately break customer systems.

Agreed on the suggestion.

Also, now updating GRUB_CMDLINE_LINUX in /etc/default/grub and running grub2-mkconfig is also supported. This was done because there is a lot of documentation suggesting this and users are used to that workflow. So it should be mentioned in the documentation as well.

Comment 6 Charles Haithcock 2019-03-20 20:09:47 UTC
Looks good to me

Comment 7 Jaroslav Klech 2019-04-18 10:10:33 UTC
*** Bug 1661591 has been marked as a duplicate of this bug. ***


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