Advanced Tutorial: compile and install the Virtualbox driver module

Source: Internet
Author: User
Article title: master advanced: compile and install the Virtualbox driver module. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open-source, and other basic categories. install virtualbox in Debian
 
1. check whether the required software package exists in the source.
 
# Apt-cache search virtualbox
 
From the output result, we can see that there is a required software package in the source. now we can use apt to install it.
 
2. install VirtualBox
 
# Apt-get install virtualbox-ose
 
After successful installation, we are stealing the convenience of Debian apt software installation. starting virtualbox, we find that the corresponding module driver is not installed and cannot be started properly. Check that the source does not have a driver module that matches your kernel version. it seems that you have to compile and install the driver on your own.
 
We can use the m-a tool to compile and install the module driver. if our system does not install this tool, we need to install the corresponding tool software first:
 
# Apt-get install module-assistant
 
Prepare necessary conditions for module compilation:
 
# M-a prepare
 
Now we can install the virtualbox driver module:
 
3. obtain the source code of the corresponding module.
 
# M-a get virtualbox-ose-source
 
This will download the corresponding source code file to the/usr/src directory, and the module compilation is completed in this directory.
 
4. compilation module
 
# M-a build virtualbox-ose-modules
 
After the command is executed, we will see the compiled deb module package.
 
5. install the generated deb package
 
# Dpgk-I dpkg-I virtualbox-ose-modules-2.6.23.071016_1.5.4-dfsg-1 + 2.6.23.071016-10.00.Custom _ i386.deb
 
Of course, we can also use the following command to automatically install the required driver module, instead of three steps to get build install:
 
# M-a-I virtualbox-ose-modules
 
6. load the driver module
 
# Modprobe vboxdrv
 
If no error is returned, the operation is successful. Start Virtualbox again. haha, it's up ~~
 
To automatically load modules, we can add vboxdrv to the/etc/modules file. this will load the required modules in the system.
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.