While upgrading or installing linux OS from one version to another you might end up in below error. In my case, I tried to install linux mint 20 (Ulyana), and faced the error. Note: I have already disabled secure boot in my laptop.
I have downloaded Linux mint 20 ISO from their website and made it bootable with Rufus software. Attached USB to laptop and installed Linux Mint 20. Installation gave no errors but at the end, it showed above error. I tried installing “Linux mint 20” multiple times but ended up in the same error.
When it gave the error, don’t click on OK. Just leave that error dialog box as it is. Remember you are in OS booted from the live USB. It has “Boot-Repair” app. Open it and click on advanced options on the initial screen. You may also directly click “Recommended repair” to check and resolve any grub issues.
I have used advanced options. Under Grub options tab, “Secure Boot” option was enabled (first option) by default. I have unchecked it and continued the steps. When prompted, Open terminal and run the commands shown on the screen. Once done, it prompts you whether or not to download grub and also to upload the data to pastebin. I clicked no for everything. Once done, I have restarted the system. It booted properly without any issues.
Note: When you click ok for the grub install failed message, nothing works in the live usb OS. Apps like terminal, firefox etc crash no matter how many times you open them. So, don’t click ok. Leave it as is and use boot-repair app.
More information about boot-repair can be found here: https://help.ubuntu.com/community/Boot-Repair