Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jul 2024 11:41:13 +0200
From:      Piotr Smyrak <ps.ports@smyrak.com>
To:        freebsd-ports@freebsd.org
Cc:        Greg 'groggy' Lehey <grog@freebsd.org>, Graham Menhennitt <graham@menhennitt.com.au>
Subject:   Re: VirtualBox kmod won't load "module already loaded or in kernel"
Message-ID:  <20240724114113.280de5fc@daleth.home>
In-Reply-To: <ZpnfhbR7_UPp0iMq@hydra.lemis.com>
References:  <03fb09bb-d695-4bec-8c68-0365e3a79497@menhennitt.com.au> <ZpnfhbR7_UPp0iMq@hydra.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Jul 2024 13:37:41 +1000
Greg 'groggy' Lehey <grog@freebsd.org> wrote:

> On Friday, 19 July 2024 at 13:23:46 +1000, Graham Menhennitt wrote:
> > Hello all,
> >
> > I'm running FredBSD 14.1 amd64 with a GENERIC kernel. I've installed
> > VirtualBox from packages. But I can't load any of its kmod modules.
> > When I try, I get a message:
> > =C2=A0=C2=A0=C2=A0 # kldload vboxdrv
> > =C2=A0=C2=A0=C2=A0 kldload: can't load vboxdrv: module already loaded o=
r in kernel
> > =C2=A0=C2=A0=C2=A0 #
> > However, neither of those things is true:
> > =C2=A0=C2=A0=C2=A0 # kldstat -v|grep -i virtualbox
> > =C2=A0=C2=A0=C2=A0 # =20
>=20
> Yes.  It lies.  It's VB's inimitable way of saying "you have the wrong
> module version for this kernel".  It should be sufficient to rebuild
> the virtualbox-ose-kmod port.  Don't install the package, because it
> doesn't know what kernel you have.

It's worth to note that there is a systematic solution to rebuild ports
that install kernel modules each time a new kernal is installed from
sources. Placing such a line in /etc/make.conf will induce rebuilding
of kmod port by system Makefiles:

PORTS_MODULES +=3D emulators/virtualbox-ose-kmod

HTH,
--=20
 Piotr Smyrak



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240724114113.280de5fc>