VirtualBox

Opened 14 years ago

Last modified 7 years ago

#7536 closed defect

kernel driver not installed — at Version 16

Reported by: matteo sisti sette Owned by:
Component: host support Version: VirtualBox 3.2.8
Keywords: vboxdrv, kernel module, recompile Cc:
Guest type: Windows Host type: Linux

Description (last modified by Michael Thayer)

Every once in a while (I suppose every time the kernel gets updated thruough ubuntu's automatic update manager), after I reboot my ubuntu host and try to open Virtual Box and start one of my virtual machines, I get the following error:

""" The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/etc/init.d/vboxdrv setup'

as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary. """

Then I run the abovementioned command and everything gets fixed, but it is ridiculous that I have to do so every time. Would you imagine if EVERY application I use required the same??

Needless to say, I HAVE dkms installed but this happens allthesame.

Change History (17)

comment:1 by Technologov, 14 years ago

Unfortunately the problem is that Linux breaks backward compatibility on every upgrade. So point this problem to Linus Torvalds. I had a discussion with Creg-Hartman, one of Linus' Captains from Novell SUSE Linux on this topic but we are completely disagree with each other. This problem affects *all* the Linux distros.

And you have to do that only to EVERY application that had drivers/kernel modules (very few have). This obviously includes NVIDIA drivers as well.

-Technologov

comment:2 by matteo sisti sette, 14 years ago

Ok, I see.

Then what does the second part of the error message mean?

"Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary"

If the dkms package does not recompile the kernel module when necessary, then that part should be suppressed.

By the way I never recompiled any nvidia drivers and never got any error message related to nvidia... but maybe an nvidia driver package update is included and hence automatically downloaded every time a new version of the kernel is?

comment:3 by Technologov, 14 years ago

I am not sure how DKMS works. But it is a good question.

comment:4 by Michael Thayer, 14 years ago

It definitely works here (Ubuntu 64bit host, recently upgraded to Maverick) and DKMS should do this by design. Perhaps there is a problem with the way DKMS is set up on your system? Or perhaps DKMS is not being used on your system for some reason? Could you take a look in (and attach) the log file from the module build (/var/log/vbox-install.log)?

by matteo sisti sette, 14 years ago

Attachment: vbox-install.log added

comment:5 by matteo sisti sette, 14 years ago

attached

comment:6 by matteo sisti sette, 14 years ago

there are indeed a lot of error messages somewhat related to dkms, but I have no idea what exactly is wrong

comment:7 by Michael Thayer, 14 years ago

My feeling here is that dkms has got slightly confused due to older versions of modules which got left on your system and that this is keeping it from working correctly. Perhaps you could file a bug for this with Ubuntu? The maintainer of the Ubuntu dkms package is also the upstream maintainer, so he should have a pretty good idea of whether this is working correctly or not. If you write the link to the Ubuntu bug on this bug tracker we will be able to follow the ticket too and possibly resolve this together.

comment:8 by Frank Mehnert, 14 years ago

Still relevant with VBox 3.2.10?

comment:9 by matteo sisti sette, 14 years ago

I don't know. I'll have to wait untill a new version of the kernel gets released and the kernel gets automatically updated

comment:10 by Frank Mehnert, 13 years ago

Resolution: worksforme
Status: newclosed

comment:11 by matteo sisti sette, 12 years ago

Resolution: worksforme
Status: closedreopened

This is still an issue at least with VB 4.0.12

Here's the output when I run vboxdrv setup:

$ sudo /etc/init.d/vboxdrv setup
sudo: /etc/sudoers.d/puredata is mode 0644, should be 0440
[sudo] password for teo: 
WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release.
 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                              Error! Could not locate dkms.conf file.
File:  does not exist.
Error! Could not locate dkms.conf file.
File:  does not exist.
Error! Could not locate dkms.conf file.
File:  does not exist.
                                                                         [ OK ]
 * Trying to register the VirtualBox kernel modules using DKMS           [ OK ] 
 * Starting VirtualBox kernel modules                                    [ OK ]

comment:12 by Frank Mehnert, 12 years ago

Your DKMS config is somehow screwed up. What Linux distribution is that?

comment:13 by matteo sisti sette, 12 years ago

Hey for some reason I didn't get a notification for the reply...

This is Ubuntu 11.10

The kernel got updated again and I got the issue again. Here's the output from vboxdrv setup again:

$ sudo /etc/init.d/vboxdrv setup
[sudo] password for teo: 
WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release.
 * Stopping VirtualBox kernel modules                                    [ OK ] 
 * Uninstalling old VirtualBox DKMS kernel modules                              Error! Could not locate dkms.conf file.
File:  does not exist.
Error! Could not locate dkms.conf file.
File:  does not exist.
Error! Could not locate dkms.conf file.
File:  does not exist.
                                                                         [ OK ]
 * Trying to register the VirtualBox kernel modules using DKMS           [ OK ] 
 * Starting VirtualBox kernel modules                                    [ OK ]

comment:14 by Christian2111, 12 years ago

Your problems are probably based on directories that old versions of virtualbox have left behind in the directory /var/lib/dkms/vboxhost. Delete all sub-directories of old virtualbox versions from this directory.

Also see:

https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/830915 http://8thstring.blogspot.com/2012/01/error-could-not-locate-dkmsconf-file.html

comment:15 by Andrew Schulman, 9 years ago

This problem has existed for years, and still does with Virtualbox 4.3.20 and the latest kernels (currently 3.13.0.40.47 in Ubuntu). At each kernel update, the infamous error message

Error! Could not locate dkms.conf file.
File:  does not exist.

appears, and the vbox kernel drivers (vboxhost, etc.) don't get rebuilt. After reboot, you have to run /etc/init.d/vboxhost setup or dpkg-reconfigure virtualbox-4.3 to rebuild them, before you can run any virtual guests, as the OP reported.

The standard advice is to remove old directories in /var/lib/dkms/vboxhost, and try again. Or uninstall dkms, remove /var/lib/dkms, reinstall dkms, and try again, which amounts to the same thing. I've done that many times, and each time the problem has come back on the next kernel update. It just happened again with the versions I cited above.

I haven't tried to do any debugging of the vbox install scripts, but to me, the error

File:  does not exist.

plainly shows that a parameter that's supposed to hold the name of the vbox dkms.conf file is unexpectedly empty, and so of course the file isn't found or processed.

If you can suggest some debugging steps, I'll be glad to perform them on the next kernel update.

Thanks for your attention to this old bug. It's only a nuisance bug, but it's been a nuisance for a long time.

comment:16 by Michael Thayer, 9 years ago

Description: modified (diff)

A bit of research shows that this happens with other dkms drivers too (not just the VirtualBox ones). If you have any experience with debugging shell scripts (running them using "sh -x <script name> <parameters...>" or "bash -x ..." is usually my approach) you could try debugging the /usr/bin/dkms script. The functionality we use is:

# /usr/bin/dkms remove -m $MODULE -v $VERSION --all
# /usr/bin/dkms add -m $MODULE -v $VERSION
# /usr/bin/dkms build -m $MODULE -v $VERSION
# /usr/bin/dkms install -m $MODULE -v $VERSION --force

For reference, the error message you are seeing is the following lines of /usr/bin/dkms:

    [[ -r $read_conf_file ]] || die 4 $"Could not locate dkms.conf file." \
	$"File: $conf does not exist."

Noting that the wrong variable is used in the second line, which rather makes sure that you will not find out the file name.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use