Fedora 42 dnf update appends 'rhgb quiet' to grub command line

If your /etc/default/grub configuration does NOT specify ‘rhgb quiet’ execute:

sudo grub2-mkconfig > /boot/grub2/grub.cfg

This will recreate the grub command line respecting entries in /etc/default/grub

I have always used grubby to remove rhgb and quiet options.
That method is reliable and updates have never undone changes.

I wonder why grubby method works but the /etc/default/grub edit does not?

During kernel updates, the kernel command line is taken from /etc/kernel/cmdline.

If the file /etc/default/grub is newer than the file /etc/kernel/cmdline, the grub2-mkconfig should recreate /etc/kernel/cmdline with the wanted entries. It is done by this snippets from etc/grub.d/10_linux

    if [ -w /etc/kernel ] &&
           [[ ! -f /etc/kernel/cmdline ||
                  /etc/kernel/cmdline -ot /etc/default/grub ]]; then
        # anaconda has the correct information to create this during install;
        # afterward, grubby will take care of syncing on updates.  If the user
        # has modified /etc/default/grub, try to cope.
        echo "$cmdline" > /etc/kernel/cmdline
    fi
3 Likes

Villy, thanks for pointing out the source of the problem.