anúncios

Mostrando postagens com marcador SecureBoot. Mostrar todas as postagens
Mostrando postagens com marcador SecureBoot. Mostrar todas as postagens

domingo, 26 de maio de 2019

Resolvendo o problema Kernel driver not installed no VirtualBox

Se após instalar o VirtualBox, criar a máquina virtual (VM) e ao tentar iniciar a VM ocorrer o erro seguinte:
"Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing '/sbin/vboxconfig' as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information. where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT."

Desde a versão do kernel Linux 4.4.0-20, foi obrigado que os módulos do kernel sem estar assinados não poderão ser executados com o Secure Boot ativado. Caso você deseja manter o Secure Boot habilitado, então precisa seguir os procedimentos a seguir para assinar esses módulos.

Antes, verifique com o comando seguinte:
$ mokutil --sb-state
SecureBoot enabled

Se estiver como SecureBoot e quiser continuar habilitado para usar VMs no VirtualBox, então segue os procedimentos.

1. openssl req -new -x509 -newkey rsa:2048 -keyout vboxdrv.priv -outform DER -out vboxdrv.der -nodes -days 36500 -subj "/CN=MySelf/"

2. sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./vboxdrv.priv ./vboxdrv.der $(modinfo -n vboxdrv)

3. tail $(modinfo -n vboxdrv) | grep "Module signature appended"

4. sudo mokutil --import vboxdrv.der

5. Reiniciar e aplicar o MOK no boot com o password do item 4.

Perform MOK management
Enroll MOK
Continue
Yes
Password (definido no item 4)
OK

6. mokutil --test-key MOK.der

Carregar o módulo vboxdrv
sudo modprobe vboxdrv

Caso não queira, pode desativar a validação com o comando seguinte:
$ sudo mokutil --disable-validation
Ou desabilitar o SecureBoot

Referências
https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur

Feito!