How to run a Centos Stream kernel on a Centos 8 distro?

Issues related to applications and software problems and general support
Post Reply
spacemanx
Posts: 8
Joined: 2020/01/10 20:57:33

How to run a Centos Stream kernel on a Centos 8 distro?

Post by spacemanx » 2020/01/10 21:04:04

What I'm really trying to get is support for the Intel ax200 wireless card. The CentOS 8 Stream kernel (kernel-4.18.0-144.el8) apparently has support for this card whereas the CentOS 8 kernel (4.18.0-80.11.2.el8_0.x86_64) does not. I've read some posts about people using a kernel 5 but I feel like that's pretty risky as I'd run the risk of borking my system with incompatible modules and/or packages.

An addition of kernel-4.18.0-144.el8 feels safer.

The projects I'm working on need to run on CentOS 8 anyhow, but I'd really like to have wifi until the distro gets around to providing support via an updated kernel or whatever.

I'm coming from a Slackware, then Ubuntu background. So I'm not 100% clear on how to roll up a newer kernel for CentOS 8 and have it as another grub boot option.

User avatar
TrevorH
Forum Moderator
Posts: 29065
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by TrevorH » 2020/01/10 22:33:10

You can find what will be 8.1 in the CR repo (dnf --enablerepo-cr update) and that has a 4.18.0-147 kernel series.

Otherwise you can yum install centos-release-stream and then yum update.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

spacemanx
Posts: 8
Joined: 2020/01/10 20:57:33

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by spacemanx » 2020/01/10 22:40:07

TrevorH wrote:
2020/01/10 22:33:10
You can find what will be 8.1 in the CR repo (dnf --enablerepo-cr update) and that has a 4.18.0-147 kernel series.

