Discussion:
VirtualBox again
(too old to reply)
Doug Laidlaw
2022-12-22 19:55:40 UTC
Permalink
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.
David W. Hodgins
2022-12-23 07:31:34 UTC
Permalink
Post by Doug Laidlaw
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
<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
TJ
2022-12-23 14:36:09 UTC
Permalink
Post by David W. Hodgins
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.
I strongly suspect that Doug's original problem with dkms-virtualbox
came from being hit with https://bugs.mageia.org/show_bug.cgi?id=29830

If so, the command he gave will work around the situation, but it won't
"fix" it.

TJ
David W. Hodgins
2022-12-23 16:53:32 UTC
Permalink
Post by TJ
Post by David W. Hodgins
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.
I strongly suspect that Doug's original problem with dkms-virtualbox
came from being hit with https://bugs.mageia.org/show_bug.cgi?id=29830
If so, the command he gave will work around the situation, but it won't
"fix" it.
Ah. Yes, the backports problem.

For anyone who doesn't need the backports, I strongly recommend removing
the backports respositories information "urpmi.removemedia -y back".

The command "urpmq --not-available" can then be used to see which packages
if any should be considered for downgrading.

Regards, Dave Hodgins

Loading...