This entry is more along the lines of preparing your computer to reinstall the efi entries. It's also what you might find to be an effective and simple way to create a rescue disk following system installation on internal media (SSD, HDD).
With Linux Mint Tara (a Linux variant closely related to Ubuntu Bionic Beaver), the method both borked my installation, and made it possible later to save it. It arose out of my wanting a live USB having persistence, and since the time to install a utility like Unetbootin for a persistent install is roughly the same as a fresh install, I simply used the same live distribution to do an installation on the USB as was used to install the OS on the internal SSD.
Of course, none of this is RAID or any other specialized setup, but it did require a prepared volume partition on the USB drive, and an installation done on that USB using the distro's available method, circumventing the internal drive for an install on a single partition's root (/) mount.
This is where the new grub installation tangled with the internal drive. When I rebooted to the USB, the internal UEFI grub entries seemed to have disappeared, leaving only the grub menu when trying to select the drive using the entries in the BIOS menu.
Instead, booting from the USB showed that the distro's method had produced a ready-made grub menu, with a listing for the /dev/sda2, the partition containing the /boot/efi mount. In most primary internal drive installs the partition's grub name is hd0, gpt1.
Going into 'advanced', more than one kernel rescue was available. From there, run the grub utility and then boot normally.
From this point, running the OS on the internal drive which was formerly inaccessible, unplug the USB, then run sudo grub-install
.
When you reboot without the USB, you should be able to get back in.
At this point the USB is configured to launch the internal drive into normal or rescue mode, and the drive has its own menu.
I had trouble with my dual boot: Windows 10/PCLinuxOS laptop. I somehow lost the grub2 loader or the functionality. After trying many of the above contortions unsuccessfully I stumbled on the Grub2 Boot Rescue iso, burned it to a cd and left it in the drive. It was a little tedious to go through the boot process every time but at least it worked. Then I found the Boot Repair Disk iso and burned it to a DVD. At this point my drive was really flaky from my efforts so I reformatted and reinstalled everything, Windows 10 and Mint Sonya this time. Then booted Boot Repair Disk and installed Grub2 ov – Keith Krehbiel – 2017-12-11T15:24:30.033