Otherwise you can yum install centos-release-stream and then yum update.
Thanks. I tried yum install centos-release-stream and then did a dnf update. It broke my system (ie., wouldn't boot, not even via recovery grub entry).

So if I install the 4.18.0-147 kernel via dnf and the 8.1 repo enabled, will it create a new grub entry? Also, what are the odds if it breaking my system? It's been a really bumpy road (eg., getting the nvidia quadro t2000 driver running).

spacemanx
Posts: 8
Joined: 2020/01/10 20:57:33

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by spacemanx » 2020/01/10 22:47:59

TrevorH wrote:
2020/01/10 22:33:10
You can find what will be 8.1 in the CR repo (dnf --enablerepo-cr update) and that has a 4.18.0-147 kernel series.
So I added the cr repo, but when I do the following:

sudo dnf search 4.18.0-147
CentOS-8 - cr 3.9 MB/s | 7.4 MB 00:01
Last metadata expiration check: 0:00:02 ago on Fri 10 Jan 2020 05:46:38 PM EST.
No matches found.

I don't see any matches. I would have thought I'd get a hit for that specific kernel rpm.

spacemanx
Posts: 8
Joined: 2020/01/10 20:57:33

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by spacemanx » 2020/01/10 23:20:15

Ok so I installed the 0-147 kernel and I can boot into it or the other kernel images I already had. That's nice.

But several modules are no longer loading (eg., nvidia, virtual box, etc). I see inside /lib/modules/4.18.0-147.el8.x86_64 a link to a build directory that does not exist.

build -> /usr/src/kernels/4.18.0-147.el8.x86_64

How do I get /usr/src/kernels/4.18.0-147.el8.x86_64?

Will that even solve my module loading issue?

I also notice that the intel wifi modules are not loading either, which was the main reason for using this kernel:

[ 21.031725] Intel(R) Wireless WiFi driver for Linux
[ 21.031726] Copyright(c) 2003- 2015 Intel Corporation
[ 21.031977] iwlwifi 0000:3b:00.0: enabling device (0000 -> 0002)
[ 21.043239] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-48.ucode failed with error -2
[ 21.043251] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-47.ucode failed with error -2
[ 21.043260] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-46.ucode failed with error -2
[ 21.043270] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-45.ucode failed with error -2
[ 21.043279] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-44.ucode failed with error -2
[ 21.043288] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-43.ucode failed with error -2
[ 21.043297] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-42.ucode failed with error -2
[ 21.043306] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-41.ucode failed with error -2
[ 21.043315] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-40.ucode failed with error -2
[ 21.043324] iwlwifi 0000:3b:00.0: Direct firmware load for iwlwifi-cc-a0-39.ucode failed with error -2
[ 21.043325] iwlwifi 0000:3b:00.0: no suitable firmware found!
[ 21.043328] iwlwifi 0000:3b:00.0: minimum version required: iwlwifi-cc-a0-39
[ 21.043330] iwlwifi 0000:3b:00.0: maximum version supported: iwlwifi-cc-a0-48
[ 21.043331] iwlwifi 0000:3b:00.0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

User avatar
TrevorH
Forum Moderator
Posts: 29065
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by TrevorH » 2020/01/11 01:13:04

You'll need to rebuild things that you built for a previous kernel - nvidia from .run file and vbox drivers.

I ran dnf --enablerepo=cr provides '*/iwlwifi-cc-a0-*' and it tells me that iwl7260-firmware-1:25.30.13.0-94.el8.1.noarch in the CR repo supplies /usr/lib/firmware/iwlwifi-cc-a0-46.ucode so I would install that package too.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

spacemanx
Posts: 8
Joined: 2020/01/10 20:57:33

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by spacemanx » 2020/01/11 01:21:40

TrevorH wrote:
2020/01/11 01:13:04
You'll need to rebuild things that you built for a previous kernel - nvidia from .run file and vbox drivers.

I ran dnf --enablerepo=cr provides '*/iwlwifi-cc-a0-*' and it tells me that iwl7260-firmware-1:25.30.13.0-94.el8.1.noarch in the CR repo supplies /usr/lib/firmware/iwlwifi-cc-a0-46.ucode so I would install that package too.
Ok, I tried that for nvidia and it warned me that I already had a version installed which it would delete. I only have one version, so that felt like deleting / reinstalling wouldn’t do anything.

Plus it also implies I’d have to rebuild every time I switch kernels?

How do I rebuild the vbox drivers? I installed that (6.1) via the oracle repo.

Mike_Rochefort
Posts: 159
Joined: 2016/03/16 02:34:19

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by Mike_Rochefort » 2020/01/11 03:36:06

I can't speak to VBox setups as I don't use it. Hopefully I can help with the NVIDIA driver setup.

When installing the NVIDIA driver through the .run file, you'll need a few things first. The big primary one is dkms, which is available in the EPEL repository. I would also recommend installing the libglvnd-* packages, otherwise the NVIDIA installer will utilize its own rather than pulling from a repo, which will later get overwritten when you install libglvnd through some other dependency.

RHEL (and CentOS by extension) follow a kernel ABI for its modules, as designated by the kernel-4.18.0-<ABI-version> naming. This means that if you compile a module against 4.18.0-80, then it will work with all 80.xyz kernels that get released. It will not, however, work with the -147 kernel found in RHEL 8.1 thus requiring a rebuild which is where dkms will come in.

An alternative option to this is using the ELRepo, negativo17, or RPM Fusion (non-free) repositories (personally I use ELRepo, have been since EL7). The teams on these repos build kmods (akmod is available in RPM Fusion) that have a kernel module prebuilt for a particular kernel ABI using the tools native to that release so that you don't have to worry about dkms or other packaging. Compatible packages are denoted by the extension 8_0 and 8_1 for the release they are ABI compatible with. These packages will also go through the necessary steps of disabling and blacklisting the nouveau driver for you as well, so you don't have to worry about that part.

ELRepo currently has the NVIDIA driver (440.36) available for both 8.0 and 8.1 available in the elrepo-testing repository. These are not compatible with the CentOS Stream kernel, only the released kernel ABIs they are built against.
http://elrepo.reloumirrors.net/testing/el8/x86_64/RPMS/

You can also just take the spec file from the SRPMs and adjust it if you need/want a different driver version for your desired kernel version that isn't offered by the repos.

The CentOS Stream repository currently has 4.18.0-147.3.1 (which is the current latest RHEL 8.1 kernel at the time of writing) which will work with repository NVIDIA packages that support 8.1. The latest stream kernel is 4.18.0-151 which will not. I would follow Trevor's advice and use the CR repo, as that will provide you the base 8.1 system and not anything newer for compatibility reasons.

http://mirror.centos.org/centos/8-strea ... /Packages/

Everything above is to the best of my understanding and experience, so if any of it is wrong or misinterpreted I expect Trevor or someone more experienced will correct me :) If you have already done a .run installation and registered the driver with dkms, I recommend deregistering it as stated in the NVIDIA driver documentation:

