10.14.x Upgrade "Installation Failed" fix

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
OffTrack
Posts: 2
Joined: 30. Oct 2020, 02:07

10.14.x Upgrade "Installation Failed" fix

Post by OffTrack »

Hopefully this will solve the problems quite a few users appear to be having with VBox and Mojave.
This is slightly different to the Installation Failed on a new install in that the kexts are already authorised but still won't load.

I ran into the "Installation failed" and "failed to load kernel driver" problems after updating from 6.10 to 6.16 last night.
Attempting to revert to 6.10 didn't solve the issue.

After a lot of digging I finally found a solution in this Github issue 2373 for Karabiner-Elements.
The forum won't let me post a link so you'll have to google for it.

The problem is caused by incorrect permissions or flags on the directories under /private/var/db/ used for staging kexts.

Code: Select all

/private/var/db/KernelExtensionManagement
/private/var/db/KernelExtensionManagement/Staging
Both folders must have 755 (drwxr-xr-x ) permissions and the "restricted" flag set.

Code: Select all

ls -lO /private/var/db/
drwxr-xr-x@   3 root  wheel  restricted   96 26 Sep 11:32 KernelExtensionManagement

Code: Select all

ls -lO /private/var/db/KernelExtensionManagement
total 0
drwxr-xr-x  2 root  wheel  restricted 64 30 Oct 10:59 Staging
When I checked the Staging folder did not have the restricted flag set.
To fix the problem you need to boot into recovery then set the correct permissions and flags as required.

Code: Select all

chmod 755 /Volumes/<your boot drive>/private/var/db/KernelExtensionManagement
chmod 755 /Volumes/<your boot drive>/private/var/db/KernelExtensionManagement/Staging
chflags restricted /Volumes/<your boot drive>/private/var/db/KernelExtensionManagement
chflags restricted /Volumes/<your boot drive>/private/var/db/KernelExtensionManagement/Staging
sztokbant
Posts: 3
Joined: 27. Oct 2020, 08:32

Re: 10.14.x Upgrade "Installation Failed" fix

Post by sztokbant »

Thank you so much, this did it for me!
invasifspecies
Posts: 1
Joined: 28. Jan 2021, 01:39

Re: 10.14.x Upgrade "Installation Failed" fix

Post by invasifspecies »

Simply deleting the KernalExtensionManagement folder worked for me too. The virtualbox installer seems to recreate it with the right permissions and you don't have to boot into recovery mode.
OffTrack
Posts: 2
Joined: 30. Oct 2020, 02:07

Re: 10.14.x Upgrade "Installation Failed" fix

Post by OffTrack »

invasifspecies wrote:Simply deleting the KernalExtensionManagement folder worked for me too. The virtualbox installer seems to recreate it with the right permissions and you don't have to boot into recovery mode.
You can't delete these folders from macOS unless SIP has been disabled.

Another thing I didn't run into at the time of the original post is a Filevault protected disk.
If the disk is encrypted with Filevault;
- boot into recovery mode
- open Disk Utility and mount the drive
- open terminal
then proceed with the chflag commands.
nwcasebolt
Posts: 1
Joined: 20. May 2021, 01:14

Re: 10.14.x Upgrade "Installation Failed" fix

Post by nwcasebolt »

OffTrack wrote:To fix the problem you need to boot into recovery then set the correct permissions and flags as required.
This resolved my problem and allowed me to finish installation after two hours of trying multiple fixes. Thank you for saving my head from insertion into my monitor.
Post Reply