Fedora: reinstall kernel and update GRUB config

This is to show how dnf reinstall can be used to rewrite the GRUB config to boot a specific kernel on Fedora.

My Fedora 34 ended up in a bit of a confused state. From DNF’s point of view (only) kernel 5.14.13 was installed:

$ dnf list kernel
Last metadata expiration check: 0:00:57 ago on Fri 22 Oct 2021 02:41:15 PM CEST.
Installed Packages
kernel.x86_64 5.14.13-200.fc34 @updates

But grubby showed that 5.14.9 was configured for boot:

grubby --default-kernel
/boot/vmlinuz-5.14.9-200.fc34.x86_64

This reinstall command set things straight again:

dnf reinstall kernel-core-5.14.13-200.fc34.x86_64

Outcome:

$ grubby --default-kernel
/boot/vmlinuz-5.14.13-200.fc34.x86_64