Can't install virtualbox ubuntu 18.04 secure boot enabled

Asked by MAshby on 2018-07-14

I have a fresh install of ubuntu 18.04.
I have not disabled secure boot.
I am attempting to install virtualbox from the ubuntu repos

The installer becomes stuck at the following point:

```
Setting up virtualbox-dkms (5.2.10-dfsg-6ubuntu18.04.1) ...
Loading new virtualbox-5.2.10 DKMS files...
Building for 4.15.0-23-generic
Building initial module for 4.15.0-23-generic
Generating a new Secure Boot signing key:
Generating a 2048 bit RSA private key
.....+++
.........+++
writing new private key to '/var/lib/shim-signed/mok/MOK.priv'
-----
```

Any ideas how to resolve this? I suspect this is some rubbish installer problem where it's now expecting user input but I can't supply any (typing does nothing).

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu virtualbox Edit question
Assignee:
No assignee Edit question
Last query:
2018-07-14
Last reply:
2018-07-17

Could try the deb from the virtualbox website.

Secure boot shouldn't make a difference installing virtualbox in Ubuntu as far as I know.

Post on the virtualbox forum too. They may be able to advise too.

MAshby (mfashby) said : #2

Unfortunately virtualbox is affected by secure boot, because it uses a kernel module, and they need to be signed to run under secure boot.
This guy shows how to sign it yourself when you install virtualbox from the virtualbox repos:
https://stegard.net/2016/10/virtualbox-secure-boot-ubuntu-fail/

It looks like the ubuntu package is trying to do this workaround itself:
Running `ps -aux` shows the following:

```
root 9524 0.0 0.0 72720 4276 pts/0 S+ 10:09 0:00 sudo apt install --reinstall virtualbox-dkms
root 9525 5.2 0.2 139316 81992 pts/0 R+ 10:09 0:00 apt install --reinstall virtualbox-dkms
root 10090 0.2 0.0 30452 7400 pts/2 Ss+ 10:09 0:00 /usr/bin/dpkg --status-fd 48 --configure --pending
root 10091 0.0 0.0 4628 812 pts/2 S+ 10:09 0:00 /bin/sh /var/lib/dpkg/info/virtualbox-dkms.postinst configure 5.2.10-dfsg-6ubuntu18.04.1
root 10092 0.0 0.0 4628 1648 pts/2 S+ 10:09 0:00 /bin/sh /usr/lib/dkms/common.postinst virtualbox 5.2.10 /usr/share/virtualbox-dkms 5.2.10-dfsg-6ubuntu18.04.1
root 10204 0.1 0.0 21840 5208 pts/2 S+ 10:09 0:00 /bin/bash /usr/sbin/dkms build -m virtualbox -v 5.2.10 -k 4.15.0-23-generic
root 10221 0.1 0.0 24052 6456 pts/2 S+ 10:09 0:00 /bin/bash /usr/sbin/dkms build -m virtualbox -v 5.2.10 -k 4.15.0-23-generic
root 11831 0.0 0.0 0 0 ? I 10:09 0:00 [kworker/3:0]
root 12801 0.0 0.0 0 0 ? I 10:09 0:00 [kworker/8:0]
root 13943 2.5 0.0 110616 22012 pts/2 S+ 10:09 0:00 /usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/update-secureboot-policy --enroll-key
root 13957 0.0 0.0 4628 1740 pts/2 S+ 10:09 0:00 /bin/sh /usr/sbin/update-secureboot-policy --enroll-key
root 13972 0.0 0.0 32300 4576 pts/2 S+ 10:09 0:00 whiptail --backtitle Package configuration --title Configuring Secure Boot --output-fd 12 --nocancel --msgbox Password input error The two
martin 13973 0.0 0.0 46780 3520 pts/1 R+ 10:09 0:00 ps -aux
```

It looks like some script is trying to update secure boot in some way, and is trying ( and failing ) to show me a dialog.

I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask MAshby for more information if necessary.

To post a message you must log in.