https://download.nvidia.com/XFree86/Lin ... gTheNda02d

Cheers,
Mike
Last edited by Mike_Rochefort on 2020/01/11 03:48:43, edited 1 time in total.

spacemanx
Posts: 8
Joined: 2020/01/10 20:57:33

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by spacemanx » 2020/01/11 03:47:40

Mike_Rochefort wrote:
2020/01/11 03:36:06
I can't speak to VBox setups as I don't use it. Hopefully I can help with the NVIDIA driver setup.

When installing the NVIDIA driver through the .run file, you'll need a few things first. The big primary one is dkms, which is available in the EPEL repository. I would also recommend installing the libglvnd-* packages, otherwise the NVIDIA installer will utilize its own rather than pulling from a repo, which will later get overwritten when you install libglvnd through some other dependency.

RHEL (and CentOS by extension) follow a kernel ABI for it's modules, as designated by the kernel-4.18.0-<ABI-version> naming. This means that if you compile a module against 4.18.0-80, then it will work with all 80.xyz kernels that get released. It will not, however, work with the -147 kernel found in RHEL 8.1 thus requiring a rebuild which is where dkms will come.
Thanks, yes. I have the nvidia driver working with 4,18.0-80. I suspect I got the libglvnd packages when I installed cuda. I noticed the driver (from nvidia 440-40 I think) didn’t work out of the box.

My concern is that when I re-ran the nvidia installer to try and get it loaded into 1-147 module directory the installer complained that I already had a driver installed which it would remove. So that suggested, at least to me, that it might also remove it from the 0-80 locations. That being said, I’m pretty sure the driver was in (not at my machine now) /usr/src/linux/kernels/nvidia/440-40 which is outside any specific kernel (0-80 or 1-147) module directory.

Also, when I went to reinstall cuda for 1-147 dnf told me it was already installed. That makes some sense as I installed it for 0-80. But it confuses me in terms of how I’m going to get 1-147 to find and load modules.

Mike_Rochefort
Posts: 159
Joined: 2016/03/16 02:34:19

Re: How to run a Centos Stream kernel on a Centos 8 distro?

Post by Mike_Rochefort » 2020/01/11 04:03:50

Can you report the results of following? I don't know the prexisting steps you've taken so far.

Code: Select all

# as root
$ systemctl set-default multi-user.target && reboot # make sure you boot into the 147 kernel
$ dnf install epel-release
$ dnf install kernel-devel-$(uname -r) kernel-headers-$(uname -r) gcc libglvnd libglvnd-egl libglvnd-glx libglvnd-gles libglvnd-opengl dkms binutils make libvdpau libva-vdpau-driver ncurses
$ ./NVIDIA-Linux-x86_64-440.44.run --dkms
If you need the 32-bit libs, you'll need the i686 versions of the libraries [and maybe gcc(?)] mentioned above.

You can optionally use systemctl isolate multi-user.target, I just prefer doing a reboot for a clean environment. You need to be in a state with no Xorg server running when doing nvidia driver changes. These are incomplete steps, as they don't cover blacklisting the nouveau driver and getting back to a graphical shell.

Code: Select all

$ grubby --update-kernel=ALL --args="nouveau.modeset=0 rd.driver.blacklist=nouveau plymouth.ignore-udev" 
$ echo "blacklist nouveau" > /usr/lib/modprobe.d/blacklist-nouveau.conf
$ dracut -f /boot/initramfs-$(uname -r).img $(uname -r)
$ systemctl set-default graphical.target
$ reboot
Cheers,
Mike

Post Reply

Return to “CentOS 8 - General Support”