View Full Version : F23: How to revert to previous kernel?

14th January 2016, 02:02 AM
My F23 machine upgraded to kernel-PAE-core-4.3.3-300.fc23.i686 yesterday, but I'm bitten by https://bugzilla.redhat.com/show_bug.cgi?id=1298192 and want to revert to the previous kernel (kernel-PAE-core-4.2.8-300.fc23.i686).

It's not obvious what the proper way to revert to the previous kernel is. Any ideas?

$ rpm -q kernel-PAE-core

$ sudo dnf downgrade kernel-PAE-core --allowerasing
Last metadata expiration check performed 0:42:57 ago on Wed Jan 13 16:09:15 2016.
Error: conflicting requests

14th January 2016, 02:55 AM
My F23 machine My F23 machine upgraded to kernel-PAE-core-4.2.7-300.fc23.i686 yesterday, yesterday,...
I presume that it's safe to assume that you meant.."..upgraded to kernel-PAE-core-4.3.3-300.fc23.i686", since the 4.3.3 kernel is the newest of the three you have installed.

Since you can have as many kernels installed as you want (the configuration limit is 3 plus the rescue kernel), it may be that the "downgrade" command is a bit too ambiguous to use for kernels. You have a few choices here.

My first choice would be to reboot into the previous kernel (4.2.8) from the grub menu at startup then use dnf to erase the 4.3.3 kernel packages. That in itself would make the 4.2.8 kernel the default at boot up. This would also prevent the next kernel to come along that you installed from removing the oldest (4.2.7), and assuming you did nothing to change the configuration to allow more than three kernels to be installed concurrently.

My second choice would be to reconfigure grub to make the second kernel (4.2.8) boot as the default. Grub counts installed kernels from newest to oldest and starts counting at zero (0), so the second kernel would be number 1. To change that, you can do it the two step recommended way or take the direct route and edit the grub.cfg file directly.

The two step way:

Edit your /etc/default/grub file and change the line:

GRUB_DEFAULT="saved" or possibly GRUB_DEFAULT="0"



Then, step two, run, assuming an MBR BIOS install since you're running a PAE kernel:

# grub2-mkconfig -o /boot/grub2/grub.cfg
Which will pick up that change and set it in the actual grub.cfg file.

Direct method:

Just edit your /boot/grub2/grub.cfg file directly and find the line

set default= (the one that isn't in an if stanza)


set default="1"

double quotes are optional.

To keep a general package update from reinstalling the same 4.3.3 kernel, again, two methods.

In your /etc/dnf/dnf.conf file, add an exclude= line if one doesn't already exist


Don't forget the glob at the end

Or, at the command line..

# dnf --exclude=kernel* upgrade

14th January 2016, 08:45 AM
I presume that it's safe to assume that you meant.."..upgraded to kernel-PAE-core-4.3.3-300.fc23.i686"

Ah, yes. Copy/paste error. I fixed my original post.

Thanks for all the details. Rebooting into the previous kernel with the grub menu and then removing the bad 4.3.3 kernel package occurred to me, but this is a remote machine.

I'll use your details on reconfiguring grub to boot into the previous kernel.

14th January 2016, 06:58 PM
If your server host have setup KVM over IP (https://en.wikipedia.org/wiki/KVM_switch#KVM_over_IP_.28IPKVM.29) you could definitely use that to boot into known good kernel.