As with Maxine, I found my UEFI settings in BIOS to get damaged and my machine wouldn't boot.
In my case, it's a Lenovo ThinkServer RD430 with Linux Mint Debian and it seemed anything I'd do about update-grub or changing any hard drives in the server would cause it to not boot. OS in my case is linuxmint-201403-mate-dvd-64bit installed via USB. (see below for a complete description of the events that would cause UEFI to not work)
Going through exactly the same steps on a ThinkServer TS140 did not result in UEFI losing its mind even once. Looked at RD430 driver page and my bios is two versions old. I have never had to update bios on a motherboard before, so I'm not one to automatically update when there are new versions available. After updating the bios, Maxine's answer above worked, only with a twist...
# efibootmgr -c --disk /dev/sdX --part Y
# efibootmgr -v
Timeout: 1 seconds
Boot0000* linuxmint HD(1,800,1f4000,829f6cc9-5b17-479c-b3ea-61e43faecbf7)File(\EFI\linuxmint\grubx64.efi)
Boot0001* LMDE Linux Mint Debian HD(1,800,15d505800,934c598c-fe3c-fd43-84a1-fa38e4f72552)File(\EFI\linuxmint\grubx64.efi)
Boot0002* Linux HD(1,800,1f4000,829f6cc9-5b17-479c-b3ea-61e43faecbf7)File(\elilo.efi)
Boot0003* UEFI: Built-in EFI Shell Vendor(5023b95c-db26-429b-a648-bd47664c8012,)AMBO
Boot0004* UEFI: VerbatimSTORE N GO 1.00 ACPI(a0341d0,0)PCI(1a,0)USB(1,0)USB(4,0)HD(1,80,1d70780,00000000)AMBO
mint / #
efibootmgr -c command added two entries
Boot0002* Linux HD entry first in boot order is not correct.
0000 entry is correct.
To test this, I tried booting without any interruption, which is the
0002 entry. As expected, it didn't work. So I restarted the server, hit F12, and chose
linuxmint. As hoped for, it did boot to my LMDE installation.
The way to remove unwanted entries via efibootmgr is:
# efibootmgr -b 2 -B
I used this command to remove entries
0001 was from the last of my many attempts to recover the OS.
If you're reading this and as frustrated with UEFI as I am/was, here are some notes and resources:
» Booting to UEFI Shell is akin to using a DOS shell.
» Intel made a PDF reference manual for efi shell commands.
» Lenovo's UEFI_on_TS430 document is the only resource I have seen explaining usage of efi shell.
» Another uefi shell reference from nPartition Administrator's Guide.
» You can try booting to a partition from the efi shell by navigating to the loader and executing it.
» UEFI wants the disk to have a GPT partition table, not msdos part table.
» UEFI wants the first partition on your disk to be formatted fat32 or vfat.
» For a "generic" boot there must be a
/EFI/boot directory at the root with
bootx64.efi in it.
» Some people copy their
grubx64.efi from where it was installed to
/EFI/boot/bootx64.efi and this cheat worked for them.
» Anytime you make grub changes, use
efibootmgr -v before and after to ensure your reboot is ok.
My RD430 experience
I have resinstalled the OS 10+ times in the past week trying to sort this out and set up the server. My configuration is a SSD on this RAID controller in the PCIe 2.0 slot with LMDE installed on it. AOC-S3008L-L8i RAID controller (reflashed to IT mode) in the 2nd PCIe 3.0 slot with 6x 3TB drives. RAM: 12GB ECC (3x 4GB).
Here are changes I would make that caused my system to not boot:
» Change S3008L-L8i pci slots (leaving the SSD+card alone).
» Disable the LSi software raid bios prompt for onboard controller.
» Add my old HighPoint RocketRaid card to an open PCIe slot.
» Make a change to
/etc/default/grub and then run
grub-install needs to be run as well?)