r/CentOS•
Freyr90

CentOS with a newer kernel?

Since CentOS 8 comes out with the 4.19 kernel, and my app needs 5.2+, it seems I need a newer kernel. Does anybody use custom kernels/newer kernels? Does it play well with the rest of the distribution? Is elrepo kernel robust? Is elrepo well maintained?

Posted Sep 16, 2019, 7:52 PM UTC

316
alatteri•

I run with Kernel-ML from elrepo on a mission critical server without issue.

6
rallar8•

This is the easiest.

Obviously compiling from source will get it done as well.

elrepo and centos will bring up relevant pages in your search engine of choice

1
[deleted]•

[deleted]

4
Freyr90OP•

Right, 4.18. I need v4l2 buffer orphaning support, it's 5.2 I suppose. Next lts kernel (5.4, I think) would suffice (5.2 at the moment, since 5.4 is not ready yet).

RedHat/CentOS people don't backport stuff like that, am I right?

1
Blog_Pope•

You could build a custom 5.2 Kernel and run that, but you risk stability because that combo hasn’t been fully regression tested. Alternatively you could try to apply the buffer orphaning feature to the existing 4.18 kernel, not sure what’s higher risk. I used to run a custom kernel to add Fiber Channel/SAN drivers, never had an issue but YMMV..

2
BconOBoy•

We backport major kernel features all the time, without breaking kABI whitelist symbols. It's kind of our thing. It might not be there yet, but it could be in the future.

2
Freyr90OP•

Where could I find a CentOS/RHEL kernel sources (I suppose by we you mean rh/centos devs?), in particular the el8 kernel?

1
fat-lobyte•

It should be as simple as: dnf download --source kernel

This will get you the source RPM that you can install using:

rpmdev-setuptree

rpm -ivh kernel-<>.src.rpm

1
biffbobfred•

We use a newer kernel for C7. We custom compile it for drivers and have a scheduler variant. Haven’t had too many issues from it.

3
msg7086•

If your app needs 5.2+, you probably shouldn't be using CentOS at all. Kernel-ml is not for production use (yes you can, but...), so better just use Fedora or even Debian testing instead? elrepo is rolling update on -ml, means that they will only roll to the very latest and not keep a stable version and backport patches. I don't consider that as "maintain".

We have CentOS 6 and 7 templates with 4.9 kernels though. 5.2+ is way too new.

EDIT: Actually next Ubuntu will probably be based on 5.4. That can be your option too.

3
Freyr90OP•

The reasons why I would like to use centos are: stability, koji, rpm over deb. I don't mind living without kernel updates, it's just the kernel is too old for my app. I think I'll build next lts by myself.

1
MisterMeiji•

There are plenty of reasons to use new kernels on CentOS- the main reason being better hardware support while keeping the same conservative mindset with userland stuff.

1
FullMotionVideo•

Thanks for this. This is exactly why I’m thinking of switching from Fedora for a box that runs Plex, torrents, and Kodi 24/7. I don’t want constant updates to the desktop. Kernels and SELinux are my only concern.

1
sethgoldin•

This isn’t really what CentOS is for. It’s an enterprise distro, so it’s very conservative and the newest kernels are never used. Despite the version numbers, CentOS, like RHEL, uses backporting: https://access.redhat.com/security/updates/backporting

If you need a newer kernel, just use Fedora instead.

2
MisterMeiji•

CentOS is "for" whatever anyone wants to use it for. AS an example, I have a workstation where I do extensive photography workflows, on CentOS. The 5.2 and 5.3 line of kernels from elrepo have much better SD card and scanner support than do the normal CentOS kernels. There's no reason I should have to put up with Fedora's extremely short lifecycle just to use an advanced kernel.

0
dat720•

I'd use Fedora Server for this use case.

2
MisterMeiji•

I've used the elrepo ml and lt kernels for a while without issue.

2