Adding a kernel parameter and regenerating grub config on a silverblue system

Hi Jeet,

Another way of doing this is to use grubby.

Edit by @dustymabe: Please don’t use grubby as it does not integrate with ostree and your added kernel arguments may get lost. See Colin’s response below.

Try running:

sudo grubby --default-kernel

On my system this gives an output of the following (warning: it could be different on yours):

/boot/ostree/fedora-workstation-65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/vmlinuz-4.19.6-300.fc29.x86_64

You can then add a kernel parameter (for example “amdgpu.ppfeaturemask=0xffffffff”) using the following command:

sudo grubby --args=“amdgpu.ppfeaturemask=0xffffffff” --update-kernel /boot/ostree/fedora-workstation-65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/vmlinuz-4.19.6-300.fc29.x86_64

Reboot using:

systemctl reboot

On reboot you can then check if it has been added by running the following command:

sudo grubby --info /boot/ostree/fedora-workstation-65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/vmlinuz-4.19.6-300.fc29.x86_64

On my machine I get the following output:

index=0
kernel=/boot/ostree/fedora-workstation-65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/vmlinuz-4.19.6-300.fc29.x86_64
args=“resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet ostree=/ostree/boot.1/fedora-workstation/65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/0”
root=/dev/mapper/fedora-root
initrd=/boot/ostree/fedora-workstation-65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/initramfs-4.19.6-300.fc29.x86_64.img
title=Fedora 29.20181209.0 (Workstation Edition) 29.20181209.0 (ostree)

The change will persist even when you update the kernel to a newer one.

To remove a parameter (for example “amdgpu.ppfeaturemask=0xffffffff”) you can running the following:

sudo grubby --remove-args=“amdgpu.ppfeaturemask=0xffffffff” --update-kernel /boot/ostree/fedora-workstation-65b19cb39930782c7c954d1ec8b5aabd339ed2845bab6e583b6755dfe889b865/vmlinuz-4.19.6-300.fc29.x86_64

I hope this helps you.