[Solved] Can't install guest additons in Kali Linux 2018.4

Discussions about using Linux guests in VirtualBox.

[Solved] Can't install guest additons in Kali Linux 2018.4

Postby Nota » 17. Jan 2019, 14:03

I am using VirtualBox 6.0.2 on Windows host. When I execute the install script, it returns:
Code: Select all   Expand viewCollapse view
nota@kali:~$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.2 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.0.2 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: modprobe vboxsf failed

That makes it impossible for me to share directories. What should I do? Thanks.
Last edited by socratis on 19. Jan 2019, 07:23, edited 1 time in total.
Reason: Marked as [Solved].
Nota
 
Posts: 4
Joined: 17. Jan 2019, 08:42

Re: Can't install guest additons in Kali Linux 2018.4

Postby JeanR » 17. Jan 2019, 18:42

As a first step I'd suggest you post the (zipped) contents of your /var/log/vboxadd-setup.log
also the output of 'lsmod vboxsf', 'modprobe vboxsf' or 'dmesg |grep vboxsf' might be of interest
JeanR
 
Posts: 18
Joined: 3. Mar 2017, 18:52
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux(Fedora, CentOS)

Re: Can't install guest additons in Kali Linux 2018.4

Postby socratis » 17. Jan 2019, 20:14

The "modprobe vboxsf failed" is most of the times (if not always) a red herring, a no-error. Unless you have other specific issues, you can safely ignore it.

Nota wrote:That makes it impossible for me to share directories
That *is* indeed a more specific issue. What do you see? What's the error that you're getting?
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25934
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Can't install guest additons in Kali Linux 2018.4

Postby Nota » 18. Jan 2019, 15:07

JeanR wrote:As a first step I'd suggest you post the (zipped) contents of your /var/log/vboxadd-setup.log
also the output of 'lsmod vboxsf', 'modprobe vboxsf' or 'dmesg |grep vboxsf' might be of interest


The content of /var/log/vboxadd-setup.log is only
Code: Select all   Expand viewCollapse view
Building the main Guest Additions module for kernel 4.19.0-kali1-amd64.
Building the shared folder support module.
Building the graphics driver module.

(Why did it build for kernel 4.19? My kernel version is 4.18.0)

Both "lsmod |grep vboxsf" and "dmesg |grep vboxsf" returns nothing. And "modprobe vboxsf" says
Code: Select all   Expand viewCollapse view
modprobe: FATAL: Module vboxsf not found in directory /lib/modules/4.18.0-kali2-amd64
Nota
 
Posts: 4
Joined: 17. Jan 2019, 08:42

Re: Can't install guest additons in Kali Linux 2018.4

Postby Nota » 18. Jan 2019, 15:20

socratis wrote:That *is* indeed a more specific issue. What do you see? What's the error that you're getting?


There's a directory located at /media/sf_vbox_share_dir, which is empty. (that directory is not empty indeed)
When I execute "mount -t vboxsf /media/sf_vbox_share_dir/ /root/vbox_share_dir/" it says
Code: Select all   Expand viewCollapse view
/sbin/mount.vboxsf: mounting failed with the error: No such device
Nota
 
Posts: 4
Joined: 17. Jan 2019, 08:42

Re: Can't install guest additons in Kali Linux 2018.4

Postby JeanR » 18. Jan 2019, 16:39

This is not the error socratis was asking for. The fact is, you have no kernel module yet for Shared Folders (vboxsf) so any attempts to use it will fail with an errorcode nobody is interested in.

What matters are the error messages during module compilation, which we haven't seen yet. Your problem can be anything from:
  1. not having a C-Compiler (I think we can rule that one out)
  2. not having the kernel-header (and in some cases the kernel-devel) packages for your distro and current kernel
    (in fact this was the root cause in my case, on fedora the latter package is now required to build vboxsf)
    IMHO the package name for kali seems to be linux-headers-4.19.0-kali1-amd64.deb and linux-image-dbg-4.19.0-kali1-amd64.deb respectively
    (use version 4.18.0 instead if uname -a reports you're still on 4.18)
  3. not using the correct image for the GA's, use the Devices -> insert Guest Additions CD image from the Hosts Vbox menu as described in viewtopic.php?f=29&t=15679
What I don't understand however, is that you don't see any errormessages on dmesg or in the logs that indicate the failure. Have you run the 'dmesg|grep vbox' cmd right after trying to build the GA's (i.e. not after a subsequent reboot)

As a workaround in the meantime you might try to copy files to/from your host with scp or any variant thereof (midnight-commander fishfs, sshfs over fuse, etc.)
JeanR
 
Posts: 18
Joined: 3. Mar 2017, 18:52
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux(Fedora, CentOS)

Re: Can't install guest additons in Kali Linux 2018.4

Postby Nota » 19. Jan 2019, 05:49

JeanR wrote:2) not having the kernel-header (and in some cases the kernel-devel) packages for your distro and current kernel
(in fact this was the root cause in my case, on fedora the latter package is now required to build vboxsf)

