MyTetra Share
Делитесь знаниями!
Using the alternative installer (
Время создания: 25.04.2013 17:53
Раздел: root - VirtualBox
Запись: Yurons/mytetra/master/base/1366901583mtgsrpaj6j/text.html на

Using the alternative installer (

The alternative installer performs the following steps:

  • It unpacks the application files to the target directory,


which cannot be changed.

  • It builds the VirtualBox kernel modules (vboxdrv, vboxnetflt and vboxnetadp) and installs them.
  • It creates /etc/init.d/vboxdrv, an init script to start the VirtualBox kernel module.
  • It creates a new system group called vboxusers.
  • It creates symbolic links in /usr/bin to the a shell script (/opt/VirtualBox/VBox) which does some sanity checks and dispatches to the actual executables, VirtualBox, VBoxSDL, VBoxVRDP, VBoxHeadless and VBoxManage
  • It creates /etc/udev/rules.d/10-vboxdrv.rules, a description file for udev, if that is present, which makes the USB devices accessible to all users in the vboxusers group.
  • It writes the installation directory to /etc/vbox/vbox.cfg.

The installer must be executed as root with either install or uninstall as the first parameter.

sudo ./ install

Or if you do not have the "sudo" command available, run the following as root instead:

./ install

After that you need to put every user which should be able to access USB devices from VirtualBox guests in the group vboxusers, either through the GUI user management tools or by running the following command as root:

sudo usermod -a -G vboxusers username


The usermod command of some older Linux distributions does not support the -a option (which adds the user to the given group without affecting membership of other groups). In this case, find out the current group memberships with the groups command and add all these groups in a comma-separated list to the command line after the -G option, e.g. like this: usermod -G group1,group2,vboxusers username.

Performing a manual installation

If, for any reason, you cannot use the shell script installer described previously, you can also perform a manual installation. Invoke the installer like this:

./ --keep --noexec

This will unpack all the files needed for installation in the directory install under the current directory. The VirtualBox application files are contained in VirtualBox.tar.bz2 which you can unpack to any directory on your system. For example:

sudo mkdir /opt/VirtualBox

sudo tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox

or as root:

mkdir /opt/VirtualBox

tar jxf ./install/VirtualBox.tar.bz2 -C /opt/VirtualBox

The sources for VirtualBox's kernel module are provided in the src directory. To build the module, change to the directory and issue


If everything builds correctly, issue the following command to install the module to the appropriate module directory:

sudo make install

In case you do not have sudo, switch the user account to root and perform

make install

The VirtualBox kernel module needs a device node to operate. The above make command will tell you how to create the device node, depending on your Linux system. The procedure is slightly different for a classical Linux setup with a /dev directory, a system with the now deprecated devfs and a modern Linux system with udev.

On certain Linux distributions, you might experience difficulties building the module. You will have to analyze the error messages from the build system to diagnose the cause of the problems. In general, make sure that the correct Linux kernel sources are used for the build process.

Note that the /dev/vboxdrv kernel module device node must be owned by root:root and must be read/writable only for the user.

Next, you will have to install the system initialization script for the kernel module:

cp /opt/VirtualBox/ /etc/init.d/vboxdrv

(assuming you installed VirtualBox to the /opt/VirtualBox directory) and activate the initialization script using the right method for your distribution. You should create VirtualBox's configuration file:

mkdir /etc/vbox

echo INSTALL_DIR=/opt/VirtualBox > /etc/vbox/vbox.cfg

and, for convenience, create the following symbolic links:

ln -sf /opt/VirtualBox/ /usr/bin/VirtualBox

ln -sf /opt/VirtualBox/ /usr/bin/VBoxManage

ln -sf /opt/VirtualBox/ /usr/bin/VBoxHeadless

ln -sf /opt/VirtualBox/ /usr/bin/VBoxSDL

MyTetra Share v.0.64
Яндекс индекс цитирования