You are not logged in.

#1 2017-09-15 14:34:19

sitwano
Member
Registered: 2017-07-07
Posts: 83

cannot load vboxdrv for custom compiled kernel due to missing headers

I'm trying to run virtualbox. I can't load vboxdrv because I get following error:

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/4.9.48-lts_custom

So now I try to do this

sudo dkms autoinstall -k 4.9.48-lts_custom

but I get the error:

Error! echo
Your kernel headers for kernel 4.9.48-lts_custom cannot be found at
/usr/lib/modules/4.9.48-lts_custom/build or /usr/lib/modules/4.9.48-lts_custom/source.

I could swear I installed the kernel headers from the source by running #make headers_install. Not sure what to do now. Help is appreciated as always!

Offline

#2 2017-09-15 16:31:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,740

Re: cannot load vboxdrv for custom compiled kernel due to missing headers

A quick and nasty solution might be to just copy that file from the standard lts kernel's modules directory.  Not the ideal solution; but I assume that the lts_custom kernel was not installed by pacman in the first place.  That could well be a bad assumption though.

Edit:  And I shall catch a pile of negative feedback for suggesting such a hack.  Meh.

Last edited by ewaller (2017-09-15 16:32:45)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2017-09-15 17:00:35

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

Re: cannot load vboxdrv for custom compiled kernel due to missing headers

The other quick and nasty solution is to go back and double-check that the headers are installed, by installing them anyway. tongue

The "right" way to do this would be to use a PKGBUILD to compile the kernel, using e.g. [core]/linux-lts as a template. And then making sure that linux-lts_custom-headers is one of your installed packages.


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

Offline

#4 2017-09-16 05:50:04

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: cannot load vboxdrv for custom compiled kernel due to missing headers

The linux traditional build wiki page does not mention anything about installing headers. The question is how do I install the headers such that dkms picks them up at /usr/lib/modules/4.9.48-lts_custom/build or /usr/lib/modules/4.9.48-lts_custom/source.

@ewaller : I mentioned that I compiled my custom kernel due to the patches I had to apply.

Last edited by sitwano (2017-09-16 05:50:53)

Offline

#5 2017-09-16 11:54:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,449
Website

Re: cannot load vboxdrv for custom compiled kernel due to missing headers

sitwano wrote:

The question is how do I install the headers...

With pacman -U, the same way you installed the kernel you built if you followed this advice:

Eschwartz wrote:

The "right" way to do this would be to use a PKGBUILD to compile the kernel, using e.g. [core]/linux-lts as a template.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-09-16 19:44:49

ooo
Member
Registered: 2013-04-10
Posts: 1,637

Re: cannot load vboxdrv for custom compiled kernel due to missing headers

'make headers_install' should install the headers. Did you follow Eschwartz's advice of trying to reinstall them?

Personally, I've never specifically installed the headers while compiling kernel the "traditional way". I keep the kernel sources in /usr/src, and I believe running 'make modules_install' creates symlinks to your kernel sources in /lib/modules, allowing dkms to work.

Offline

Board footer

Powered by FluxBB