This morning, I blindly ran an Apt Upgrade. I know you shouldn’t do this blindly, but there it is.
The unexpected consequence of this was that my VirtualBox installation was suddenly unable to boot a guest machine, with the following error:
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please install virtualbox-dkms package and load the kernel module by executing modprobe vboxdrv as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
Normally when this occurs, you need to reinstall the virtualbox-dkms package in your current kernel, but that didn’t work either. Presumably, it’s not compatible with the newest kernel headers.
sudo apt-get install --reinstall virtualbox-dkms ... ERROR (dkms apport): kernel package linux-headers-5.3.0-22-generic is not supported Error! Bad return status for module build on kernel: 5.3.0-22-generic (x86_64) Consult /var/lib/dkms/virtualbox/5.2.32/build/make.log for more information.
Now on the Ubuntu systems I was used to, there was always an option in GRUB to revert to the previous Linux kernel. However, System76 and Pop!_OS no longer use GRUB, they use systemd-boot and a custom package called kernelstub.
Kernelstub has good documentation for a Linux man page, but I couldn’t find any actual examples of running the command in the wild. So here’s how I set Pop!_OS to revert to my previous kernel.
This example uses the -c option to run it as a dry run, but all I did was copy the existing options, and then set the -k to my previous vmlinuz version, and the -i to the previous initrd.
sudo kernelstub -v -l -s -o "quiet loglevel=0 systemd.show_status=false snd_hda_intel.probe_mask=1 splash" -k /boot/vmlinuz-[choose available version from /boot]-generic -i /boot/initrd.img-[choose available version from /boot]-generic