UEFI Secureboot Hell

Spent a really long time yesterday trying to figure out how to edit UEFI boot options after my old Intel Core 2 Duo desktop refused to boot up on intstalling LinuxMint 18.3.

Had to learn more than I had bargained for about the EFI FAT32 partition at /dev/sda1 to fix it.
The efibootmgr command proved to be a lifesaver. And so did the script provided in this superuser.com post. May the person who wrote it live long and prosper.