After re-emerging (upgrading) VirtualBox, it prompts '/etc/init.d/vboxdrv setup' rather than 'emerge -1 virtualbox-modules' when starting an existed virtual machine. Reproducible: Always
Which package is this? app-emulation/virtualbox or app-emulation/virtualbox-bin? What exactly did you do to trigger this message?
According to my /var/log/emerge.log: 1. I first installed virtualbox (on Sep 15) by the following command: # emerge --ask --verbose virtualbox which emerged 41 packages, including: app-emulation/virtualbox-additions-4.1.26 app-emulation/virtualbox-modules-4.1.26 app-emulation/virtualbox-4.1.26 app-emulation/virtualbox-extpack-oracle-4.1.26 2. Then I started VirtualBox and created a virtual machine (and installed Windows). 3. After that, when I upgrade the whole system (on Oct 22) by the following command: # emerge --ask --update --verbose --newuse --with-bdeps=y --deep @world which upgraded above packages from 4.1.26 to 4.2.18. 4. When I tried to start my virtual machine again, it failed and suggested me to run "/etc/init.d/vboxdrv setup". However there is no file named '/etc/init.d/vboxdrv'. 5. It kept failed until I tried to re-emerge the app-emulation/virtualbox-modules.
Please post the puzzling output in a comment, in its entirety.
Thanks, Jeroen. Here goes the dialog message: RTR3InitEx failed with rc=-1912 (rc=-1912) The VirtualBox kernel modules do not match this version of VirtualBox. The installation of VirtualBox was apparently not successful. Executing '/etc/init.d/vboxdrv setup' may correct this. Make sure that you do not mix the OSE version and the PUEL version of VirtualBox.
please post the output of emerge -Oqpv virtualbox virtualbox-modules to this bug.
# emerge -Oqpv virtualbox virtualbox-modules [ebuild R ] app-emulation/virtualbox-4.2.18 USE="additions alsa doc extensions opengl pam pulseaudio qt4 sdk -headless -java -python -vboxwebsrv -vnc" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" [ebuild R ] app-emulation/virtualbox-modules-4.2.18 USE="-pax_kernel"
Did you unload the old virtualbox kernel modules and load the new ones? The ebuild is not doing this for you.
Yes, I probably did that (restarted my desktop and chose another kernel). Actually, what I really want to report is that the message "/etc/init.d/vboxdrv setup" from VirtualBox is a little misleading in Gentoo system. That command works fine in other distro such as Ubuntu. However, Gentoo need another command "emerge -1 virtualbox-modules" to do the same thing (recompile the kernel modules). This should be *trivial*, because it only occurs when kernel version changed or app-emulation/virtualbox updated (without app-emulation/virtualbox-modules re-emerged). Sorry about the confusing for my bad expression.
Thanks. Now I know how to reproduce this. I gonna work on a patch soon.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4818de7348b27c11ecc3a9ff68bc97eb5b75030e commit 4818de7348b27c11ecc3a9ff68bc97eb5b75030e Author: Viorel Munteanu <ceamac@gentoo.org> AuthorDate: 2022-11-08 17:56:31 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2022-11-20 08:16:37 +0000 app-emulation/virtualbox: fix wrong message about modules Replace `/etc/init.d/vboxdrv setup` with `emerge -1 virtualbox-modules` Closes: https://bugs.gentoo.org/489208 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> app-emulation/virtualbox/virtualbox-7.0.4.ebuild | 5 +++++ 1 file changed, 5 insertions(+)