You are not logged in.

#1 2016-11-24 01:41:51

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Compiling Kernels and What is Required

I was looking to compile a custom kernel so that I can have support for user namespaces for LXC.  I'm a bit confused at what will then be required once I have compiled a custom kernel. Since it is my own custom kernel, what will I do about kernel modules and drivers? For example, when you decide to use the linux-lts kernel with nvidia, you have to use the nvidia-lts driver.

I am using ZFS with the archzfs repository, will I no longer be able to use this custom Repository since they are compiling packages specifically for the linux kernel?

Offline

#2 2016-11-24 04:18:06

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Compiling Kernels and What is Required

Yes, modules must be compiled against the different kernel.

Just look at the PKGBUILD for their nvidia package (or indeed the several nvidia packages in the repos and the AUR) to see how they work, then tweak it to use your custom kernel's build directory.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2016-11-24 20:39:43

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Re: Compiling Kernels and What is Required

Cool, thanks.

Offline

#4 2016-11-26 14:22:20

jjb2016
Member
From: Oxfordshire
Registered: 2016-02-29
Posts: 73

Re: Compiling Kernels and What is Required

I have done this just a couple of days ago actually.  After installing my custom kernel (with user namespace enabled, and a few other tweaks) I rebooted the machine and found that my xserver and desktop wouldn't start up.  After checking out journalctl I found that it was because my nvidia driver had to be recompiled for the new kernel.  The easiest way to do this is to remove the "nvidia" package and install the "nvidia-dkms" package which will automatically recompile every time the linux-headers package is updated/reinstalled.   See this ... https://wiki.archlinux.org/index.php/NV … tom_kernel

In my case after I installed the nvidia-dkms package I had to reinstall my custom linux headers package to trigger the rebuild of the nvidia driver.

Hope this helps!

Last edited by jjb2016 (2016-11-27 10:37:48)

Offline

#5 2016-11-26 22:53:15

STREBLO
Member
Registered: 2015-02-15
Posts: 135

Re: Compiling Kernels and What is Required

Thanks, that helps. Basically if I want to use a custom kernel my best bet would be to use dkms for everything? So if I'm running ZFS, Nvidia, Virtual box, and anything with modules I'm going to either have to find a custom package, set up a custom package, or use dkms?

Offline

#6 2016-11-27 00:09:50

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Compiling Kernels and What is Required

dkms would make sense, since you have to compile it yourself anyway. So yeah. smile


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2016-11-27 10:44:12

jjb2016
Member
From: Oxfordshire
Registered: 2016-02-29
Posts: 73

Re: Compiling Kernels and What is Required

Yep - for nvidia and virtualbox there appears to be a dkms package in the official repos but for zfs there is one in AUR https://aur.archlinux.org/packages/zfs-dkms/

Offline

Board footer

Powered by FluxBB