Boot error: Exec format error for virtualbox modules in systemd

I get an tar.xz for the host modules, but no such package for the guest modules. How can i get the guest modules?

1 Like

Ah! That sounds like the guest module isn't building correctly. Can you look through the build log and see if it shows an error? It might direct you to another log file (something along the lines of a DKMS build log).

EDIT: Seems that this commit disabled guest building? Why? No commit message...


I have no errors nor a build log there.

But the suspicious thing is that the script itself seems to not target the guest-modules?


# Based on the file created for Arch Linux by:
# Ionut Biru <ibiru@archlinux.org>
# Sébastien Luttringer <seblu@aur.archlinux.org>

# Maintainer: Philip Müller <philm@manjaro.org>
# Maintainer: Bernhard Landauer <oberon@manjaro.org>

_linuxprefix=linux414
_extramodules=extramodules-4.14-MANJARO
pkgbase=$_linuxprefix-virtualbox-modules
pkgname=("$_linuxprefix-virtualbox-host-modules") #"$_linuxprefix-virtualbox-guest-modules")
pkgver=6.1.6
pkgrel=1
_pkgver="${pkgver}_OSE"
arch=('i686' 'x86_64')
url='http://virtualbox.org'
license=('GPL')
depends=("$_linuxprefix")
groups=("$_linuxprefix-extramodules")
makedepends=("virtualbox-host-dkms>=$pkgver"
             "virtualbox-guest-dkms>=$pkgver"
             'dkms'
             "$_linuxprefix" "$_linuxprefix-headers")

prepare() {
  _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
  # dkms need modification to be run as user
  cp -r /var/lib/dkms .
  echo "dkms_tree='$srcdir/dkms'" > dkms.conf
}

build() {
  _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
  # build host modules
  msg2 'Host modules'
  dkms --dkmsframework dkms.conf build "vboxhost/$_pkgver" -k "$_kernver"
  # build guest modules  
#  msg2 'Guest modules'
#  dkms --dkmsframework dkms.conf build "vboxguest/$_pkgver" -k "$_kernver"
}

package_linux414-virtualbox-host-modules(){
  pkgdesc='Host kernel modules for VirtualBox'
  replaces=("$_linuxprefix-virtualbox-modules")
  conflicts=("$_linuxprefix-virtualbox-modules")
  provides=('VIRTUALBOX-HOST-MODULES')
  install=virtualbox-host-modules.install

  _kernver="$(cat /usr/lib/modules/$_extramodules/version)"

  install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
  cd "dkms/vboxhost/$_pkgver/$_kernver/$CARCH/module"
  install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
  find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-host-modules.install"

  mkdir -p "$pkgdir/etc/modules-load.d"
  echo "vboxdrv" > "$pkgdir/etc/modules-load.d/$_linuxprefix-virtualbox-host-modules.conf"
  echo "vboxnetadp" >> "$pkgdir/etc/modules-load.d/$_linuxprefix-virtualbox-host-modules.conf"
  echo "vboxnetflt" >> "$pkgdir/etc/modules-load.d/$_linuxprefix-virtualbox-host-modules.conf"
}

package_linux414-virtualbox-guest-modules(){
  pkgdesc='Guest kernel modules for VirtualBox'
  replaces=("$_linuxprefix-virtualbox-manjaro-modules")
  conflicts=("$_linuxprefix-virtualbox-manjaro-modules")
  provides=('VIRTUALBOX-GUEST-MODULES')
  install=virtualbox-guest-modules.install

  _kernver="$(cat /usr/lib/modules/$_extramodules/version)"

  install -dm755 "$pkgdir/usr/lib/modules/$_extramodules"
  cd "dkms/vboxguest/$_pkgver/$_kernver/$CARCH/module"
  install -m644 * "$pkgdir/usr/lib/modules/$_extramodules"
  find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
  sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extramodules'/" "$startdir/virtualbox-guest-modules.install"

  mkdir -p "$pkgdir/etc/modules-load.d"
  echo "vboxguest" > "$pkgdir/etc/modules-load.d/$_linuxprefix-virtualbox-guest-modules.conf"
  echo "vboxsf" >> "$pkgdir/etc/modules-load.d/$_linuxprefix-virtualbox-guest-modules.conf"
  echo "vboxvideo" >> "$pkgdir/etc/modules-load.d/$_linuxprefix-virtualbox-guest-modules.conf"
}



1 Like

Nice nice nice.

OK, so this is very likely a packaging issue, possibly because the guest modules need patching for 4.14...

If you uncomment the sections referring to the guest modules you can try a local build:

