I try to run my VM's on the newest oracle virtualbox 7.0 with kenel 5.19.0-28-generic x86_64, on linux mint 21.1. I successfully installed oracle's virtualbox 7.0, but when I try to run my VM's, I get the error "Kernel driver not installed (rc=-1908)". Now, I know that is because I have secure boot enable and need to signed the keys for UEFI secure boot to load the drivers. I have not found a clean and standard way to do the MOK (Machine Owners Key), procedure on linux that I seen on google's searches, and some are incomplete or do not work, when I try oracles's virtualbox 7 and run a VM. And, there is no way to know what latest kernel will work with the latest oracle virtualbox. I also found this https://forums.virtualbox.org/viewtopic ... 7&t=107289 post from agaskew, about a comflict of gcc compiler versions and location, if this helps. So, can some one, give a clear and simple english steps to do the MOK procedure, and help me understand the post I found, please? I not an expert but I know a little more than a novice. I'm including his posting here, see below.
Rudolf-CZ wrote:Re: VM not starting when using Linux kernel 6.0
by agaskew » 16. Nov 2022, 22:43
This isn't pretty, but it worked for me.
I had this error with VirtualBox 7 and Kernel 6.0.8 on Linux Mint:
7/9The VirtualBox Linux kernel driver is either not loaded or not set up correctly....etc
I reran 'sudo /sbin/vboxconfig' manually and it failed to build the kernel module. Checked
the log file /var/log/vbox-setup.log. The log file indicated syntax errors with the gcc
command, and at the top was a warning that the 6.0.8 kernel had been built with gcc version
12 whereas the system was still using gcc version 11.
Installed gcc-12 via 'sudo apt get gcc-12'
Deleted /usr/bin/gcc as its just a symlink to /usr/bin/gcc-11 and recreated it via 'sudo ln -s
/usr/bin/gcc-12 /usr/bin/gcc'. Checked the version of gcc being called is correct via 'gcc --
version' - result shows 'gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0'
After that I moved /var/log/vbox-setup.log out of the way, reran 'sudo /sbin/vboxconfig' and
this time no errors were generated.
Finally my Guest VMs would run.
God bless you! This was exactly my issues a Virtualbox works flawlessly since then (Kernel
5.19.17 & Virtualbox 6.1.40). Just to add existing symlink could be directly changed by using
"-f" so using "sudo ln -s /usr/bin/gcc-12 /usr/bin/gcc -f" so deleting is not required.