On Thu, 22 Dec 2022 14:55:40 -0500, Doug Laidlaw <
[email protected]> wrote:
Once again, the kernel driver for VirtualBox refused to run.This time, I found a simple fix that worked. It was on a Ubuntu forum, so I have converted it to suit Mageia:
<CODE>
urpme dkms-virtualbox && urpmi dkms-virtualbox
</CODE>
(For any lurkers, the "&&" ensures that the second command will not run unless the first command completes normally.)
That was it. Nothing else needed changing.
I haven't seen a need for that. Removing and re-installing the package would not change any of the packaged files. All it would do is run the preuninstall scriptlet, and then after replacing the packaged files run the postinstall scriptlet.
Those scripts are ...
# rpm -q --scripts dkms-virtualbox
postinstall scriptlet (using /bin/sh):
set -x
/usr/sbin/dkms --rpm_safe_upgrade add -m virtualbox -v 7.0.4-1.mga8
if [ -z "$DURING_INSTALL" ] ; then
/usr/sbin/dkms --rpm_safe_upgrade build -m virtualbox -v 7.0.4-1.mga8 &&
/usr/sbin/dkms --rpm_safe_upgrade install -m virtualbox -v 7.0.4-1.mga8 &&
/sbin/rmmod vboxnetflt &>/dev/null
/sbin/rmmod vboxnetadp &>/dev/null
/sbin/rmmod vboxdrv &>/dev/null
/sbin/modprobe vboxdrv &>/dev/null
/sbin/modprobe vboxnetflt &>/dev/null
/sbin/modprobe vboxnetadp &>/dev/null
:
fi
preuninstall scriptlet (using /bin/sh):
if [ "$1" = "0" ]; then
/sbin/rmmod vboxnetadp >/dev/null 2>&1
/sbin/rmmod vboxnetflt >/dev/null 2>&1
/sbin/rmmod vboxdrv >/dev/null 2>&1
fi
set -x
/usr/sbin/dkms --rpm_safe_upgrade remove -m virtualbox -v 7.0.4-1.mga8 --all || :
# fix guest-additions upgrade from init scripts to systemd services
====================================
The only time such a procedure would make a difference is if the prior installation of the dkms-virtualbox had failed in it's postinstall scriptlet.
The most likely causes of that are not having the kernel-$flavor-devel-latest package (where $flavor matches the flavor of the running kernel such as desktop,
server, etc.) installed for the current kernel.
Regards, Dave Hodgins
--- MBSE BBS v1.0.8.2 (Linux-x86_64)
* Origin: A noiseless patient Spider (2:250/1@fidonet)