I have read Signing Virtualbox modules with EFI Secure Boot enabled. The procedure described there does not work as described with the --reinstall step. There is no detailed prompt. Note that VMware Workstation Pro that also must install kernel modules seems to do the required operations "automagically".
The machine does not have an option in bios to enable legacy boot but requires secure boot. Ubuntu 22.04 LTS booted when first installed on the machine using a blank drive (the OEM MS Windows drive was removed and a blank new drive was installed before installing Ubuntu), and the kernel has been updated whenever Software Updater suggests to do so (typically as a security update) without issue.
However, Virtualbox kernel modules are rejected and Virtualbox is NOT operational. I have not tried the instructions in the above URL concerning mok
because the sudo apt-get install virtualbox-dkms --reinstall
command did NOT address the issue. (The claimed: The installer prompted me to create the certificate, setup password for in MOK and gave clear instructions to reboot and enroll the certificate in MOK -- did NOT appear). I do not want to make the machine "unbootable".
Is there a virtualbox installation package that solves this issue? If not, are there detailed instructions, "step by step", known to work? Any detailed help, including references/URLs with explicit instructions, greatly would be appreciated. This must be a typical issue with Ubuntu on secure boot systems that need to install kernel modules (e.g., Nvidia proprietary kernel drivers).
After the above question was posted, I have found
How To Install VirtualBox On Ubuntu 20.04 that contains a section "NOTE: UEFI Secure Boot Enabled"
with the steps "Enroll MOK » Continue » Yes » Enter Password (you have set earlier) » Reboot". Is the above 20.04 set of commands still correct for 22.04? Will these solve the issue?