Ask Your Question

How do I explicitly install kernels on my Fedora machine

asked 2016-06-06 12:35:33 -0500

mpduty gravatar image

I have three kernels installed. All are Fedora 23 Workstation. Two of them are not working. Only one is working. I want to install an older version say Fedora 22 in case an update disturbs my current and only working kernel. How do I do this. Do I need to remove the installations that are not working? How do I remove them and install an older kernel?

edit retag flag offensive close merge delete


Is your system up-to-date (sudo dnf --refresh upgrade)? Increase installonly_limit to 5. What kernel version is working, which are the ones not working?

florian gravatar imageflorian ( 2016-06-06 13:29:57 -0500 )edit

how do I know which kernels are installed and which are not working. I guess uname -a gives me the current one that is running.

mpduty gravatar imagempduty ( 2016-06-09 03:00:54 -0500 )edit

You can use the rpm command. rpm -qa | grep kernel-4.* (rpm -qa lists all installed packages, grep filters accordingly).

florian gravatar imageflorian ( 2016-06-09 09:10:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-06 13:23:55 -0500

florian gravatar image

updated 2016-06-06 13:46:16 -0500

What you can do is to increase the number of kernels your system keeps. Once that number is reached during installation of a new kernel it removes the oldest one (fifo). This number is defined in /etc/dnf/dnf.conf (installonly_limit=n). Set it to 5, for example.

You can also install older kernels but you want to make sure that you are installing a maintained kernel (still receiving security patches).

If you decide to install an older kernel on your Fedora 23, it can't be a kernel that was compiled for Fedora 22 as you suggested, but it can be the same kernel version, compiled for Fedora 23.

You can get a list of kernels that are in F23 repos with this command: sudo dnf repoquery kernel-4* or here: . Select Release=Fedora23 and Status=stable.

Those are currently available in stable:

  • 4.2.3-300.fc23.x86_64
  • 4.4.8-300.fc23.x86_64
  • 4.4.9-300.fc23.x86_64
  • 4.5.5-201.fc23.x86_64

To install them, just run sudo dnf install kernel-4. ... (use TAB for auto-completion).

Useful links:

If some of the recent kernels are not booting your system, you may want to report a bug against the component kernel.

edit flag offensive delete link more


that was very helpful but please explain another thing: when I run uname -a I get the output Linux fedora 4.2.6-201.fc22.x86_64. But when I run cat /etc/fedora-release I get output Fedora release 23 (Twenty Three) What do I make out of this?

mpduty gravatar imagempduty ( 2016-06-09 02:50:17 -0500 )edit

sudo dnf repoquery kernel-4* gives output: Error: Failed to synchronize cache for repo 'updates'

mpduty gravatar imagempduty ( 2016-06-09 02:56:27 -0500 )edit

@mpduty, as for your first comment probably leftover from your F22. (from the 4.2 branch, the most recent available in F23 was 4.2.3. That's maybe why. You did upgrade, right?

As for your second, That means that either your internet connection was down, or the mirrors dnf was trying to reach had problems, or your /etc/yum.repos.d/fedora-updates.repo not correctly configured (not likely if it worked before, and you didn't mess around with this file).

None of the 4.4 or 4.5 kernels work for you?

florian gravatar imageflorian ( 2016-06-09 09:17:15 -0500 )edit

I have the following kernels installed:

  1. kernel-4.2.8-300.fc23.x86_64
  2. kernel-4.2.6-201.fc22.x86_64
  3. kernel-4.5.5-201.fc23.x86_64 out of these only the second works. should I remove the other two? If so how? will dnf remove work? how do I install other kernels and use them?
mpduty gravatar imagempduty ( 2016-06-09 13:49:37 -0500 )edit

No, don't remove them. run sudo dnf --refresh upgrade which will upgrade 4.5.5 to 4.5.6. See if that works. To me makes no sense that 4.2.6 works, and 4.2.8 doesn't.

What graphics adapter are you using? Trying to figure out what your problem here is.

florian gravatar imageflorian ( 2016-06-09 14:52:00 -0500 )edit

Question Tools

1 follower


Asked: 2016-06-06 12:35:33 -0500

Seen: 2,384 times

Last updated: Jun 06 '16