I’m having some problems on my machine (with kernel 5.2.9) and someone here advised me to downgrade to 5.1.x, but I’m not sure how to do it.
I found the list of all available kernels here and saw that the latest 5.1 is 5.1.20. Now I’m not sure:
From which category? (x86_64?)
Which specific RPMs? There’s a long list
How do I install them? Simply RPM install will downgrade the kernel? Do I need to dnf remove something first?
After I’ve installed, how do I setup grub to load that specific verison?
That depends on your CPU architecture, but more than likely you have an x86 64 bits system, so Yes.
That depends on what kernel packages are installed (required) on your system. Find out the currently installed kernel packages with following command. Then download the same ones from the older kernel version:
rpm -qa "kernel*"
go to the directory where you downloaded them, then simply run sudo dnf install kernel-5.x-...
dnf will take care of that. there is a post-install script that will automatically update grub.
So if I understand you correctly - there’s no need to download the RPMs at all, simply find the version I want and dnf install it?
Is rpm -qa "kernel*" redundant?
One small correction. As far as I know, grub will default to the latest kernel you have, not to the 5.1.X you’ve installed manually. It will add 5.1.X to the boot menu, and you can select it manually on each boot.
To make older kernel a default one for grub you should either use grubby (I’ve never done it this way):
Use actual kernel version number you need, don’t copypaste my number, I just made it up.
The second way I’ve actually used, you need to change /etc/default/grub config file, change line GRUB_DEFAULT=saved to GRUB_DEFAULT="Name_of_the_boot_entry_you_need"
The name of the entry you can take from
if you system has BLS enabled (GRUB_ENABLE_BLSCFG=true in /etc/default/grub) – then
sudo grep title /boot/loader/entries/*-5.1.20-200.fc30.x86_64.conf
if GRUB_ENABLE_BLSCFG=false then from looking for appropriate menuentry in the grub.cfg.
It should be something like GRUB_DEFAULT="Fedora (5.1.20-200.fc30.x86_64) 30 (Thirty)"
– but don’t try to guess it, look it up exactly.
After changing /etc/default/grub you need to regenerate grub.cfg:
sudo grub2-mkconfig -o /path/to/your/grub.cfg
where /path/to/your/grub.cfg is
/boot/efi/EFI/fedora/grub.cfg – for UEFI installations
/boot/grub2/grub.cfg – for Legacy/BIOS installations
You can check which mode your Fedora in installed in with
test -d /sys/firmware/efi && echo EFI || echo Legacy
Note that setting default kernel in this way is permanent, you’ll need to revert it to default (i.e. latest one) manually in a similar fashion.
P.S. Also I’ve never tested what happens if the kernel you’ve set as a default one is removed automatically as the oldest one on your system – check the links below about this autoremoval.
Also please check these two threads, they are relevant to your question:
No, misunderstanding here. You have to download the .rpm packages, which you then install using dnf.
no, rpm -qa is a query command that will show you the rpm packages installed on your system, while ls is a simply list of the current directory. Different things.
OK I successfully downgraded to 5.1.20.
I used rpm -i <file>.rpm on all the RPMs I downloaded.
After the installation I ran grubby --default-kernel and found out the default was changed to the kernel I just installed.