I am trying to compile VirtualBox Guest Additions for use in a Debian LiveISO project
While the compilation appears to go well, I am running into difficulty using the kernel modules and am unsure how to debug the problem.
Following the VirtualBox Linux Build Instructions, I use the following commands within a chroot (debian live-build chroot)
Code: Select all
apt-get install -y build-essential dkms linux-headers-amd64
apt-get install -y acpica-tools chrpath doxygen g++-multilib libasound2-dev libcap-dev \
libcurl4-openssl-dev libdevmapper-dev libidl-dev libopus-dev libpam0g-dev \
libpulse-dev libqt5opengl5-dev libqt5x11extras5-dev libsdl1.2-dev libsdl-ttf2.0-dev \
libssl-dev libvpx-dev libxcursor-dev libxinerama-dev libxml2-dev libxml2-utils \
libxmu-dev libxrandr-dev make nasm python3-dev python-dev qttools5-dev-tools \
texlive texlive-fonts-extra texlive-latex-extra unzip xsltproc \
default-jdk libstdc++5 libxslt1-dev linux-kernel-headers makeself \
mesa-common-dev subversion yasm zlib1g-dev
apt-get install -y lib32z1 libc6-dev-i386 lib32gcc1 lib32stdc++6
apt-get install -y wget
# Stage guest-additions
vboxversion=6.0.24
wget <<redacted>>virtualbox/$vboxversion/VirtualBox-$vboxversion.tar.bz2 -O /tmp/VirtualBox-$vboxversion.tar.bz2
tar -xjf /tmp/VirtualBox-$vboxversion.tar.bz2 -C /
cd /VirtualBox-$vboxversion
./configure
source ./env.sh
kmk VBOX_ONLY_ADDITIONS=1
cd ./out/linux.amd64/release/bin/additions/src
make install KERN_VER=4.19.0-11-amd64
Specifying KERN_VER is required as the host machine (Ubuntu 19.10) has a more recent kernel than the debian buster chroot.root@host:/VirtualBox-6.0.24/out/linux.amd64/release/bin/additions/src# ls
Makefile build_in_tmp vboxguest vboxguest.ko vboxsf vboxsf.ko vboxvideo vboxvideo.ko
During the 'make install' step, a few Warnings are generated that look like this:
I have modified the Makefile-footer.gmk files in an attempt to supply a version to depmod, but it has no affect on the "Warning: modules_install: missing 'System.map' file" issuemake[2]: Entering directory '/usr/src/linux-headers-4.19.0-11-amd64'
INSTALL /VirtualBox-6.0.24/out/linux.amd64/release/bin/additions/src/vboxguest/vboxguest.ko
DEPMOD 4.19.0-11-amd64
Warning: modules_install: missing 'System.map' file. Skipping depmod.
Code: Select all
bin/src/vboxdrv/Makefile-footer.gmk: PATH="$(PATH):/bin:/sbin"; echo cheepcheep; depmod -a 4.19.0-11-amd64 ; sync
bin/src/vboxpci/Makefile-footer.gmk: PATH="$(PATH):/bin:/sbin"; echo cheepcheep; depmod -a 4.19.0-11-amd64 ; sync
bin/src/vboxnetadp/Makefile-footer.gmk: PATH="$(PATH):/bin:/sbin"; echo cheepcheep; depmod -a 4.19.0-11-amd64 ; sync
vboxguest.ko, vboxsf.ko, vboxvideo.ko exist in /usr/lib/modules/4.19.0-11-amd64$ lsmod | grep vbox
$ vboxguest 40960 0
vboxvideo.ko exists in kernel/drivers/staging/vboxvideo/
vboxguest.ko exists in kernel/drivers/virt/vboxguest/
When I go to VirtualBox Machine Menu -> Session Information, it reports that I'm running Guest Additions 5.2.0 r68940
whereas the .ko file agrees with the version I downloaded & compiled : 6.0.24 (see above for download info)
Does anyone spot an error in my method? Do Guest Additions have dependencies on the full build?strings vboxguest.ko | grep version
7vboxguest: Successfully loaded version 6.0.24 (interface 0x00010004)
version=6.0.24 r139119
I appreciate any feedback / pointers. Thanks for reading