I would like to compile and use a realtime kernel on CentOS 7. I found a guide on the web: http://jensd.be/589/linux/complile-and-use-a-realtime-kernel-on-centos-7-or-rhel-7

When I try to use it I can see the new kernel is created, but I get an error on boot:

failed to mount /sysroot
  • What kernel, which patch, and which .config? – Panther Jan 1 '19 at 17:11
  • sorry - kernel 3.10.0-514.el7.x86_64 , patch is patch-3.10.105-rt120. .config is according to the one that came with my kernel – Avner Gidron Jan 2 '19 at 9:25

I gave up on trying to compile the patched kernel myself and followed this steps in installing a pre-compiled one (versions are configurable):

  1. Set up a new repository file called CentOS_rt.repo in /etc/yum.repos.d/CentOS-rt.repo:

    # CentOS-rt.repo
    name=CentOS-7 - rt
  2. Install the wanted version. For example for kernel 3.10.0-514 and patch number 56:
sudo yum install kernel-rt-3.10.0-514.6.1.rt56.429.el7.x86_64
  1. Reboot and load the patched kernel.

I leave this question open as my solution is not for the original question and if someone has an answer please load it.

  • After doing the above, can we change a config in kernel, I mean: where are is the source code ? – ransh Oct 4 '19 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.