You are not logged in.

#1 2014-07-21 11:38:23

eoinoc333
Member
Registered: 2013-06-06
Posts: 34

[SOLVED] VirtualBox module not loading after upgrade (DKMS related)

Hello,

I upgraded my system, and linux itself upgraded 3.14.6-1 -> 3.15.5-2.

After rebooting, VirtualBox is no longer loading the vboxdrv module.

Where did I go wrong, and what would you next try if you were in my shoes?

Here's the current system status:

➜  ~  sudo systemctl --failed                
  UNIT                         LOAD   ACTIVE SUB    DESCRIPTION
●systemd-modules-load.service loaded failed failed Load Kernel Modules
➜  ~  sudo systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
   Active: failed (Result: exit-code) since Mon 2014-07-21 11:57:23 IST; 34min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
 Main PID: 162 (code=exited, status=1/FAILURE)

systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Load Kernel Modules.
systemd[1]: Unit systemd-modules-load.service entered failed state.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
$ sudo journalctl --thisboot
...
systemd-journal[166]: Journal started
systemd-modules-load[162]: Failed to find module 'vboxdrv'
systemd-modules-load[162]: Failed to find module 'vboxnetadp'
systemd-modules-load[162]: Failed to find module 'vboxnetflt'
systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Load Kernel Modules.
systemd[1]: Unit systemd-modules-load.service entered failed state.
...
➜  ~  sudo systemctl status dkms.service 
● dkms.service - Dynamic Kernel Modules System
   Loaded: loaded (/usr/lib/systemd/system/dkms.service; enabled)
   Active: active (exited) since Mon 2014-07-21 12:15:32 IST; 7s ago
  Process: 2200 ExecStop=/usr/lib/systemd/scripts/dkms stop (code=exited, status=0/SUCCESS)
  Process: 2204 ExecStart=/usr/lib/systemd/scripts/dkms start (code=exited, status=0/SUCCESS)
 Main PID: 2204 (code=exited, status=0/SUCCESS)

dkms[2204]: Error! echo
dkms[2204]: Your kernel headers for kernel 3.15.5-2-ARCH cannot be found at
dkms[2204]: /usr/lib/modules/3.15.5-2-ARCH/build or /usr/lib/modules/3.15.5-2-ARCH/source.

Before rebooting when the upgrade had finished, the pacman upgrade process told me:

[ALPM-SCRIPTLET] Creating symlink /var/lib/dkms/vboxhost/4.3.14/source ->
[ALPM-SCRIPTLET]                  /usr/src/vboxhost-4.3.14
[ALPM-SCRIPTLET] 
[ALPM-SCRIPTLET] DKMS: add completed.
[ALPM-SCRIPTLET] ==> To build and install your modules run: dkms install vboxhost/4.3.14
[ALPM-SCRIPTLET] ==> To do this automatically at startup run: systemctl enable dkms.service

The DKMS service was already enabled.

This may be my downfall: when the upgrade process had finished, and before rebooting, I ran the following (thinking it would ensure everything was installed as needed):

➜  ~  sudo dkms install vboxhost/4.3.14
Error! echo
Your kernel headers for kernel 3.14.6-1-ARCH cannot be found at
/usr/lib/modules/3.14.6-1-ARCH/build or /usr/lib/modules/3.14.6-1-ARCH/source.

After rebooting, it's the same message and it refers to the new kernel version:

➜  ~  sudo dkms install vboxhost/4.3.14
Error! echo
Your kernel headers for kernel 3.15.5-2-ARCH cannot be found at
/usr/lib/modules/3.15.5-2-ARCH/build or /usr/lib/modules/3.15.5-2-ARCH/source.
➜  ~  ls /usr/lib/modules/3.15.5-2-ARCH/build
vmlinux
➜  ~  ls /usr/lib/modules/3.15.5-2-ARCH/source 
ls: cannot access /usr/lib/modules/3.15.5-2-ARCH/source: No such file or directory

I don't have a custom kernel installed, and I don't have linux-headers installed.

