Reminder: vboxsf fails to install on any Red Hat Linux

Postings relating to old VirtualBox pre-releases
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Reminder: vboxsf fails to install on any Red Hat Linux

Post by Technologov »

RHEL3,4,5,6,7 guests. Both 32 and 64 bits.

I would like to mass test Linux GA, but I will wait until vboxsf are fixed.
socratis
Site Moderator
Posts: 27330
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: Reminder: vboxsf fails to install on any Red Hat Linux

Post by socratis »

Technologov, your post is rather vague. I found two other threads that you opened that seem to refer to the same thing: If you're referring to the "modprobe vboxsf failed" message during the GAs installation, I already told you a couple of times to ignore it. Are you having any other (actual) problems with the shared folders aspect? If so, please explain in detail. A "please fix it" doesn't help anyone, if we don't know what "it" refers to...

And please don't open additional threads, you could have simply bumped your existing ones...
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.
thebell
Posts: 5
Joined: 5. Dec 2018, 13:06

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by thebell »

Same problem.
Looks like rhel doesn't contains /usr/include/linux/seq_file.h, so vboxsf.ko wouldn't compile.
Here is my fix, maybe it's a wrong fix but it make vboxsf works again.

Code: Select all

--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c
+++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
@@ -505,6 +505,7 @@ static int sf_show_options(struct seq_file *m, struct vfsmount *mnt)
 static int sf_show_options(struct seq_file *m, struct dentry *root)
 #endif
 {
+#ifdef _LINUX_SEQ_FILE_H
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
 	struct super_block *sb = mnt->mnt_sb;
 #else
@@ -519,6 +520,7 @@ static int sf_show_options(struct seq_file *m, struct dentry *root)
 			seq_escape(m, sf_g->tag, " \t\n\\");
 		}
 	}
+#endif
 
     return 0;
 }
socratis
Site Moderator
Posts: 27330
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: Reminder: vboxsf fails to install on any Red Hat Linux

Post by socratis »

@thebell
You didn't specify which RHEL version you're talking about, neither with which VirtualBox version this fails. For example, there was a new release yesterday 6.0.0b3 r127164 and an even newer GAs r127166. Can you please specify which versions you're talking about?
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.
thebell
Posts: 5
Joined: 5. Dec 2018, 13:06

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by thebell »

@socratis
Hmm I just follow the context.

Here is my environment:

Code: Select all

Virtualbox:
  6.0.0 beta 3 126907
Host:
  RHEL 7.6, Kernel 3.10.0-957
Guest:
  RHEL 6.10, Kernel 2.6.32-754.6.3
  RHEL 7.6, Kernel 3.10.0-957
Both guest doesn't have /usr/include/linux/seq_file.h

Also downloaded the latest guest addition 127166 and verified it doesn't solve this problem.
The compile error log is uploaded.
Attachments
vboxsf_compile_error.log.zip
(1.5 KiB) Downloaded 36 times
socratis
Site Moderator
Posts: 27330
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: Reminder: vboxsf fails to install on any Red Hat Linux

Post by socratis »

Is there a way to try RHEL 7.6 (or anything else for that matter) without registering?
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.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by Technologov »

Without registering there is CentOS, which is a clone of RHEL
socratis
Site Moderator
Posts: 27330
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: Reminder: vboxsf fails to install on any Red Hat Linux

Post by socratis »

Thanks Technologov, I have a couple of CentOS releases available already, can get more at will. Any version in particular that I should be seeing this failure with?
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.
stes
Posts: 154
Joined: 28. Apr 2018, 11:07

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by stes »

I'm not sure whether this helps or adds more confusion but for me on RHEL 7.5 the vboxsf seems to install.

Host platform : Solaris 11.4 6.0.0beta3

Guest platform: RHEL 7.5
# rpm -qa | grep kernel
kernel-devel-3.10.0-862.el7.x86_64
kernel-3.10.0-862.el7.x86_64
kernel-headers-3.10.0-862.el7.x86_64
kernel-tools-libs-3.10.0-862.el7.x86_64
kernel-tools-3.10.0-862.el7.x86_64
Also required are gcc, make and perl but the installer explains this.
# rpm -q gcc make perl
gcc-4.8.5-28.el7.x86_64
make-3.82-23.el7.x86_64
perl-5.16.3-292.el7.x86_64
The important thing as far as I understand was to install kernel-devel as the /usr/src/kernels header files are required.

I must say that it was not really clear that you have to install the kernel-devel but this fixed the guest addition install for me.

