The first two are probably duplicate files. I don't know about the third; it could be another duplicate or it could be something Lenovo-specific.
Background: The EFI spec says that each OS should install its boot loader in a subdirectory of the EFI
directory on the ESP, as in EFI/Microsoft
for Windows or EFI/ubuntu
for Ubuntu. The EFI/BOOT
directory is a special case: It holds a boot loader (bootmgfw.efi
) that serves as a fallback in case all others fail. That's also the name that's used for boot loaders on removable media like USB flash drives. Thus, many OSes, including Windows, install two copies of their boot loaders -- once in the official directory and again as EFI/BOOT/bootx64.efi
. GRUB tends to pick these both up and present them as options, because they can be different boot loaders, even though they often are not.
This is complicated by Boot Repair. Old versions of this program, and new ones if you select a certain option in the Advanced menu, back up both the EFI/Microsoft/Boot/bootmgfw.efi
and the EFI/BOOT/bootx64.efi
boot loaders (by renaming them with bkp
placed at the start of the filename) and place copies of GRUB in their place. This is done to work around bugs in some EFIs. The problem is that this creates additional boot loader files, which can clutter menus and add to confusion when doing manual maintenance. Unless you need to use this backup-and-replace hack because of a broken EFI, I recommend that you not let Boot Repair make this change. Note, however, that this has not caused the duplication you've noted, although it has affected the filenames that GRUB has entered on its chainloader
lines.
Personally, I'd remove the EFI/BOOT/bkpbootx64.efi
(or EFI/BOOT/bootx64.efi
) entry, since it could conceivably be changed to something else should some other tool decide to take over that spot. Hijacking the Windows boot loader is a little less likely -- although because of the EFI bug I've noted, at least two tools (Boot Repair and rEFInd's mvrefind.sh
script) can do this, and others may do so in the future.
A tip: The diff
command is your friend. Pass it two filenames and it will tell you if they're identical or not. No output indicates that the files are identical. You can use this to discover which .efi
files on your system are identical to which other files.