Virtualbox broken after a dist-upgrade -- cannot install virtuabox-dkms nor run modprobe vboxdrv

Solution 1:

Update

Note:
- This guide will become irrelevant in the near future when proposed migrates to release.

  • 6.1.16-dfsg-6~ubuntu1.20.04.1 is now in the Store 'ubuntu-focal-updates-multiverse' and 5.8 kernel had a few updates with current 5.8.0-40-generic
    Should not be an issue if one keeps up with regular updates.

  • Suggested options 1 and 4 to have future automatic updates for VirtualBox.
  • Option 2, 3a, 3b manual installation does not include automatic future updates for VirtualBox.

Bug

  • [SRU] virtualbox 6.1.10-dfsg-1~ubuntu1.20.04.1 ADT test failure with linux-hwe-5.8 5.8.0-25.26~20.04.1
  • virtualbox 6.1.16-dfsg-6~ubuntu1.20.04.1 source package in Ubuntu

Installation of VirtualBox 6.1.16 on Ubuntu 20.04

Option 1 (Easy)

Pre-released updates (focal-proposed)

    • Open Software & Updates
    • Developer Options
    • select ✅ Pre-released updates (focal-proposed)
    • select Close
    • on Popup The information about available software is out-of-date
      select Reload
    • Open Software Updater
    • deselect all/any other updates except VirtualBox (which will include multiple packages in its subcategory)
    • select Install Now
    • Repeat step 1 to disable Pre-released updates (focal-proposed) You don't want to update other proposed updates unless you are familiar with what it entails.
      Ref. Testing/EnableProposed - Ubuntu Wiki, ProposedMigration - Ubuntu Wiki

Previous post

Bug virtualbox-dkms 6.1.10-dfsg-1~ubuntu1.20.04.1 fails to build with kernel 5.8
I followed @Terrance advice and installed 6.1.16 from the source.
My previous VMs are all working.

Edit: Per @BeastOfCaerbannog request/suggestion.


Installation of VirtualBox 6.1.16 on Ubuntu 20.04

Option 2 (Easy)

  • Go to Download VirtualBox for Linux Hosts
  • Under VirtualBox 6.1.16 for Linux
    Click Ubuntu 19.10 / 20.04
  • Open with GDebi Package Installer
  • Install Package

*if GDebi is not installed > go to Software Store and install it
*if Error: Conflicts with the installed package 'virtualbox-qt' > go to Software Store and Remove Virtualbox 6.1.10


Option 3 a. (Easy)

  • Go to Download VirtualBox for Linux Hosts
  • Under VirtualBox 6.1.16 for Linux
    Click Ubuntu 19.10 / 20.04
  • Save File in Downloads
  • Go to Downloads
  • Right Click downloaded package > Open With Software install (or double click, or select and enter/return)
  • Install

Option 3 b. (Advanced)

  • In Terminal
cd Downloads 
sudo apt install ./virtualbox-6.1_6.1.16-140961~Ubuntu~eoan_amd64.deb

or

sudo apt install ./v*  

Option 4 (Advanced)

Install Virtualbox by using the Virtualbox repos

 
thanks @Terrance

Solution 2:

Choose the latest working 5.4 kernel instead.

I have 20.04 and this worked for me:

sudo grub-reboot "1>4"

sudo reboot

Or just manually choose the 5.4 kernel at boot.

I guess this bug will be fixed for Ubuntus 5.8 kernel soon.