Solved /out/freebsd.amd64/debug/bin/src/vboxdrv/vboxdrv.ko.debug: No such file or directory

Hello.

it's again me that I'm trying to install VirtualBOX on FreeBSD 13.1-RELEASE. I see that the procedure to install it is changed on FreeBSD 13.1. Now I should install virtualbox-ose-kmod instead of virtualbox-ose,as explained here :

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264066

First of all I tried to install virtualBOX from the packages,but it failed : (yes,some time ago I've upgraded from 13.0-RELEASE)

Code:
# pkg install virtualbox-ose

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        virtualbox-ose: 6.1.34
        virtualbox-ose-kmod: 6.1.34_1

Number of packages to be installed: 2

The process will require 168 MiB more space.

Proceed with this action? [y/N]: y
[1/2] Installing virtualbox-ose-kmod-6.1.34_1...
[1/2] Extracting virtualbox-ose-kmod-6.1.34_1: 100%
[2/2] Installing virtualbox-ose-6.1.34...
===> Creating groups.
Using existing group 'vboxusers'.
===> Creating users
Using existing user 'vboxusers'.
[2/2] Extracting virtualbox-ose-6.1.34: 100%
Building cache database of MIME types
=====
Message from virtualbox-ose-kmod-6.1.34_1:

--
The vboxdrv kernel module uses internal kernel APIs.

To avoid crashes due to kernel incompatibility, this module will only
load on FreeBSD 13.0 kernels.
=====
Message from virtualbox-ose-6.1.34:

--
VirtualBox was installed.

You need to load the vboxdrv kernel module via /boot/loader.conf:

vboxdrv_load="YES"

You also have to add all users to your vboxusers group in order to use vbox.

% pw groupmod vboxusers -m jerry

Reboot the machine to load the needed kernel modules.


Bridging Support:
=================

For bridged networking please add the following line to your /etc/rc.conf:

vboxnet_enable="YES"


USB Support:
============

For USB support your user needs to be in the operator group and needs read
and write permissions to the USB device.

% pw groupmod operator -m jerry

Add the following to /etc/devfs.rules (create if it doesn't exist):

[system=10]
add path 'usb/*' mode 0660 group operator

To load these new rule add the following to /etc/rc.conf:

devfs_system_ruleset="system"

Then restart devfs to load the new rules:

% /etc/rc.d/devfs restart


Troubleshooting:
================

Running VirtualBox as non-root user may fail with a fatal error
NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file.

If you experience "Network: write Failed: Cannot allocate memory" errors
try to increase net.graph.maxdata in /boot/loader.conf

If you are using AIO, then increase these limits (PR#168298):
vfs.aio.max_buf_aio=8192
vfs.aio.max_aio_queue_per_proc=65536
vfs.aio.max_aio_per_proc=8192
vfs.aio.max_aio_queue=65536
To check if AIO is used use: kldstat -v | grep aio

When assigning IP addresses in host-only mode from ranges outside
of VirtualBox's defaults, the respective ranges need to be listed
in /usr/local/etc/vbox/networks.conf (PR#259399).

Check wiki page for known issues and troubleshooting:
http://wiki.freebsd.org/VirtualBox

Please report any problems to emulation@. Thanks!


BUT UNFORTUNATELY :


# chown root:vboxusers /dev/vboxnetctl
chown: /dev/vboxnetctl: No such file or directory

# kldload vboxdrv

pid 8020 (VirtualBoxVM), jid 0, uid 1001: exited on signal 6
pid 8267 (VirtualBoxVM), jid 0, uid 1001: exited on signal 6
pid 8484 (VirtualBoxVM), jid 0, uid 1001: exited on signal 6
pid 8519 (VirtualBoxVM), jid 0, uid 0: exited on signal 6 (core dumped)
pid 9423 (VirtualBoxVM), jid 0, uid 0: exited on signal 6 (core dumped)
Limiting closed port RST response from 202 to 200 packets/sec
KLD vboxdrv.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type

SO I DID :

Code:
pkg remove virtualbox-ose
cd /usr/ports/emulators/virtualbox-ose-kmod
make clean deinstall reinstall

....

===>  Staging for virtualbox-ose-kmod-6.1.34_1
===>   Generating temporary packing list
/bin/mkdir -p /usr/ports/emulators/virtualbox-ose-kmod/work/stage/boot/modules
install  -m 555 /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-6.1.34/out/freebsd.amd64/debug/bin/src/vboxdrv/vboxdrv.ko /usr/ports/emulators/virtualbox-ose-kmod/work/stage/boot/modules
install  -m 555 /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-6.1.34/out/freebsd.amd64/debug/bin/src/vboxdrv/vboxdrv.ko.debug /usr/ports/emulators/virtualbox-ose-kmod/work/stage/boot/modules
install: /usr/ports/emulators/virtualbox-ose-kmod/work/VirtualBox-6.1.34/out/freebsd.amd64/debug/bin/src/vboxdrv/vboxdrv.ko.debug: No such file or directory
*** Error code 71

Stop.
make[1]: stopped in /usr/ports/emulators/virtualbox-ose-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/emulators/virtualbox-ose-kmod

No idea about what to do here.
 
I've resetted the build options with these commands :

Code:
cd /usr/ports/emulators/virtualbox-ose
make rmconfig

and the UI for selecting the compile options came up when I tried to build it again,but this time unfortunately another error stopped the making :

Code:
====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
@marietto:/usr/ports/emulators/virtualbox-ose # make install
===>  Installing for virtualbox-ose-6.1.34
===>  Checking if virtualbox-ose is already installed
actual-package-depends: dependency on /usr/local/bin/vde_switch not registered (normal if it belongs
to base)
pkg-static: DEBUG: -/

===>   Registering installation for virtualbox-ose-6.1.34
pkg-static: pkg_checksum_hash_sha256_file(read failed): Is a directory
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/emulators/virtualbox-ose
*** Error code 1

I've fixed this error,by selecting only the default values for virtualbox. I suspect that if I select the VDE option it gives that error.
 
The solution for building a vboxdrv.ko module for freebsd 13.1 is the following :

Code:
cd /use/ports/emulators/virtualbox-ose-kmod
make deinstall
make install clean
 
Could you provide a step-by-step solution to this issue? (after having installed virtualbox-ose package)
I am still not clear if the installed package needs to be deleted from the system first.
Thanks.
 
Back
Top