The guest install simply fails on 'modprobe failed' instead of explaining that there is a need to install the proper rpms.

The seq_file.h header is in the kernel-devel rpm under /usr/src/kernels/.../include.

The modules compile and the Guest Control File Manager (to copy files between guest and host) works for me.

The vboxsf also works.
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.5 (Maipo)
# mount -t vboxsf shared /mnt

# lsmod | grep vbox
vboxvideo              35874  1 
ttm                    99555  1 vboxvideo
drm_kms_helper        176920  1 vboxvideo
drm                   397988  4 ttm,drm_kms_helper,vboxvideo
vboxsf                 42808  0 
vboxguest             347398  4 vboxsf

# modinfo vboxsf
filename:       /lib/modules/3.10.0-862.el7.x86_64/misc/vboxsf.ko
version:        6.0.0_BETA3 r127054
alias:          fs-vboxsf
license:        GPL and additional rights
author:         Oracle Corporation
description:    Oracle VM VirtualBox VFS Module for Host File System Access
retpoline:      Y
rhelversion:    7.5
srcversion:     CB7F2D27C03313DAE561FAB
depends:        vboxguest
vermagic:       3.10.0-862.el7.x86_64 SMP mod_unload modversions 
parm:           follow_symlinks:Let host resolve symlinks rather than showing them (int)
Last edited by socratis on 5. Dec 2018, 19:07, edited 1 time in total.
Reason: Enclosed the information in [quote][pre] tags for better readability
stes
Posts: 154
Joined: 28. Apr 2018, 11:07

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by stes »

The misleading issue here is , I think, that the installer fails "silently" without clear indication what the problem is.

If you try to install the guest additions on a system without kernel-devel I get :
/mnt/VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.0_BETA3 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modul
es.  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: Starting.
[root@tester1 /]# cat /var/log/vboxadd-setup.log
modprobe vboxguest failed
The message is not informative.

After installing kernel-devel the script guides you and tells/explains to install gcc,make,perl etc. but it does not indicate that kernel-devel is required for the /usr/src files.

After installing kernel-devel gcc,make, perl etc. I get:

/mnt/VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.0_BETA3 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 6.0.0_BETA3 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modul
es.  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: Building the modules for kernel 3.10.0-862.el7.x86_64.

VirtualBox Guest Additions: Starting.
The important line in there is :
"VirtualBox Guest Additions: Building the modules for kernel 3.10.0-862.el7.x86_64."
as this seems a problem with a missing prerequisite for the compile / build environment.
Last edited by socratis on 5. Dec 2018, 19:43, edited 1 time in total.
Reason: Enclosed the information in [quote][pre] tags for better readability
socratis
Site Moderator
Posts: 27330
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: Reminder: vboxsf fails to install on any Red Hat Linux

Post by socratis »

I do not have access to RHEL, but I did try CentOS 7.6 (1810) and I had no problem getting the GAs up and running. During the installation I also chose the Development option, which made it a little bit easier than manually installing (after the fact) the building prerequisites.

Shared folders (vboxsf) compiling and working with auto-mounted shared folder. My "important" line (according to stes) is:
VirtualBox Guest Additions: Building the modules for kernel 3.10.0-957.el7.x86_64.
$ rpm -qa | grep kernel
kernel-tools-libs-3.10.0-957.el7.x86_64
kernel-3.10.0-957.el7.x86_64
kernel-tools-3.10.0-957.el7.x86_64
abrt-addon-kerneloops-2.1.11-52.el7.centos.x86_64
kernel-headers-3.10.0-957.el7.x86_64
kernel-devel-3.10.0-957.el7.x86_64

$ rpm -q gcc make perl
gcc-4.8.5-36.el7.x86_64
make-3.82-23.el7.x86_64
perl-5.16.3-293.el7.x86_64

$ cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 

$ lsmod | grep vbox
vboxsf                 42808  1 
vboxvideo              35874  2 
ttm                   114635  1 vboxvideo
drm_kms_helper        179394  1 vboxvideo
drm                   429744  5 ttm,drm_kms_helper,vboxvideo
vboxguest             347398  5 vboxsf

$ modinfo vboxsf
filename:       /lib/modules/3.10.0-957.el7.x86_64/misc/vboxsf.ko
version:        6.0.0_BETA3 r127161
alias:          fs-vboxsf
license:        GPL and additional rights
author:         Oracle Corporation
description:    Oracle VM VirtualBox VFS Module for Host File System Access
retpoline:      Y
rhelversion:    7.6
srcversion:     6456B31D33BFCE894558BCB
depends:        vboxguest
vermagic:       3.10.0-957.el7.x86_64 SMP mod_unload modversions 
parm:           follow_symlinks:Let host resolve symlinks rather than showing them (int)
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.
stes
Posts: 154
Joined: 28. Apr 2018, 11:07

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by stes »

