How do I change redhat kernel command line parameters for a specific kernel version?

  • Also see: grubby(8) - command line tool used to configure bootloader menu entries...

    List your kernel files. The example shows two kernels with their associated rescue files.

    # ls /boot/vmlinuz*

    The kernel version you are currently running can be seen using uname

    $ uname -a
    Linux 4.18.0-80.4.2.el8_0.x86_64...

    The changes are going to be made to the /boot/vmlinuz-4.18.0-80.4.2.el8_0.x86_64 kernel to change the console boot output to be minimum; by using the kernel parameter "quiet"

    Note: It is important to understand you are overriding the default kernel parameter setting, by individually editing a single kernel boot entry.

                  Update the entries for kernels matching  kernel-path.  Currently
                  the  only  item that can be updated is the kernel argument list,
                  which is modified via the --args and --remove-args options.
                  When a new kernel is added,  this  specifies  the  command  line
                  arguments  which should be passed to the kernel by default (note
                  they are merged with the arguments from the template if  --copy-
                  default  is used).  When --update-kernel is used, this specifies
                  new arguments to add to the argument list. Multiple, space sepa‐
                  rated  arguments  may be used. If an argument already exists the
                  new value replaces the old values.  The  root=  kernel  argument
                  gets special handling if the configuration file has special han‐
                  dling for specifying the root filesystem (like lilo.conf does).

    This will change the boot entry configuration file for this version of the kernel only.

    $ sudo grubby --update-kernel=/boot/vmlinuz-$(uname -r) --args="quiet"

Log in to reply

© Lightnetics 2024