You inspired me that my kernel-header version (4.19) does not match my kernel version. After I upgrade the kernel it builds successfully! And now the directory sharing works well. Thanks!
Nota
 
Posts: 4
Joined: 17. Jan 2019, 08:42

Re: Can't install guest additons in Kali Linux 2018.4

Postby socratis » 19. Jan 2019, 07:19

Glad you got it going, marking as [Solved].
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25934
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: [Solved] Can't install guest additons in Kali Linux 2018.4

Postby virtualboxnewbie » 23. Jan 2019, 14:45

Dear Sir/Mdm,

I'm not too sure whether i should continue this post or start a new post.

as It is only 6 days old, I believe it may still be applicable.

while i was upgrading vbox guest addition from 5.2.14 to 5.2.24,
it did not upgrade.

Code: Select all   Expand viewCollapse view
Uncompressing VirtualBox 5.2.24 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.2.20 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
VirtualBox Guest Additions: Starting



guest addition still old one

Code: Select all   Expand viewCollapse view
modinfo vboxguest

filename:       /lib/modules/4.1.12-112.16.4.el7uek.x86_64/weak-updates/vboxguest/vboxguest.ko
version:        5.2.14 r123301
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     87A2347C02617B1A8239C8B
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:
vermagic:       4.1.12-94.3.4.el7uek.x86_64 SMP mod_unload modversions


kernel header is as follow
Code: Select all   Expand viewCollapse view
[root@ol75-12201-se-client ~]# rpm -qa | grep kernel
kernel-uek-firmware-4.1.12-112.16.4.el7uek.noarch
abrt-addon-kerneloops-2.1.11-50.0.1.el7.x86_64
kernel-devel-3.10.0-862.11.6.el7.x86_64
kernel-3.10.0-862.el7.x86_64
kernel-headers-3.10.0-957.1.3.el7.x86_64
kernel-uek-4.1.12-112.16.4.el7uek.x86_64
kernel-tools-libs-3.10.0-862.el7.x86_64
kernel-tools-3.10.0-862.el7.x86_64
kernel-uek-devel-4.1.12-124.19.1.el7uek.x86_64



so is there any reason why I can't upgrade my vboox guest addition?

thanks a lot!
virtualboxnewbie
 
Posts: 15
Joined: 25. Aug 2012, 08:23

Re: [Solved] Can't install guest additons in Kali Linux 2018.4

Postby toracat » 23. Jan 2019, 19:01

Looks like your running kernel is kernel-uek-4.1.12-112.16.4.el7uek. Then you need a -devel package that matches it. It will be kernel-uek-devel-4.1.12-112.16.4.el7uek. Either that or update the kernel to the one that matches kernel-uek-devel-4.1.12-124.19.1.el7uek.
Beginning is easy – Continuing is hard.
toracat
 
Posts: 86
Joined: 8. Dec 2018, 02:39
Location: California, USA
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: RHEL CentOS Scientific Linux

Re: [Solved] Can't install guest additons in Kali Linux 2018.4

Postby umoon13 » 7. Feb 2019, 07:53

I have the same problem
Kali Linux 64 Bit 2018.4 guest system in VirtualBox 6.0.4 r 128413 (Qt5.6.2). Host Windows 10
after installing kernel version 18

solved the problem like this:
updated the system, updated the kernel to version Linux Kali 4.19.0, and then just like in debian:
sudo apt full-upgrade
reboot
sudo apt-get install build-essential module-assistant
sudo m-a prepare
mount /media/cdrom
sudo sh /media/cdrom/VBoxLinuxAdditions.run
reboot
umoon13
 
Posts: 1
Joined: 7. Feb 2019, 07:12


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 8 guests