socratis wrote:During the installation I also chose the Development option, which made it a little bit easier than manually installing (after the fact) the building prerequisites.
Exactly, it depends on the "options" of which packages are installed, whether you have a minimal or full install etc.

Also if the guest addition Makefile/build script/installer reports
VirtualBox Guest Additions: Building the modules for kernel 3.10.0-957.el7.x86_64.
that is, if the modules are being built, then the installer will not end with an uninformative message like "modprobe failed" while the actual problem is that the build of the modules was skipped/not done, because if the necessary prerequisites are not there the installer is possibly simply skipping the build of the modules (without alert about this fact).

In my case it seems the Guest Installer build script tests for the directory
ls -ld /lib/modules/3.10.0-862.el7.x86_64/build
lrwxrwxrwx. 1 root root 38 Nov  3 20:30 /lib/modules/3.10.0-862.el7.x86_64/build -> /usr/src/kernels/3.10.0-862.el7.x86_64
which is a symbolic link so the /usr/src/kernels/ files really have to be there (kernel-devel in my case).

In the vboxadd script there is a line
test -d /lib/modules/"$KERN_VER"/build || return 0
so you'd better make sure that the /usr/src/kernels files are installed.

So this is an issue with the prerequisites of the build environment of the build script ... because otherwise the build script may simply silently skip the build of the kernel modules and obviously if they are not built then they cannot be loaded.

The expectation of the user may be on the other hand that the Guest Addition installer 'installs' (instead of builds or compiles) the kernel modules, that is that the binary modules are part of the package (as it is the case on the Solaris SVR4 package which does not compile the guest additions but installs them).
Last edited by socratis on 6. Dec 2018, 09:55, edited 2 times in total.
Reason: Enclosed the information in [quote][pre] tags for better readability
socratis
Site Moderator
Posts: 27330
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: Reminder: vboxsf fails to install on any Red Hat Linux

Post by socratis »

stes wrote:Exactly, it depends on the "options" of which packages are installed, whether you have a minimal or full install etc.
in any case, you can always rectify the situation later on by installing the necessary developer packages, the minimum 3 being "gcc", "make" and "perl". Lately, and I believe in RedHat/Fedora related distros, you also need "elfutils-libelf-devel".
stes wrote:then the installer will not end with an uninformative message like "modprobe failed" while the actual problem is that the build of the modules was skipped/not done
No, that's not it. According to a developer, this message usually is because:
A developer wrote:If vboxsf is not loaded when the installer finishes it tries to load it. If there is an old, incompatible version of vboxguest loaded but no vboxsf then it will try to load vboxsf and fail.
So, as it has been repeatedly mentioned, this message is a red herring and nothing that the next reboot won't fix.
stes wrote:The expectation of the user may be on the other hand that the Guest Addition installer 'installs' (instead of builds or compiles) the kernel modules
On Linux there is never, ever an "installation", it's always a "build" procedure. That's why the requirement for the build tools. Always.
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.
thebell
Posts: 5
Joined: 5. Dec 2018, 13:06

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by thebell »

As @stes said, install "kernel-devel" package on RHEL 7.6 solved the problem, vboxsf now works fine on my RHEL 7.6 guest without modify GA's code :D.

But my RHEL 6.10 guest already installed "kernel-devel" package before, and still can't compile "vboxsf.ko", looks like gcc didn't include "seq_file.h" and "mount.h" automatically on RHEL 6, I don't know why but add following lines to "vfsmod.h" make it works on RHEL 6 guest without my previous patch.

Code: Select all

#include <linux/seq_file.h>
#include <linux/mount.h>
stes
Posts: 154
Joined: 28. Apr 2018, 11:07

Re: Reminder: vboxsf fails to install on any Red Hat Linux

Post by stes »

That is a good remark, it may be necessary to test RHEL 6.10 .

However the subject of this thread was 'vboxsf fails to install on *any* Red Hat Linux.

The build script seems to work on RHEL 7.5 guests and on RHEL 7.6 guests as you confirm, and on CentOS 7.6.

RHEL 6.10 also has a seq_file.h header but it may somehow not be included ... (to be verified).
Post Reply