Windows 10VM , GPU Passthrough -> PCI Header Error Nr .127

Ok so it downloads and patches the kernel but you need to run two commands and it should compile for you https://github.com/AcidzDevelopment/CentOS-header127/tree/master

make localconfig
make rpm-pkg

1 Like

Let me know if you have any issues with it

Great, looks like it complies successfully. So I take it that it has to be the 5.3.1 kernel.

Now that I have it though, can you please tell me where would i run these commands and get it so I can boot from it?

patching file drivers/pci/pci.c
Hunk #2 succeeded at 1412 (offset 30 lines).
Hunk #3 succeeded at 4657 (offset 26 lines).
Hunk #4 succeeded at 4672 (offset 26 lines).
[user0@localhost CentOS-header127-master]$

If you wish to change the kernel version, replace the url in the script with the kernel you want to use. the script will leave you in the download directory. just run the commands there

You might get this error

make[2]: *** [Makefile:1083: certs] Error 2

Open the .config file with nano
Ctrl+W
CONFIG_SYSTEM_TRUSTED
and comment these 3 options

CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"

save and exit

make localmodconfig
make rpm-pkg

Getting the following:

[user0@localhost Downloads]$ make localconfig make: *** No rule to make target 'localconfig'. Stop.

Does it matter that I am on Fedora 30 right now? Don’t mean to keep jumping, was trying different things to see what would work.

try make localmodconfig

Same error.

[user0@localhost Downloads]$ make localmodconfig make: *** No rule to make target 'localmodconfig'. Stop.

I guess needs to be CentOS.

Alright leave this with me and ill see if i can get you a patched fedora kernel

Thank you very much. I’ll keep this with Fedora 30 without modification.

I could also try CentOS since this is a new build and I’m trying stuff. Should I go for it and use CentOS 7 or CentOS 8?

I was using CentOS 8 for the testing, but shouldn’t be too hard to get a patched kernel. How come you aren’t going for something like Ubuntu for passthrough

Not sure. I am switching over from Windows and fell into RPM Distros so I am more comfortable with the package mangers. I was planning to use this for plex, vms, some gaming and ZFS but not sure if the distro makes a difference for the ZFS part. That said, I was able to setup passthrough on Debian 9 but that is on an Intel platform and I can’t really start pocking at that one too much because that is my main system for now. I am running Windows on it for the most part and trying to switch over but the road has been a bit tough because I would like to do the mentioned pass-through plus I am looking for a PDF solution where I would be able to do OCR as easy as Adobe Acrobat.

(post withdrawn by author, will be automatically deleted in 36 hours unless flagged)

Tried this on a fresh CentOS 8 install on another machine.

[user0@localhost linux-5.3.1]$ make localconfig

make[1]: *** No rule to make target ‘localconfig’. Stop.
make: *** [Makefile:562: localconfig] Error 2

Then commented out the lines.

Running make localmodconfig produced a bunch of questions that I just “ENTERED” through.

running make rpm-pkg from /home/user0/Downloads/linux-5.3.1
eventually produced 3 rpms in /home/user0/rpmbuild/RPMS/x86_64.

Is it now a matter of installing all 3?

[user0@localhost x86_64]$ pwd

/home/user0/rpmbuild/RPMS/x86_64

[user0@localhost x86_64]$ ll

total 422424
-rw-rw-r–. 1 user0 user0 282242844 Sep 30 08:56 kernel-5.3.1-1.x86_64.rpm
-rw-rw-r–. 1 user0 user0 149023924 Sep 30 08:57 kernel-devel-5.3.1-1.x86_64.rpm
-rw-rw-r–. 1 user0 user0 1291792 Sep 30 08:56 kernel-headers-5.3.1-1.x86_64.rpm

install all 3 and update grub then reboot and see if its fixed

Installing kernel-5.3.1-1.x86_64.rpm and kernel-devel-5.3.1-1.x86_64.rpm succeeded but kernel-headers-5.3.1-1.x86_64.rpm failed with error: Failed dependencies: kernel-headers is obsoleted by kernel-headers-5.3.1-1.x86_64, so I am not sure what that means; is it because it is already installed?

Regardless, I updated grub and now am able to boot into 5.3.1 so have to try it on my other system that has dual GPUs.

Question, is there a way to see that the patch made in?

No idea

Gotcha, thanks a lot! I will try this when I get to my other system. However, does this mean that this sort of process will need to be followed for every kernel update?

Well yes, if you want to update the kernel you will need to download and recompile the kernel, this patch is not in the kernel

Edit: 10/13/2019

Hi @AcidzDesigns,

I think I figured out the kernel compilation part somewhat. Would you happen to know how to get a particular fedora kernel version? For example, I am current running 5.2.18-200.fc30.x86_64 which came in after dnf update. Would you happen to know how I can get that particular version?

=============================
OK, so I think I’m getting the hang of compiling the kernel. Currently trying to compile the Fedora 30 kernel using fedpkg local.

I have 2 directories that keep growing in size. This is running in a vm with 1 core and it is taking hours and now the compilation failed because it ran out of space. I started with 24K and I had nothing else running. Does any one know why the directory sizes get so big?

started with

[user0@f30vm1 ~]$ du -hs ~

24K /home/user0

ended with

[user0@f30vm1 ~]$ du -hs kernel_builds/

21G kernel_builds/

[user0@f30vm1 ~]$ du -hs rpmbuild/

11G rpmbuild/