Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I believe the canonical approach for rewriting the current and all subsequent kernel updates is to edit /etc/default/grub and append the new parameters to the GRUB_CMDLINE_LINUX variable, for example,

GRUB_CMDLINE_LINUX="rhgb quiet drm.debug=0 drm.vblankoffdelay=1 intel_idle.max_cstate=1"

After that update grub as usual, the following bash script will help if you don't know if you're running EFI or not,

#!/bin/bash

cfg=grub.cfg
if [ -d /boot/efi/EFI/fedora ]; then
    cfg="/boot/efi/EFI/fedora"
elif [ -d /boot/grub2 ]; then
    cfg="/boot/grub2"
else
    echo "Error: grub.cfg not found"
    exit 1
fi

cfg="${cfg}/grub.cfg"

echo Backup $cfg
cp -pv $cfg /var/tmp
echo grub2-mkconfig -o "$cfg"
grub2-mkconfig -o "$cfg"