Hide Forgot
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.
(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.
The fixed version can be seen here: https://access.qa.redhat.com/documentation/en-us/red_hat_enterprise_linux/8_test/html-single/managing_monitoring_and_updating_the_kernel/index#changing-kernel-command-line-parameters-for-all-boot-entries_setting-kernel-command-line-parameters Feedback is welcome. Thank you, Jaroslav
Hi all, the bug has been fixed and you can see the final version here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8_test/html-single/managing_monitoring_and_updating_the_kernel/?lb_target=preview#setting-kernel-command-line-parameters_configuring-kernel-command-line-parameters Best regards, Jaroslav
Looks good to me
*** Bug 1661591 has been marked as a duplicate of this bug. ***