Trying to build Virtualbox from source

Discussions related to using VirtualBox on Linux hosts.
Post Reply
jradxl
Posts: 8
Joined: 20. Oct 2014, 14:56

Trying to build Virtualbox from source

Post by jradxl »

Ubuntu Jammy
VirtualBox-6.1.38.tar.bz2

mokutil --sb-state
SecureBoot disabled


I follow these instruction and with minor modifications, they work
https://www.virtualbox.org/wiki/Linux%2 ... structions

At the end I need to build the kernel modules...

Code: Select all

cd out/linux.x86/release/bin/src
make
sudo make install
which works, but the vboxdrv does not load

modprobe -v vboxdrv
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.19.5-051905-generic

Clearly they are....

Code: Select all

/usr/lib/modules/5.19.5-051905-generic/misc# ls -al
total 7000
drwxr-xr-x 1 root root     104 Sep 16 19:20 .
drwxr-xr-x 1 root root     584 Sep 16 20:32 ..
-rwxr-xr-x 1 root root 5622352 Sep 16 20:23 vboxdrv.ko
-rwxr-xr-x 1 root root  442584 Sep 16 20:23 vboxnetadp.ko
-rwxr-xr-x 1 root root  797896 Sep 16 20:23 vboxnetflt.ko
Can you help?
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Trying to build Virtualbox from source

Post by fth0 »

Looks like they are not: /usr/lib/modules != /lib/modules
jradxl
Posts: 8
Joined: 20. Oct 2014, 14:56

Re: Trying to build Virtualbox from source

Post by jradxl »

They are all symlinks
# ls -al /
total 24
drwxr-xr-x 1 root root 192 Sep 16 14:01 .
drwxr-xr-x 1 root root 192 Sep 16 14:01 ..
lrwxrwxrwx 1 root root 7 May 21 16:46 bin -> usr/bin
lrwxrwxrwx 1 root root 7 May 21 16:46 lib -> usr/lib
lrwxrwxrwx 1 root root 9 May 21 16:46 lib32 -> usr/lib32
lrwxrwxrwx 1 root root 9 May 21 16:46 lib64 -> usr/lib64
lrwxrwxrwx 1 root root 10 May 21 16:46 libx32 -> usr/libx32
lrwxrwxrwx 1 root root 8 May 21 16:46 sbin -> usr/sbin

I think a
depmod -a
is necessary, so I've got a bit further
jradxl
Posts: 8
Joined: 20. Oct 2014, 14:56

Re: Trying to build Virtualbox from source

Post by jradxl »

Eventually I got a build of both virtualbox and the vbox* modules
And with a my own version of /etc/init.d/virtualbox
I can load the drivers

But when starting virtualbox I get "Kernel driver not accessible" when starting a linux guest.
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Trying to build Virtualbox from source

Post by fth0 »

I'd suggest to use strace for further analysis ...
Post Reply