-pkgname=("$_linuxprefix-virtualbox-host-modules") #"$_linuxprefix-virtualbox-guest-modules")
+pkgname=("$_linuxprefix-virtualbox-host-modules" "$_linuxprefix-virtualbox-guest-modules")
-#  msg2 'Guest modules'
-#  dkms --dkmsframework dkms.conf build "vboxguest/$_pkgver" -k "$_kernver"
+  msg2 'Guest modules'
+  dkms --dkmsframework dkms.conf build "vboxguest/$_pkgver" -k "$_kernver"

I'll add this to my list of things to look at.

The question is, did you enjoy (or at least find oddly satisfying) the process of narrowing down the issue? :wink:

Enabling the guest module build will indeed result in a build error. I don have a build log, but I have this screenshot to share:

afbeelding

Sure, it is. :slight_smile:

1 Like

I've done some more digging and it looks like VirtualBox has dropped support for the various guest modules on kernels earlier than 4.16, and even then only the shared folder module exists (vboxsf). There's a mention about drivers being "upstreamed" so it's possible that the guest modules are already in the kernel.

Looking at 4.14.176 I can see several modules may already be present:

[root@fa178e0831fd 4.14.176-1-MANJARO]# find . -name "*vbox*"
./build/drivers/staging/vboxvideo
./build/include/config/drm/vboxvideo.h
./kernel/drivers/staging/vboxvideo
./kernel/drivers/staging/vboxvideo/vboxvideo.ko.xz
./kernel/misc/vboxdrv.ko.xz
./kernel/misc/vboxnetadp.ko.xz
./kernel/misc/vboxnetflt.ko.xz

which makes me think the guest modules simply aren't needed any more.

Could you try removing the existing linux414-virtualbox-guest-modules, reboot, and see whether things still work? If they're not automatically loaded, try manually loading e.g. modprobe vboxvideo , modprobe vboxguest ?

I'll play a bit more with the PKGBUILD to see if I can get vboxsf building.


Edit, nope, it won't build on anything lower than kernel 4.16. The module package probably needs removing from the repos, or a "dummy" package putting in place to prevent this from breaking systems.

Edit 2, I've pushed a "dummy" package (6.1.6+obsolete-1) which will remove the dead 4.14 module from systems with it installed. vboxsf simply won't compile with that kernel due to upstream changes.

Seems that someone updated VirtualBox for 414. I've to revert it once again. Seems I've to make it more clearer not to update based in given reasons.

I don't quite understand what you mean here.

VirtualBox is version 6.1.6 across all branches, how does that affect kernel 4.14?

Na I mixed it up with 4.19 series.

We have to see why the classic modules don't work. If still available in our repos, we should remove.

The vboxvideo, vboxdrv, vboxnetadp and vboxnetflt modules are all in the kernel tree. The only one which is out-of-tree is vboxsf and that one no longer builds on kernels 3.16-4.14.

All the package I uploaded does is removes vboxsf 6.1.4 from systems so it won't block boot. The naming should make it obvious it's obsolete, so when it's removed from the repos it won't be a surprise.

Well if the modules got backported, then the PKGBUILD of 4.19 should also apply to 4.14.

Yeah, I thought that too. Unfortunately it relies on certain kernel headers which have not been backported to 4.14, e.g.

It might still be possible to fix this but it would probably entail backporting an entire kernel driver tree too, and I don't really fancy that at the minute. :wink:

Then it is better to drop it. Should work also without vboxsf just fine.

It looks like the other one which is left stuck at 6.1.4 is linux316-virtualbox-guest-modules.

Are we just dropping them from the repos, or putting in an intermediary "dummy" package to fix any currently-broken systems?

I don't think that 316 has guest modules for a while now. We can add a dummy to make sure.

EDIT 1. Updating results in a bootable vm. thx! Autoscaling of the guest doesn work anymore, so I think I might need to upgrade the kernel.


@jonathon @philm Thanks for diving into this issue. Would have loved being able to dig into it that deep.
How do you generally approach this? Fire up a brand new linux414-manjaro environment and trying to build virtualbox from source? If you once have the time to write up your general debugging procedure, that might be really nice.

@jonathon Other noob question: Where is that magical package ~6.1.6+obsolete-1 located? I tried to find it in gitlab, but without avail.

A post was split to a new topic: Display scaling not working in Manjaro guest running kernel 5.2 in VirtualBox

The initial steps are exactly the same as this thread. The next step was using a clean build environment and stepping through the package build process, getting log output, noting errors, searching through upstream bug reports and source code trying to find the cause, etc. So essentially more of the same, just very focussed on this specific issue.

I didn't upload it as it's an empty package. The PKGBUILD sets the package name, version, description, and that's all it contains - all it's intended to do is remove the non-working vboxsf module. It will be removed from the repos in due course.

Thank you for your efforts!

Upgrading to "dummy" pkg for "linux414-virtualbox-guest-modules 6.1.6+obsolete-1" solved the problem I had for over a week of not being able to operate in anything other than terminal mode.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by