In the first day of new 2016 year I tried to boot my HP laptop with Fedora. Little surprise: black screen after UEFI boot menu. Hmm, maybe the hardware is broken? I run the RAM and disks tests from standard HP suite and after 5 minutes they report: memory and hard drive is OK. Strange situation. Next step: connect HDD to my desktop, renew backups and check errors with
fsck tool – no effect.
I’m in a bad mood after the other bad news – the same story with LiveCD: it also can’t start. After this I start thinking about near service centers, but something in my mind says “strange ’cause this laptop never has a problem” and try to remember my last work on this machine.
I disabled my hard drive and try to boot from USB – system starts correctly in BIOS mode! Logs were absolutely clear without errors and problems. The conclusion is simple – this is the UEFI startup problem.
After 5-10 attempts my LiveCD was started casually in UEFI-mode. I run
efibootmgr and can’t believe to my eyes:
# efibootmgr BootCurrent: 0000 Timeout: 0 seconds Boot0000* Notebook Hard Drive Boot0002* Notebook Ethernet Boot0003* Fedora ... ... 120(!) records "Fedora"
Problem is detected: UEFI can’t start the OS immediately because need to check 120+ boot records!
Boot0003* Fedora HD(1,GPT,2bab38e7-5a34-4693-a7a0-e4b517d91268,0x800,0x64000)/File(\EFI\fedora\shim.efi)
How to fix it
I delete all the duplicates:
# efibootmgr -b "NUMBER OF ENTRY" -B
And my Fedora boot successfully from hard drive. But this is not the end: after every reboot new one
Fedora entry adds to my UEFI boot menu! I don’t known how to fix it. If you have an idea – feel free to write in comments. And yes, you need right now to install and run
efibootmgr in all your UEFI hardware and check the boot entries.
Wish the good hardware and software to everyone in 2016!
Fallback.efi every time create new boot record. Quotes from Fedora Wiki:
The EFI program /boot/efi/EFI/BOOT/fallback.efi will look for files called BOOT.CSV in your ESP and will add boot entries corresponding to them, if such entries do not already appear to exist. shim provides a BOOT.CSV file that will add an entry for grub2-efi for you. So just using the EFI Shell to invoke fallback.efi should do the trick.
If you have no boot entries at all, then just booting off your disk in UEFI mode should automatically invoke /boot/efi/EFI/BOOT/BOOTX64.EFI, which will, in turn, invoke fallback.efi.