How to Install or Upgrade to Kernel 4.20 in CentOS 7

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

52 Responses

  1. ADAM says:

    uname -r returns the correct kernel version. ‘rpm -qa kernel‘ only returns the old versions.

    The tests that I am running from AWS are picking up the old versions. Any suggestions whats going on?

    • Ravi Saive says:


      The command rpm -qa kernel will show only old installed kernels, to get newer version use:

      # uname -sr
  2. Adam says:

    I followed these instructions. After rebooting and running ‘uname -sr’ it returns: Linux 4.17.5-1.el7.elrepo.x86_64

    If I run ‘rpm -qa kernel’ it does not show the version above. It only shows the old versions.

    I am running some tests and they do not see the 4.17 kernel only the old 3.10 kernel.

    It does not seem like these instructions actually install a new kernel.

    Any suggestions?

    • Ravi Saive says:


      What I understand is, that rpm will only list old kernels, whereas uname -r will list current kernel.

  3. phil reklai says:


    I have successfully upgraded my kernel version from 3.10 to 4.14 using your instructions but the problem is now I get these errors every-time I boot my centos 7 server.

    Any idea how to fix this?.

    wdat_wdt wdat_wdt: can’t request region for resource [mem 0x8d6c4b98-0x8d6c4b9c] kernel
    ACPI Exception: AE_NOT_EXIST, Evaluating _PMC (20170728/power_meter-755) kernel
    ACPI Error: Method parse/execution failed \_SB.PMI0._PMC, AE_NOT_EXIST (20170728/psparse-550) kernel
    ACPI Error: Method parse/execution failed \_SB.PMI0._GHL, AE_NOT_EXIST (20170728/psparse-550) kernel
    ACPI Error: Region IPMI (ID=7) has no handler (20170728/exfldio-299) kernel
    ACPI Error: No handler for Region [SYSI] (ffff88016b161048) [IPMI] (20170728/evregion-166) kernel

    • Ravi Saive says:


      Check in /var/log/messages for these errors, and it’s related to ACPI buffer size. The solution is to blacklist the acpi_power_meter kernel module. The driver doesn’t work due to the incorrect buffer size.

      # echo "blacklist acpi_power_meter" >> /etc/modprobe.d/hwmon.conf

      This is also caused by a missing kernel module, which was not supported by kernel package version 3.0.x before. After updating the Kernel, the required modules will not be loaded automatically, so you need to load it manually using the following commands:

      # modprobe ipmi_si
      # modprobe acpi_ipmi
      • phil reklai says:


        Thank you very much for your help. the error was gone but now it got replace by this error:

        i2c i2c-0: sendbytes: NAK bailout.

        any idea how to fix that?

        • Ravi Saive says:


          It seems your hardware isn’t supported by new kernel module or seems a bug in kernel version you have.

  4. baijianpeng says:

    At first, I must say this is a wonderful tutorial! I followed those steps and then successfully upgraded my CentOS 7.4 kernel to 4.15.12.

    However, I met new issue now:

    After I run “yum update -y” , I noticed that the old kernel 3.3.10 was also updated and now it is moved to the top one position on the list of booting options on the first screen when I rebooting my server, and that option is selected by default.

    That is to say, now my server will reboot with updated kernel 3.3.10 instead of the new one 4.15.12 if I don’t do anything.

    Why the sequence of boot options will change after “yum update” ?

    How can I configure to “always boot with Kernel 4.15.12 no matter which position it is placed on the list”?

    Thank you.

    • Ravi Saive says:


      You can change the default boot option and set the new kernel as default, just follow the Step 3: Set Default Kernel Version in GRUB in the article.

      • baijianpeng says:

        I surely had done that step. My point is: the “yum update” command will CHANGE the sequence of boot options. So you don’t know which option will be selected by default after next “update” command.

        How can we configure the “grub” to ALWAYS boot with specific version of Kernel?

        Thank you.

        • Ravi Saive says:


          Yes, once kernel update the boot sequence change automatically, so to boot into default kernel you need to configure grub as explained in the article.

          • baijianpeng says:

            Did you really understand my question?

            In your article, you said: ” GRUB_DEFAULT=0. This means that the first kernel in the GRUB initial screen will be used as default.” , so, which “value” should I use to let certain kernel version will be selected by default no matter it is the first or not?

          • Ravi Saive says:


            Yeah go it, you want to set certain kernel version permanently. For this first you need to list all available kernel images added to GRUB2 by running the following command.

            $ grep '^menuentry' /boot/grub2/grub.cfg

            Now verify the GRUB menu entry for the kernel that you want to use. Every menu entry is allocated by GRUB2 a numeric value starting from 0 in an increasing order. That means, the first menu entry allocated 0, the second entry allocated 1, etc.

            To set different kernel version, open /etc/default/grub file and set GRUB_DEFAULT to the numeric entry value for the kernel that you want to use as default.

  5. famo says:

    Thanks a lot, is there a way for installing it without needing to network ?

  6. Shoby says:

    There is need to update kernel headers as well to same version as kernel.

  7. David says:

    Now what to do if this does not work, followed your instructions and the system would not boot with the new kernel

  8. Taryel Kazimov says:

    Hi, what is difference between rpm -Uvh & rpm -ivh for kernel upgrade?

  9. Mario says:

    Who supports this if you upgrade rehl or centos to 4.14?

    • Gabriel A. Cánepa says:

      If you’re on RHEL, you can always go to Red Hat for support – although it would be a pretty good idea to engage them right from the start. As for CentOS, you’re basically on your own – except for the support you may get from the community.

  10. Krishna says:


    Kindly help me have situations, I have an dedicated server with CentOS 7 x64 bit. Last day I have updated the both OS and kernel ( CentOS 7 to 7.4 x64 bit.

    Situation 1: OS not booting from new kernel 3.10.0-693.5.2.e17.x86_64 (Getting black dead screen) but working fine on old kernel 3.10.0-229.e17.x86_64 .
    situation 2: I have downloaded the latest CentOS 7.4 x64 bit and tried to fresh installation on the server but this also not working (Getting black dead screen).

    Screenshot :

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.