Installing VBox on Kali Linux 2018.1

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

I've been trying to install VirtualBox on Kali linux "to start my testing VMs from it".
I tried all everything I found on google, but nothing will work.

It runs, but won't run VMs. I keep getting this error:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.14.0-kali3-amd64) or it failed to
load. Please recompile the kernel module and install it by

sudo /sbin/vboxconfig

You will not be able to start VMs until this problem is fixed.


Nothing I try seems to fix this issue.
Perhaps the Kali headers an not being met.
I tried using jessie's, but not luck.

Anyone every successfully installed VBox on Kali?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing VBox on Kali Linux 2018.1

Post by socratis »

ZaYoOoD wrote:I tried all everything I found on google, but nothing will work.
Have you tried to read the User Manual?
ZaYoOoD wrote:Nothing I try seems to fix this issue.
What exactly did you try? What were the results?
ZaYoOoD wrote:Perhaps the Kali headers an not being met.
That's a real clear possibility. Others include the binutils, perl, gcc, etc. The messages should tell you what you need to do actually.
ZaYoOoD wrote:Anyone every successfully installed VBox on Kali?
A lot of people AFAIK.

Try to install VirtualBox. Record the messages from the screen. Study them closely. Take any suggested action recommended. You could even post the installation messages here so the rest of us could have a look.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

I did try to the read the manual, but I don't think I'll find anything useful there, as the issue is not a bug, but rather misconfigurations.
I don't know how to resolve it yet.

Whenever I try to do what the terminal suggests "sudo /sbin/vboxconfig", I get:

Code: Select all

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.14.0-kali3-amd64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.14.0-kali3-amd64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
I also tried running "sudo /usr/lib/virtualbox/vboxdrv.sh setup", with the same message:

Code: Select all

vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    linux-headers-amd64 linux-headers-4.14.0-kali3-amd64
The Linux-headers keeps popping up, as they're named kali rather than debian/jessie.

Any thoughts?
Last edited by socratis on 22. Apr 2018, 11:17, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing VBox on Kali Linux 2018.1

Post by socratis »

ZaYoOoD wrote:Any thoughts?
You're joking, right? There can be no other explanation at this point, except that you're joking. You are getting a message as clear as instructions come. Just follow the $#%@& instructions!

Your kernel is "4.14.0-kali3-amd64", as you could verify after running a "uname -a", it's NOT Debian/Jessie!
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

I know that, and it's headers are already installed.

Kali 4 is based on Debian Jessie, so when Kali headers did not work, and I couldn't find any fix for Kali, I thought I'd try those.

Also, I asked for help because I could not find a fix, so please try to be helpful.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing VBox on Kali Linux 2018.1

Post by socratis »

I am trying to be helpful, but there are limits to what a human can endure. The instructions are crystal clear:
  • You need to install the headers that match exactly your installed kernel.
There's no way around it. Either you need to change your kernel or find the matching headers. Period.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

Thank you.
I already have them installed I believe, or an updated version of them, check this:

Code: Select all

apt search Linux Kali 4.14.0-kali3-amd64
Sorting... Done
Full Text Search... Done
linux-image-4.14.0-kali3-amd64/now 4.14.12-2kali1 amd64 [installed,local]
  Linux 4.14 for 64-bit PCs
Am I missing something?
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

I also tried this:

Code: Select all

apt-get install gcc make linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.14.0-kali3-amd64
E: Couldn't find any package by glob 'linux-headers-4.14.0-kali3-amd64'
E: Couldn't find any package by regex 'linux-headers-4.14.0-kali3-amd64'
My sources are:
deb Kali
deb-src Kali
deb virtualbox jessie
deb debian jessie

I cannot post urls yet.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

I've done more research, I have the following kernel installed:

Code: Select all

linux-image-4.14.0-kali3-amd64/now 4.14.12-2kali1 amd64 [installed,local]
uname -a returns:

Code: Select all

Linux Kali 4.14.0-kali3-amd64 #1 SMP Debian 4.14.12-2kali1 (2018-01-08) x86_64 GNU/Linux
I've looked everywhere for the linux-headers-4.14.0-kali3-amd64, but I cannot find them.

A regular search would return:

Code: Select all

apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.14.0-kali3-amd64
E: Couldn't find any package by glob 'linux-headers-4.14.0-kali3-amd64'
E: Couldn't find any package by regex 'linux-headers-4.14.0-kali3-amd64'
Any ideas?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Installing VBox on Kali Linux 2018.1

Post by socratis »

ZaYoOoD wrote:Any ideas?
Yes. Contact the Kali people. It's not up to the VirtualBox forums to help you with your Kali header/kernel mismatch. Well, it can be, but up to a point. After that, talk to the experts, because it smells less and less like a VirtualBox problem. Actually it's not a VirtualBox problem at all, to be frank...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

Thanks, I will.

Yeah it's definitely not a VB issue, just wanted see if anyone had the same issue and got it resolved.
Last edited by socratis on 22. Apr 2018, 16:59, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

