virtual box guest additions on kali 2

Discussions related to using VirtualBox on Linux hosts.
Post Reply
If it aint broke
Posts: 12
Joined: 29. Jul 2016, 19:30

virtual box guest additions on kali 2

Post by If it aint broke »

I've been going through trying to get guest additions installed. I think it's a link problem but I don't know enough to fix it. Anyway, these are the two errors:

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.26 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.26 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.

LOG FILE:
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of
your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. St
op.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.


I see lots of posts, but can't get it. Please help. Patience is greatly appreciatied
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: virtual box guest additions on kali 2

Post by socratis »

In order for the Guest Additions (GAs) to compile, they need the currently running kernel matching headers. You don't have them installed. Take a look at: viewtopic.php?f=7&t=78701
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.
If it aint broke
Posts: 12
Joined: 29. Jul 2016, 19:30

Re: virtual box guest additions on kali 2

Post by If it aint broke »

saw that. tried this:

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.3.0-kali1-amd64
E: Couldn't find any package by glob 'linux-headers-4.3.0-kali1-amd64'
E: Couldn't find any package by regex 'linux-headers-4.3.0-kali1-a
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: virtual box guest additions on kali 2

Post by socratis »

Well, I'm not a Linux expert, so the general advice is:
- Find the kernel version you're running. "uname -r" is your helper.
- Install the matching kernel-headers. Choose your favorite method.
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.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual box guest additions on kali 2

Post by Perryg »

Actually we know what the kernel is from "Unable to locate package linux-headers-4.3.0-kali1-amd64"
The problem is they can not be found. This is an OS issue I am afraid. If the guest has Internet access and is configured to use the proper repository then you need to ask the kali folks what the heck is going on.
If it aint broke
Posts: 12
Joined: 29. Jul 2016, 19:30

Re: virtual box guest additions on kali 2

Post by If it aint broke »

I've been working on this:

3
down vote


I would upgrade the kernel release version itself instead of trying to install the Linux kernel headers for the old version (4.3.0) of the kernel. Perform the following step after updating the Kali /etc/apt/sources.list file with the latest version of the Kali rolling repository:

sudo apt-get update # this pulls the latest packages list from the kali sources repo
sudo apt-get -y dist-upgrade # when installing this, you would see the latest kernel
# image in the list of packages to be installed,something
# like" linux-image-4.5.0-kali1-amd64"
reboot # MOST IMPORTANT STEP! make sure you reboot the machine via this cmd OR
# shutdown, restart forcefully after completing prev cmds
uname -r # check that the kernel release has updated

The dist-upgrade line above have been doing its thing for a while. We'll see.
If it aint broke
Posts: 12
Joined: 29. Jul 2016, 19:30

Re: virtual box guest additions on kali 2

Post by If it aint broke »

Log has same error message. I updated the headers. took a long time. Gotta be a symbolic link to direct it to the right place. I don't know were it is and where it needs to be. Somebody knows. Just not me. :D

Help, I need somebody, Help!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual box guest additions on kali 2

Post by Perryg »

I told you whom you contact. The kali folks.

Have you verified that the headers actually match the running headers. Does it still say it can not find the headers if you try to install them?
If it aint broke
Posts: 12
Joined: 29. Jul 2016, 19:30

Re: virtual box guest additions on kali 2

Post by If it aint broke »

Is this them?

root@kali2:~/Desktop# uname -r
4.6.0-kali1-amd64
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: virtual box guest additions on kali 2

Post by socratis »

No, actually that's your OS version, the kernel. It does not show you whether the headers are installed or not. The (uname -r) is used as a replacement in the command that Perry gave you. More information on the man page:
  • $ man uname
    DESCRIPTION
         The uname utility writes symbols representing one or more system characteristics to the standard output.
         ...
         -r      print the operating system release.
         ...
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.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: virtual box guest additions on kali 2

Post by Perryg »

Actually uname -r prints the kernel release that is currently running. I asked if running "sudo apt-get install linux-headers-$(uname -r)" still says it can not be found. If you do not answer my questions I see no further need to follow this thread.
If it aint broke
Posts: 12
Joined: 29. Jul 2016, 19:30

Re: virtual box guest additions on kali 2

Post by If it aint broke »

I'm sorry, Perry. That was not intentional. I have been running those commands over and over and it wasn't until I undated the repository link a(with and updated and current one ) and upgraded the kernel that the below command worked. I think they installed correctly. No errors this time. I went back and ran the command as suggested. Thank you.

apt-get install linux-headers-$(uname -r)

When I ran the script, no error messages this time.

./VBoxLinuxAdditions.run

I appreciate your help.
Post Reply