# Kernel
Stuff relating to the linux kernel
# Fedora
Tested on Fedora 29
# Reverting to an Older Kernel Version
Install versionlock
dnf install python3-dnf-plugins-extras-versionlock
Lock the kernel version
dnf versionlock add kernel-4.20.14-200.fc29
Run grubby to find your current kernel versions, we'll be using the 4.20 kernel for our example. The line we want is highlighted below:
grubby --info=ALL
index=0
kernel=/boot/vmlinuz-5.0.10-200.fc29.x86_64
args="ro resume=/dev/mapper/luks-ebbd85cb-5426-4f41-a8b7-587de911b2c3 rd.luks.uuid=luks-132e6795-3542-487f-859f-938b2a33c2bf rd.luks.uuid=luks-ebbd85cb-5426-4f41-a8b7-587de911b2c3 rhgb quiet "
root=UUID=08e55ebb-c56e-4ac0-a836-f50929bf23f0
initrd=/boot/initramfs-5.0.10-200.fc29.x86_64.img
title=Fedora (5.0.10-200.fc29.x86_64) 29 (Workstation Edition)
index=1
kernel=/boot/vmlinuz-4.20.14-200.fc29.x86_64
args="ro resume=/dev/mapper/luks-ebbd85cb-5426-4f41-a8b7-587de911b2c3 rd.luks.uuid=luks-132e6795-3542-487f-859f-938b2a33c2bf rd.luks.uuid=luks-ebbd85cb-5426-4f41-a8b7-587de911b2c3 rhgb quiet "
root=UUID=08e55ebb-c56e-4ac0-a836-f50929bf23f0
initrd=/boot/initramfs-4.20.14-200.fc29.x86_64.img
title=Fedora (4.20.14-200.fc29.x86_64) 29 (Workstation Edition)
index=2
kernel=/boot/vmlinuz-0-rescue-15ef033857d4424584002de89b0ee955
args="ro resume=/dev/mapper/luks-ebbd85cb-5426-4f41-a8b7-587de911b2c3 rd.luks.uuid=luks-132e6795-3542-487f-859f-938b2a33c2bf rd.luks.uuid=luks-ebbd85cb-5426-4f41-a8b7-587de911b2c3 rhgb quiet "
root=UUID=08e55ebb-c56e-4ac0-a836-f50929bf23f0
initrd=/boot/initramfs-0-rescue-15ef033857d4424584002de89b0ee955.img
title=Fedora (0-rescue-15ef033857d4424584002de89b0ee955) 29 (Workstation Edition)
index=3
non linux entry
index=4
non linux entry
index=5
non linux entry
Replace the saved_entry
in the following file with the next from our last command Fedora (4.20.14-200.fc29.x86_64) 29 (Workstation Edition)
Here's what it looks like after the edit
nano /boot/grub2/grubenv
# GRUB Environment Block
#saved_entry=Fedora (5.0.10-200.fc29.x86_64) 29 (Workstation Edition)
saved_entry=Fedora (4.20.14-200.fc29.x86_64) 29 (Workstation Edition)
menu_auto_hide=1
boot_success=1
boot_indeterminate=0
#########################################################################################################################################################################################################################################################################################$
Optional step
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg