Ubuntu 16 executing grub-install dev/sda failed

I was playing with new Ubuntu distribution the other night and ran in to this weird error  “grub-install dev/sda failed” alongside other issues caused by secure boot and new Ubuntu 16.04 kernel changes

Secure Boot is signing system that in theory makes your computer more resistant to some avenues of attack(if properly managed) but can also cause persistent headache.

Lets look at how to tackle these new changes.

Error “executing grub-install dev/sda failed” During Ubuntu 16.04 install

I got USB image with Ubuntu 16.04 and started the setup process but as things got underway following error message kept coming up “executing grub-install dev/sda failed”. After some troubleshooting I realized this was not ans issue with partitioning, it was something I have not seen before.

In general there can be few reasons behind this issue:

  1. Installer is trying to create GRUB partition on the wrong disk
  2. Secure boot is not enabled and lack of UEFI is causing issues with creating bootloader

First is more common, when prompted to select partitioning open advanced settings and look at where GRUB will be created, make sure partition is correct.

Sometimes when booting from USB, system may assign /sda to the flash drive and then attempts to write bootloader on the usb. You will need to create a partition for GRUB, use another port on your computer or boot from DVD to do the install.

Option number two is less common but can be very confusing, because only changes to BIOS will resolve the issue.

Open your bios and find secure boot option, it is usually located in advanced settings under boot.

My motherboard had two options “Secure Boot Windows” or “Other OS”, I selected first one and Ubuntu installed without an issue but you may need to turn it back off once installation is complete, read below to  understand why.

Ubuntu 16.04 Virtual Box Kernel driver not installed (rc=-1908)

If you also happen to run Virtual Box on Ubuntu 16.04 there is potentially another surprise waiting, when you try start your virtual machine.

I go this error message:

Result Code: NS_ERROR_FAILURE (0x80004005)

Kernel driver not installed (rc=-1908)
Please install the virtualbox-dkms package and execute ‘modprobe vboxdrv’ as root.

Unfortunately running “sudo modprobe vboxdrv” did not help I get another error that vboxdrv is missing a key. This is caused by same  Secure boot system that uses keys to authorize processes before they are started, but can also prevent things like Virtual Box from starting.

You can create a key but before you do that consider disabling that Secure Boot setting. Same setting I discussed in part one of this article. It needed to be on for install now prevents Virtual Box from running. So reboot, disable Secure Boot and Virtual box will run without problem.

It is possible that you have different issue and I will provide links to other articles that may help you.