How to Repair Grub

Last time, installing Windows stopped my Ubuntu from booting-up. After some research, I managed to fix the boot-loader. I thought it might be worth sharing my experience for those who may face the same problem.

First of all, you need a live cd or bootable USB stick of any flavor of Linux distribution. For example, Ubuntu, Mint, or Fedora can be used.

Unable to choose GRUB menu choice after reboot

I've discovered a weird problem with my Linux Mint-system (Linux Mint 18).
After rebooting my system (or restarting as well) I got the GRUB menu, but my keyboard is not responding...
So I have to wait for the timeout to get my system booted.

The keyboard is wired to the computer through an USB-connection. So it's not wireless.
And it works OK as soon as my system has booted.. (?).

I have installed/loaded Linux kernel 4.4.142, 4.4.143 and 4.4.145.
When running kernel 4.4.142 Virtualbox and VMWare Workstation works as it should, but when I try to use 4.4.143 or 4.4.145 they both refuse to load.
So I want to be able to choose which kernel to run depending on what I want to do.. :-)