[Solved] VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Discussions about using Linux guests in VirtualBox.
Post Reply
frperies
Posts: 5
Joined: 5. Nov 2018, 12:19

[Solved] VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by frperies »

Hello,

I'm hitting the following issue when trying to install VirtualBox GuestAdditions 5.2.20 on my RHEL7.5 guest image (my host machine is on Windows 10):
Copying additional modules ...
Installing additional modules ...
VirtualBox Guest Additions:Building the VirtualBox Guest Addition kernel modules.  This may take a while.
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:
    kernel-devel kernel-devel-4.4.136-4.NSN.el7.x86_64
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.  This may take a while.
    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:
    kernel-devel kernel-devel-4.4.136-4.NSN.el7.x86_64
Press Return to close this window...
But, for sure, package kernel-devel-4.4.136-4.NSN.el7.x86_64 and kernel-headers-4.4.136-4.NSN.el7.x86_64 are already installed (and reinstallation of those packages changes nothing).

Log of /var/log/vboxadd-install.log gives the following:
grep: Unmatched ) or \)
chcon: can't apply partial context to unlabeled file 'opt/VBoxGuestAddition-5.2.18/other/mount.vboxsf'
grep: Unmatched ) or \)
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.
Log of /var/log/vboxadd-setup.log gives the following:
Building the main Guest Additions module.
Error building the module:
modprobe vboxguest failed.
I don't really know where to look at next. If anyone has some clues, I will be very glad to hear from him.

Thanks
Regards
Last edited by socratis on 14. Jan 2019, 19:21, edited 2 times in total.
Reason: Marked as [Solved].
frperies
Posts: 5
Joined: 5. Nov 2018, 12:19

Re: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by frperies »

Hello,

Unfortunately, I haven't received much answers for this issue but I had a new clue from file vboxadd-setup.log because it now states:

Code: Select all

Error building the module. Build output follows.
/tmp/vbox.0/Makefile.include.header:141: *** Error: unable to find the headers of the Linux kernel to build against. Specify KERN_VER=<version> (currently 4.4.136-4.NSN.el7.x86_64) and run Make again. 
 Stop.
modprobe vboxguest failed
I've tried : KERN_VER=/usr/include/kernels/4.4.136-4.NSN.el7.x86_64 ./BBoxLinuxAddition.run but it still changes nothing.
Any other clues ?

Thanks
Regards
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by mpack »

frperies wrote:I haven't received much answers for this issue
Perhaps you'd have better luck in a more appropriate forum. E.g. I wouldn't necessarily expect to find much Linux GAs expertise in the "Windows Hosts" forum.

Had it been me I'd probably have selected "Linux Guests". I'll move you there now.
frperies
Posts: 5
Joined: 5. Nov 2018, 12:19

Re: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by frperies »

Hello,

Is there any suggested procedure (log, traces, debug compilation flags,...) so to investigate this further ?

Thanks
Regards
toracat
Posts: 87
Joined: 8. Dec 2018, 02:39
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: RHEL CentOS Scientific Linux
Location: California, USA
Contact:

Re: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by toracat »

You may want to try KERN_VER=4.4.136-4.NSN.el7.x86_64 instead.
Beginning is easy – Continuing is hard.
frperies
Posts: 5
Joined: 5. Nov 2018, 12:19

Re: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by frperies »

@toracat

Thank you for your reply.

I have a new clue by looking to the journalctl output (cf.attachment)
I can see the following strange trace:

failed adding user 'vboxadd', exit code: 9

Does it help ?

Thanks
Attachments
2019-01-09 09_59_28-RHEL (NOEL7.5) [En fonction] - Oracle VM VirtualBox.gif
2019-01-09 09_59_28-RHEL (NOEL7.5) [En fonction] - Oracle VM VirtualBox.gif (34.35 KiB) Viewed 6245 times
frperies
Posts: 5
Joined: 5. Nov 2018, 12:19

Re: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by frperies »

Hi all,

After further investigations, it turns out that the symbolic link 'build' from/lib/modules/ to the kernel source was broken:
total 2080
lrwxrwxrwx.  1 root root     42 Jan 14 16:32 build -> /usr/src/kernels/4.4.136-4.NSN.el7.x86_64/
By restoring it manually, it works again!
Note that the original target path was correct, so the link was broken for a mysterious reason....
Last edited by socratis on 14. Jan 2019, 19:09, edited 1 time in total.
Reason: Enclosed the information in [quote][pre] tags 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: VirtualBox GuestAdditions 5.2.20 compilation issue against kernel 4.4

Post by socratis »

frperies wrote:By restoring it manually, it works again!
I should mark it as either [Solved] or [WorksForMe], depending on if it was a one-off, or if it's a systematic failure. I think I'll mark it as [Solved], for lack of evidence...
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.
Post Reply