Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-26632

RFE: accept --copy-default when using --update-kernel

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.8.0, rhel-9.2.0
    • grubby
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      As a user, I want to be able to update default kernel commandline parameters. One of typical scenarios is that a new version of kernel (and sometimes other packages) needs to be booted with a different kernel cmdline - which usually means that I want to have a new default kernel commandline also for any future installed kernels.

      Having properly set kernel commandline for such a new default boot entry, I would like to be able to set the default kernel cmdline based on it in a simple way:

      # grubby --update-kernel ALL --copy-default
      

      This seems to be the way also regarding the man page, which seems to say it should work (update: I see know the note about new kernel, so I agree it's RFE):

            --args=kernel-args
                    When a new kernel is added, this specifies the command line  ar‐
                    guments  which  should  be passed to the kernel by default (note
                    they are merged with the  arguments  of  the  default  entry  if
                    --copy-default  is  used).   When  --update-kernel is used, this
                    specifies new arguments to add to the argument  list.  Multiple,
                    space  separated  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 handling for specifying the root filesystem.
      
             --copy-default
                    grubby will copy as much information (such as  kernel  arguments
                    and  root  device)  as possible from the current default kernel.
                    The kernel path and initrd path will never be copied.
      

      Current behaviour:
      `-copy-default` argument is ignored for the `update-kernel` operation. In case of `-update-kernel ALL`, no change happens for other kernel, nor /etc/default/grub nor /etc/kernel/cmdline files are updated.

      Expected behaviour:
      Calling `grubby -update-kernel <value> --copy-default` set correctly parameters for the target kernel(s) based on the current default kernel. In case of `-update-kernel ALL`, also /etc/default/grub & /etc/kernel/cmdline files are updated properly so further kernel installations respect the new default.

      Additional info:

      • This is also typical scenario for in-place upgrades between major versions of RHEL systems, where the target new version of kernel is set as default and has proper kernel cmdline parameters, however the default parameters are not updated.

              bootloader-eng-team bootloader -eng-team
              pstodulk@redhat.com Petr Stodulka
              bootloader -eng-team bootloader -eng-team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: