Re: linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type

From: Fernando_Apesteguía <fernando.apesteguia_at_gmail.com>
Date: Sun, 07 May 2023 11:26:34 UTC
El dom, 7 may 2023 11:43, Steven Friedrich <freebsdlouisville@gmail.com>
escribió:

> On 5/7/23 1:57 AM, Kevin Oberman wrote:
> > On Sat, May 6, 2023 at 9:47 PM Steven Friedrich
> > <freebsdlouisville@gmail.com> wrote:
> >
> >     On a fresh install of freebsd 13.2 (I did make a new kernel, but I'm
> >     running GENERIC for this.
> >
> >     I used pkg install to get virtualbox-ose.  When I try to load the
> >     vboxdrv.ko, I get this error:
> >
> >     KLD vboxdrv.ko: depends on kernel - not available or version mismatch
> >     linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type
> >
> >     FreeBSD freebsd.friedrich.org <http://freebsd.friedrich.org>
> >     13.2-RELEASE FreeBSD 13.2-RELEASE
> >     releng/13.2-n254617-525ecfdad597 GENERIC amd64
> >
> >
> > And here we go again...
> >
> > The packages are built on 13.1-RELEASE which means the package will
> > not load on 3.2. You need to have a system with the 3.2
> > kernel sources and then build the .ko on that system. It does not need
> > to be the system it is to be run on, but must be an amd64 processor.
> > The resulting package may be installed on any other 13.2 amd64 system.
> >
> > To build the package, get the sources for the kernel on the build
> > system. Then:
> > cd /usr/ports/emulators/virtualbox-ose-kmod
> > pkg install kBuild (if not already installed)
> > pkg install llvm14 (if not already installed)
> > make package (if you want to install on another system)
> > make install (on the system you need it on)
> >
> > In the last status report, this issue was being addressed, so  I am
> > hopeful that this is the last time the issue will show up, but no
> > promises. In any case, the builds will be done on 13.2 when 13.1 goes
> EOL.
> > --
> > Kevin Oberman, Part time kid herder and retired Network Engineer
> > E-mail: rkoberman@gmail.com
> > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
>
> Thank you, Kevin.  I just finished buildworld, build kernel,
> installkernel, and installworld.
>
> I just built/installed the virtualbox-ose-kmod port.
>
> Can I just rebuild/install the kernel?
>

You can set PORTS_MODULES in /etc/make.conf so every time you build a new
kernel, the ports that need to be in sync are built too.

Cheers


> --
> FreeBSD freebsd.friedrich.org 13.2-RELEASE FreeBSD 13.2-RELEASE
> releng/13.2-n254617-525ecfdad597 GENERIC amd64
>
>
>