So for some reason, I cannot update the Linux image and headers without crashing the whole system, and the 4.14.0 headers are no longer available at the repo.
Anyway,I downloaded the headers and all dependencies and installed them manually.

These are the messages I get from VBox now:

Code: Select all

virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.14.0-kali3-amd64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /sbin/vboxconfig

         You will not be able to start VMs until this problem is fixed.
So I run the suggested code as usual, and go this, even after installing all the headers, now the error is different:

Code: Select all

sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
I ran dmesg to find out what went wrong:

Code: Select all

dmesg | grep -i 'vboxdrv'
[ 1614.110093] vboxdrv: loading out-of-tree module taints kernel.
[ 1614.110731] vboxdrv: Unknown symbol __x86_indirect_thunk_r15 (err 0)
[ 1614.110807] vboxdrv: Unknown symbol __x86_indirect_thunk_rax (err 0)
[ 1614.110848] vboxdrv: Unknown symbol __x86_indirect_thunk_rdx (err 0)
[ 1614.110890] vboxdrv: Unknown symbol __x86_indirect_thunk_r14 (err 0)
[ 1614.110917] vboxdrv: Unknown symbol __x86_indirect_thunk_rbx (err 0)
[ 1614.110943] vboxdrv: Unknown symbol __x86_indirect_thunk_r13 (err 0)
[ 1614.111008] vboxdrv: Unknown symbol __x86_indirect_thunk_rcx (err 0)
[ 1614.111028] vboxdrv: Unknown symbol __x86_indirect_thunk_rsi (err 0)
[ 1614.111047] vboxdrv: Unknown symbol __x86_indirect_thunk_r9 (err 0)
[ 1614.111072] vboxdrv: Unknown symbol __x86_indirect_thunk_r12 (err 0)
[ 1614.111107] vboxdrv: Unknown symbol __x86_indirect_thunk_r8 (err 0)
[ 1682.522943] vboxdrv: Unknown symbol __x86_indirect_thunk_r15 (err 0)
[ 1682.523010] vboxdrv: Unknown symbol __x86_indirect_thunk_rax (err 0)
[ 1682.523045] vboxdrv: Unknown symbol __x86_indirect_thunk_rdx (err 0)
[ 1682.523082] vboxdrv: Unknown symbol __x86_indirect_thunk_r14 (err 0)
[ 1682.523106] vboxdrv: Unknown symbol __x86_indirect_thunk_rbx (err 0)
[ 1682.523128] vboxdrv: Unknown symbol __x86_indirect_thunk_r13 (err 0)
[ 1682.523184] vboxdrv: Unknown symbol __x86_indirect_thunk_rcx (err 0)
[ 1682.523200] vboxdrv: Unknown symbol __x86_indirect_thunk_rsi (err 0)
[ 1682.523217] vboxdrv: Unknown symbol __x86_indirect_thunk_r9 (err 0)
[ 1682.523239] vboxdrv: Unknown symbol __x86_indirect_thunk_r12 (err 0)
[ 1682.523268] vboxdrv: Unknown symbol __x86_indirect_thunk_r8 (err 0)
I've looked online with no luck.

Any ideas?
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

I also tried removing the current VBox 5.2, which I installed as per the instructions in the Download sections, using the Debian jessie repo. This time I installed it from the Kali repo.

Now I get a different message:

Code: Select all

virtualbox
WARNING: The character device /dev/vboxdrv does not exist.
	 Please install the virtualbox-dkms package and the appropriate
	 headers, most likely linux-headers-amd64.

	 You will not be able to start VMs until this problem is fixed.
Though I have both dkms & am64 headers installed:

Code: Select all

apt-get install virtualbox-dkms
Reading package lists... Done
Building dependency tree       
Reading state information... Done
virtualbox-dkms is already the newest version (5.2.8-dfsg-5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Code: Select all

linux-headers-amd64/kali-rolling,now 4.15+91+kali1 amd64 [installed]
  Header files for Linux amd64 configuration (meta-package)
Still no luck.
ZaYoOoD
Posts: 10
Joined: 21. Apr 2018, 19:41

Re: Installing VBox on Kali Linux 2018.1

Post by ZaYoOoD »

Ok.
So after a looot of research and fixing attempts, here's where I'm at.


1-VirtualBox does not work on Kali Kernel 4.14.0 "either a bug or not compiled for it or for whatever reason, perhaps it's complied for 4.15.0".
Even if I install the headers, it is would not work, as shown in my previous post.

2-VirtualBox does work perfectly on Kali Kernel 4.15.0 "I got it working when I installed Kali as a VM with Kernel 4.15.0 on VBOX!".

3-I cannot use Kali Kernel 4.15.0 as dual-boot for a bug related to wlan chip, it does not boot.


So, any chance I could get it running on my current kernel 4.14.0?
My previous post shows the output I get even after installing the linux-headers.
Post Reply