Last edited by eoinoc333 (2014-07-21 12:06:26)

Offline

#2 2014-07-21 12:00:16

sugartest
Member
Registered: 2014-07-09
Posts: 38

Re: [SOLVED] VirtualBox module not loading after upgrade (DKMS related)

Hi,

eoinoc333 wrote:

After rebooting, it's the same message and it refers to the new kernel version:

➜  ~  sudo dkms install vboxhost/4.3.14
Error! echo
Your kernel headers for kernel 3.15.5-2-ARCH cannot be found at
/usr/lib/modules/3.15.5-2-ARCH/build or /usr/lib/modules/3.15.5-2-ARCH/source.

I guess you should try installing the kernel headers as some of the trouble you've got might be coming from there. I had the same problem on a pretty fresh install a year or two and just did install it and re-compiled VirtualBox's modules.

On the other hand, this might not be a really satisfying answer and you could be interrested in that.


An Arch Linux enthousiast and a Linux fan in general, mostly interrested in command line use, security issues, code learning and networks.

Offline

#3 2014-07-21 12:05:59

eoinoc333
Member
Registered: 2013-06-06
Posts: 34

Re: [SOLVED] VirtualBox module not loading after upgrade (DKMS related)

Thanks sugartest.

This did fix my problem:

➜  ~  sudo pacman -S linux-headers
➜  ~  sudo dkms install vboxhost/4.3.14

Not sure why it all went wrong, it might have been my call to "dkms install" when the dkms service was already also enabled.

Offline

#4 2014-07-21 12:40:34

sugartest
Member
Registered: 2014-07-09
Posts: 38

Re: [SOLVED] VirtualBox module not loading after upgrade (DKMS related)

Happy to help! big_smile

I don't think the call to the already loaded DKMS systemd module caused it, but actually the call to the linux-headers which contains some (all?) requirements to build out-of-kernel modules which could explain the command fail.

Last edited by sugartest (2014-07-21 13:02:02)


An Arch Linux enthousiast and a Linux fan in general, mostly interrested in command line use, security issues, code learning and networks.

Offline

#5 2014-07-21 13:11:53

eoinoc333
Member
Registered: 2013-06-06
Posts: 34

Re: [SOLVED] VirtualBox module not loading after upgrade (DKMS related)

Since I have a standard installation, as far as I can tell, should I conclude that installing linux-headers should be a requirement of installing Virtualbox on Arch?

The wiki mentions it in the case of you having a custom kernel.

Offline

#6 2014-07-21 13:26:40

sugartest
Member
Registered: 2014-07-09
Posts: 38

Re: [SOLVED] VirtualBox module not loading after upgrade (DKMS related)

I guess it should but it might only be needed at kernel updates which doesn't change the answer for arch users since kernel updates are pretty frequent.
If it reassures you I don't have a custom kernel wink.

But the fact is that I don't know what caused me to have to re-build the modules. Only thing I know is that I fixed it that way, but I can't remember building the VBox's modules on VirtualBox's install in the first place. To  me these were installed automatically and worked fine until "mystery happened" and made me re-install. That might, on the other hand, be why linux-headers isn't considered a requirement at virtualbox install.

Another explanation would be wer're both missing something x), in that case, maybe a wiser man will come across and will make us learn a few things smile

EDIT: What I finally conclude is that linux-headers isn't required in the first place because DKMS modules are pre-compiled in the package wink

Last edited by sugartest (2014-07-21 13:55:41)


An Arch Linux enthousiast and a Linux fan in general, mostly interrested in command line use, security issues, code learning and networks.

Offline

#7 2014-07-21 14:33:44

eoinoc333
Member
Registered: 2013-06-06
Posts: 34

Re: [SOLVED] VirtualBox module not loading after upgrade (DKMS related)

sugartest wrote:

Another explanation would be wer're both missing something x), in that case, maybe a wiser man will come across and will make us learn a few things smile

I'll speak for myself: that's certainly possible!

Offline

Board footer

Powered by FluxBB