Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VirtualBox 'vboxsf' kernel module - "unknown symbol"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Cygon
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2006
Posts: 115
Location: Germany

PostPosted: Tue Oct 11, 2022 6:23 am    Post subject: VirtualBox guest: vboxsf kernel module - unknown symbol Reply with quote

I installed a Gentoo system in VirtualBox (host is also Gentoo) and emerged the 'virtualbox-guest-additions' package which comes with an OpenRC init script (/etc/init.d/vitualbox-guest-additions) that loads a few modules.

Code:
# /etc/init.d/virtualbox-guest-additions (except)
start_pre() {
  einfo "Loading kernel modules"
  /sbin/modprobe vboxguest 2>&1
  /sbin/modprobe vboxsf 2>&1
}


However, it fails with this message:

Code:
* Loading kernel modules
modprobe: ERROR: could not insert 'vboxsf': No such device


The module is there. If I manually attempt to load it, I get this:

Code:
# insmod /lib/modules/5.15.69-gentoo/misc/vboxsf.ko
insmod: ERROR: could not insert module /lib/modules/5.15.69-gentoo/misc/vboxsf.ko: Unknown symbol in module


Since this is a fresh VM, there only ever has been one kernel on it and the module was compiled with that kernel selected and running:

Code:
# uname -a
Linux localhost 5.15.69-gentoo #2 SMP Mon Oct 10 17:01:26 -00 2022 x86_64 Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz GenuineIntel GNU/Linux

# modinfo /lib/modules/5.15.69-gentoo/misc/vboxsf.ko
filename:       /lib/modules/5.15.69-gentoo/misc/vboxsf.ko
version:        6.1.34_Gentoo r150636
alias:          fs-vboxsf
license:        GPL and additional rights
author:         Oracle Corporation
description:    Oracle VM VirtualBox VFS Module for Host File System Access
srcversion:     5CA88D7CFA73949DF6004A8
depends:        vboxguest
retpoline:      Y
name:           vboxsf
vermagic:       5.15.69-gentoo SMP mod_unload
parm:           follow_symlinks:Let host resolve symlinks rather than showing them (int)


I suspect that the module needs some kernel option to be enabled that isn't checked for by the ebuild.

depmod --all does not report any missing symbols. Is there another way to find out what's missing or could the problem be an entirely different one?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23335

PostPosted: Tue Oct 11, 2022 12:23 pm    Post subject: Reply with quote

What does dmesg report after a failed load? The last 10-15 lines are likely sufficient.
Back to top
View user's profile Send private message
Cygon
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2006
Posts: 115
Location: Germany

PostPosted: Tue Oct 11, 2022 1:44 pm    Post subject: Reply with quote

These lines pop into dmesg when I try to load the driver:

Code:
Service: Shared Clipboard
Service: Host Version Check
Service: Seamless
Service: Drag and Drop (DnD)
Service: Display SVGA X11
Worker loop running
VMWARE's ctrl extensions is availabale Major Opcode is 128
Found libXrandr 1.6
An X Window protocol error occurred: BadValue (integer parameter out of range for operation) (error code 2). Request code: 128
Resizing frame buffer to 981 725 has failed, current mode 800 600
RRScreenChangeNotify event received
Proxy window=60817409, root window=1294 ...
Started
6.1.34_Gentoor150636
An X Window protocol error occurred: BadValue (integer parameter out of range for operation) (error code 2). Request code: 128
RRScreenChangeNotify event received
Resizing frame buffer to 981 725 has failed, current mode 800 600
RRScreenChangeNotify event received
vboxguest: loading out-of-tree module taints kernel.
Error: Driver 'vboxguest' is already registered, aborting...
vboxguest: PCI device not found, probably running on physical hardware.
------------------ [ cut here ] -----------------------
Unexpected driver unregister!


I noticed that I had enabled CONFIG_DRM_VBOXVIDEO=y and CONFIG_VBOXGUEST=y but not CONFIG_VBOXSF_FS in my kernel config, so the virtualbox guest and video drivers were built-in. Apparently, mixing the VirtualBox modules added into the kernel with the ones from the virtualbox-guest-additions package results in some weirdness.

So two more experiments:

  • If I use only the VirtualBox modules built into the kernel, after resizing the VirtualBox window while KDE is running, all screen contents except for the mouse cursor disappears. I can still open the launcher (Alt+F2), so it's probably messed up geometry. Might be related to the "BadValue" lines in dmesg.
  • If I instead disable my kernel's VirtualBox modules, virtualbox-guest-additions fails to build because DRM_TTM is not set (it's one of those symbols that's only enabled if something depends on it) - so I have to either enable an unrelated video driver or hand-delete the kernel module after building. I did the latter, then installed virtualbox-guest-additions. No change on the screen resizing/geometry issue - everything turns black and I can only move my mouse and launch programs via Alt+F2.

Using the xorg.conf suggested by virtualbox-guest-additions makes X11 unable to find a screen.

Well at least dmesg contains no complaints anymore :)

Code:
vboxguest: loading out-of-tree module taints kernel.
e1000 0000:00:03.0 enp0s3: renamed from eth0
vgdrvHeartbeatInit: Setting up heartbeat to trigger every 2000 milliseconds
input: Unspecified device as /devices/pci0000:00/0000:00:04.0/input/input6
vboxguest: Successfully loaded version 6.1.38_Gentoo r153438
vboxguest: misc device minor 125, IRQ 20, I/O port d020, MMIO at 00000000e8400000 (size 0x400000)
vboxguest: Successfully loaded version 6.1.38_Gentoo r153438 (interface 0x00010004)
EXT4-fs (sda2): re-mounted. Opts: (null). Quota mode: disabled.
random: ln: uninitialized urandom read (6 bytes read)
random: mktemp: uninitialized urandom read (10 bytes read)
random: crng init done
e1000: enp0s3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
IPv6: ADDRCONF(NETDEV_CHANGE): enp0s3: link becomes ready
vboxsf: g_fHostFeatures=0x8000000f g_fSfFeatures=0x1 g_uSfLastFunction=29
vboxsf: Successfully loaded version 6.1.38_Gentoo r153438
vboxsf: Successfully loaded version 6.1.38_Gentoo r153438 on 5.15.69-gentoo (LINUX_VERSION_CODE=0x50f45)
vboxvideo: loading version 6.1.38_Gentoo r153438
13:32:29.873325 main     VBoxService 6.1.38_Gentoo r153438 (verbosity: 0) linux.amd64 (Oct 11 2022 07:29:46) release log
13:32:29.873339 main     Log opened 2022-10-11T13:32:29.873298000Z
13:32:29.873847 main     OS Product: Linux
13:32:29.874043 main     OS Release: 5.15.69-gentoo
13:32:29.874143 main     OS Version: #7 SMP Tue Oct 11 07:17:41 MDT 2022
13:32:29.874239 main     Executable: /usr/sbin/vboxguest-service
13:32:29.874247 main     Process ID: 2183
13:32:29.874255 main     Package type: LINUX_64BITS_GENERIC (OSE)
13:32:29.878842 main     6.1.38_Gentoo r153438 started. Verbose level = 0
13:32:29.879537 main     vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum