Experience in installing virtualbox Virtual Machine in kali linux
Many kali enthusiasts want to use kali linux as a system, but some programs in Windows sometimes need to use it, and virtual machines are required at this time.
The kali system will also encounter a lot of pitfalls when installing virtual machines, followed by my crawling process.
A single wave of twists and turns.
Environment: kali linux 2.0 32-bit
Software: virtualbox Virtual Machine
0x01 bash:/etc/init. d/vboxdrv: No file or directory
One of the most common problems after virtualbox is installed is the kernel problem.
Most people on the Internet are prompted to execute the following command. However, the various methods on the Internet cannot be solved at one time.
Error Message
Kernel driver not installed (rc=-1908)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. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
The correct solution is as follows (the root permission is used by default)
Run the following command first
leafpad /etc/apt/sources.list
Replace software source with official source
# Regular Repositoriesdeb http://http.kali.org/kali sana main non-free contribdeb http://security.kali.org/kali-security sana/updates main contrib non-free# Source Repositoriesdeb-src http://http.kali.org/kali sana main non-free contribdeb-src http://security.kali.org/kali-security sana/updates main contrib non-free
Execute Command
apt-get clean
Then execute
apt-get update -y && apt-get dist-upgrade -y && apt-get install linux-headers-$(uname -r) -y && apt-get install virtualbox -y
The default virtualbox is installed. Enter the following command in the command line:
virtualbox
The virtualbox will be started, but this prompt is displayed. There is also an error message indicating the rc =-1908 prompt after startup (the picture is in the first part of the article)
0x02 install virtualbox-dkms
Continue to execute the command
apt-get install virtualbox-dkms
Install virtualbox-dkms
If DKMS: install completed appears, the installation is complete.
At this time, you find that the problem still cannot be solved, but you have changed the error.
Next, enter the discount
0x03 days for stealing
Uninstall the default virtualbox first! Well, that's right! You have loaded things for a long time and uninstalled them!
Execute Command
apt-get remove virtualbox
Because kali linux 2.0 is a customized System Based On Debian Jessie. Therefore, go to the official website to download the virtualbox of the Jessis version.
Official Website:
Https://www.virtualbox.org/wiki/Linux_Downloads
Or
Directly execute the "lazy" command to download it. (If an updated version is available, go to the official website to download it ):
wget http://download.virtualbox.org/virtualbox/5.1.2/virtualbox-5.1_5.1.2-108956~Debian~jessie_i386.deb
Currently, the lazy link downloads VirtualBox 5.1.2 of version 5.1.2 for Linux.
After the download is complete, install it through dpkg
dpkg -i virtualbox-5.1_5.1.2-108956~Debian~jessie_i386.deb
Then start virtualbox and execute the command
virtualbox
A new error occurs.
Well, that's right. This means that the vboxdrv kernel module is not loaded. The following are a bunch of things that I don't want to see. The solution is as follows:
0x04 repair kernel module Problems
apt-get install linux-headers-$(uname -r)
The problem arises again, but it must be solved.
View Problem details
Obviously, dependency is missing.
In international practice, run the repair command to fix the dependency problem. Run the following command:
apt-get -f install
You may need to enterYConfirm
Start the virtualbox virtual machine again.
Run
virtualbox
Started successfully! The figure showing successful startup is provided!