VirtualBox kernel module - permanent modprobe installation

Q I am a complete beginner with Linux. I have installed Debian Sarge on my HP 6720s laptop because I hated Vista. I have then added VirtualBox and put Windows XP on it. I managed to get it working, but every time I restart VirtualBox and XP it fails with this message:

as root enter modprobe vboxdrv

If I do this, VirtualBox works, but I'd like to permanently install the modprobe instruction so that VirtualBox will just work.

I have tried entering the instruction in etc/init.rc local and rebooting, but VirtualBox failed as usual. Can you explain, please, how I can install the modprobe command so that it works automatically after I boot up?

A Debian Sarge (3.1) is over four years old and is no longer supported by the developers. That means that fixes for bugs and security vulnerabilities in current software are not applied to Sarge packages, leaving your computer at risk. The latest Debian release is Lenny (5.0), which is a much safer option. Upgrading from such an old release in one step is likely to cause problems, so a re-installation with Lenny is the best starting point.

The correct file for running programs at startup or shutdown is /etc/init.d/rc.local - add the command to either the start or stop section, or both, depending on when you want it to run. But this is not the correct way to load modules, which have their own system. The file /etc/modules contains a list of modules to be loaded at boot time. If you add vboxdrv on a line on its own it will force the module to be loaded, which loads it much sooner in the boot sequence. However, rc.local is run last, which could explain why loading from it isn't working. If you need to add options when loading a module, create a file in /etc/modprobe.d, named after the module for convenience, and add something like this:

options vboxdrv force_async_tsc=1

The modinfo command followed by the module name, run as root, shows the full list of options for any module.

Follow us on or Twitter

Username:   Password:
Create Account | About TuxRadar