rhboot / efibootmgr

efibootmgr development tree
GNU General Public License v2.0
519 stars 99 forks source link

No BootOrder is set; firmware will attempt recovery #54

Closed perfect7gentleman closed 8 years ago

perfect7gentleman commented 8 years ago

With new efibootmgr-13 there some bugs:

~ $ sudo efibootmgr
No BootOrder is set; firmware will attempt recovery
~ $ sudo efibootmgr -V
version unknown (fix Makefile!)
~ $ sudo efibootmgr -v -v
Could not read variable 'BootNext': No such file or directory
error trace:
 efivarfs.c:230 efivarfs_get_variable(): open(/sys/firmware/efi/efivars/BootNext-8be4df61-93ca-11d2-aa0d-00e098032b8c): No such file or directory
 lib.c:145 efi_get_variable(): ops->get_variable failed: No such file or directory
Could not read variable 'BootCurrent': No such file or directory
error trace:
 efivarfs.c:230 efivarfs_get_variable(): open(/sys/firmware/efi/efivars/BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c): No such file or directory
 lib.c:145 efi_get_variable(): ops->get_variable failed: No such file or directory
Could not read variable 'Timeout': No such file or directory
error trace:
 efivarfs.c:230 efivarfs_get_variable(): open(/sys/firmware/efi/efivars/Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c): No such file or directory
 lib.c:145 efi_get_variable(): ops->get_variable failed: No such file or directory
Could not read variable 'BootOrder': No such file or directory
error trace:
 efivarfs.c:230 efivarfs_get_variable(): open(/sys/firmware/efi/efivars/BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c): No such file or directory
 lib.c:145 efi_get_variable(): ops->get_variable failed: No such file or directory
 efibootmgr.c:363 read_order(): efi_get_variable failed: No such file or directory
No BootOrder is set; firmware will attempt recovery
Could not read variable 'MirrorCurrent': No such file or directory
error trace:
 efivarfs.c:230 efivarfs_get_variable(): open(/sys/firmware/efi/efivars/MirrorCurrent-7b9be2e0-e28a-4197-ad3e-32f062f9462c): No such file or directory
 lib.c:145 efi_get_variable(): ops->get_variable failed: No such file or directory
Could not read variable 'MirrorRequest': No such file or directory
error trace:
 efivarfs.c:230 efivarfs_get_variable(): open(/sys/firmware/efi/efivars/MirrorRequest-7b9be2e0-e28a-4197-ad3e-32f062f9462c): No such file or directory
 lib.c:145 efi_get_variable(): ops->get_variable failed: No such file or directory
 ~ $ ls -all /sys/firmware/efi/vars/
total 0
drwxr-xr-x 84 root root 0 Aug 20 09:18 .
drwxr-xr-x  5 root root 0 Aug 20 08:58 ..
drwxr-xr-x  2 root root 0 Aug 20 09:09 AcpiGlobalVariable-af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e
drwxr-xr-x  2 root root 0 Aug 20 09:09 AfterReadyToBoot-7b77fb8b-1e0d-4d7e-953f-3980a261e077
drwxr-xr-x  2 root root 0 Aug 20 09:09 AMITSESetup-c811fa38-42c8-4579-a9bb-60e94eddfb34
drwxr-xr-x  2 root root 0 Aug 20 09:09 ASUSMEUPDATE-65bd31bb-6d07-48af-be32-e4859b0dd421
drwxr-xr-x  2 root root 0 Aug 20 09:09 BiosEventLog-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 Boot0004-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 BootCurrent-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 BootFromUSB-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 BootOptionSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 BootOrder-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 CMOSfailflag-c89dc9c7-5105-472c-a743-b1621e142b41
drwxr-xr-x  2 root root 0 Aug 20 09:09 ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 ConInDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 CPUS3APICID-1456cc6e-22ac-5289-33ba-2e13bbdabaee
drwxr-xr-x  2 root root 0 Aug 20 09:09 db-d719b2cb-3d3a-4596-a3bc-dad00e67656f
drwxr-xr-x  2 root root 0 Aug 20 09:09 dbx-d719b2cb-3d3a-4596-a3bc-dad00e67656f
drwxr-xr-x  2 root root 0 Aug 20 09:09 DefaultBootOrder-45cf35f6-0d6e-4d04-856a-0370a5b16f53
--w-------  1 root root 0 Aug 20 09:09 del_var
drwxr-xr-x  2 root root 0 Aug 20 09:09 EPUflag-f61b2305-aac3-4c9d-8f25-3a4313f9cc0e
drwxr-xr-x  2 root root 0 Aug 20 09:09 ErrOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 ErrOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 FanCalibrateFlag-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 FastBootOption-b540a530-6978-4da7-91cb-7207d764d262
drwxr-xr-x  2 root root 0 Aug 20 09:09 FirstBootFlag-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 FPDT_Variable-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x  2 root root 0 Aug 20 09:09 FTMActiveFlag-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 HiiDataSize-5d6b998a-e304-4088-9087-130c917fb1ae
drwxr-xr-x  2 root root 0 Aug 20 09:09 HiiDB-1b838190-4625-4ead-abc9-cd5e6af18fe0
drwxr-xr-x  2 root root 0 Aug 20 09:09 HobRomImage-dde1bc72-d45e-4209-ab85-14462d2f5074
drwxr-xr-x  2 root root 0 Aug 20 09:09 IccAdvancedSetupDataVar-7b77fb8b-1e0d-4d7e-953f-3980a261e077
drwxr-xr-x  2 root root 0 Aug 20 09:09 IccLockDefault-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 IccOcFlag-ec5ff312-bb97-465a-94fd-c84c2cb80e53
drwxr-xr-x  2 root root 0 Aug 20 09:09 IccRollingFlag-f8dbe9b1-e2ee-42d6-820f-a54b06ebf9d1
drwxr-xr-x  2 root root 0 Aug 20 09:09 InBiosSetupFlag-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 KEK-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 LangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 LastBoot-b540a530-6978-4da7-91cb-7207d764d262
drwxr-xr-x  2 root root 0 Aug 20 09:09 MeEndOfPostFlag-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 MemoryFreq-58cd8089-e2d9-4b84-88b8-3da497dba390
drwxr-xr-x  2 root root 0 Aug 20 09:09 MemoryTypeInformation-4c19049f-4137-4dd3-9c10-8b97a83ffdfa
drwxr-xr-x  2 root root 0 Aug 20 09:09 MonotonicCounter-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x  2 root root 0 Aug 20 09:09 NetworkStackVar-d1405d16-7afc-4695-bb12-41459d3695a2
--w-------  1 root root 0 Aug 20 09:09 new_var
drwxr-xr-x  2 root root 0 Aug 20 09:09 NvHdd0-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 NvHdd1-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 NvHdd2-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 NvHdd4-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 NVRAM_Verify-15a9dd61-e4f8-4a99-80db-353b13d76490
drwxr-xr-x  2 root root 0 Aug 20 09:09 OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 PK-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 PNP0400_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
drwxr-xr-x  2 root root 0 Aug 20 09:09 PNP0400_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
drwxr-xr-x  2 root root 0 Aug 20 09:09 PNP0501_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
drwxr-xr-x  2 root root 0 Aug 20 09:09 PNP0501_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
drwxr-xr-x  2 root root 0 Aug 20 09:09 PNP0510_0_NV-560bf58a-1e0d-4d7e-953f-2980a261e031
drwxr-xr-x  2 root root 0 Aug 20 09:09 PNP0510_0_VV-560bf58a-1e0d-4d7e-953f-2980a261e031
drwxr-xr-x  2 root root 0 Aug 20 09:09 PreVgaInfo-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 PreviousMemoryTypeInformation-4c19049f-4137-4dd3-9c10-8b97a83ffdfa
drwxr-xr-x  2 root root 0 Aug 20 09:09 RSCInfoAddresss-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x  2 root root 0 Aug 20 09:09 S3SS-4bafc2b4-02dc-4104-b236-d6f1b98d9e84
drwxr-xr-x  2 root root 0 Aug 20 09:09 SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupACPIRAM-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupAPMFeatures-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupDetectMode-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 Setup-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupEntry-2485da8e-ded2-42cb-acb0-3ce666c55f0c
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupHWMFeatures-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupHWMOneof-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 SignatureSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 StdDefaults-4599d26f-1a11-49b8-b91f-858745cff824
drwxr-xr-x  2 root root 0 Aug 20 09:09 TcgInternalSyncFlag-f3ed95df-828e-41c7-bca0-16c41965a634
drwxr-xr-x  2 root root 0 Aug 20 09:09 Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x  2 root root 0 Aug 20 09:09 USB_POINT-c811fa38-42c8-4579-a9bb-60e94eddfb34
drwxr-xr-x  2 root root 0 Aug 20 09:09 UsbSupport-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x  2 root root 0 Aug 20 09:09 VARSTORE_OCMR_SETTINGS_NAME-c05fba7d-7a92-49e0-bcee-233b14dca803
drwxr-xr-x  2 root root 0 Aug 20 09:09 VARSTORE_OCMR_TIMING_SETTINGS_NAME-93c483a1-d3fa-4e92-b437-733b2a346e23
drwxr-xr-x  2 root root 0 Aug 20 09:09 WriteOnceStatus-4b3082a3-80c6-4d7e-9cd0-583917265df1
vathpela commented 8 years ago

You've shown me /sys/firmware/efi/vars/ but the log has efivar using /sys/firmware/efi/efivars/ - is the file also there?

I'm suspecting there's a kernel bug here where they're not identical for some reason.

perfect7gentleman commented 8 years ago

there is nothing in /sys/firmware/efi/efivars/

~ $ zcat /proc/config.gz | grep -i efi
CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
# CONFIG_EFI_MIXED is not set
CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE=y
# CONFIG_FB_EFI is not set
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# EFI (Extensible Firmware Interface) Support
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
# CONFIG_EFI_FAKE_MEMMAP is not set
CONFIG_EFI_RUNTIME_WRAPPERS=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFIVAR_FS is not set
# CONFIG_EARLY_PRINTK_EFI is not set
# CONFIG_EFI_PGT_DUMP is not set

i think 'CONFIG_EFIVAR_FS is not set' causes the bug, amiright?

vathpela commented 8 years ago

Give it a try with a libefivar built with that patch?

benkohler commented 8 years ago

Saw the same issue here and this patch appears to fix the problem for me

vathpela commented 8 years ago

(Also people should really be migrating to CONFIG_EFIVAR_FS)

murilolobato commented 6 years ago

I'm having the error message described in the title of this issue, and I've read all the comments here, but I yet didn't understand what I must do to fix, or workaround, this problem.

adansoILT commented 5 years ago

Have the same issue on Oracle Linux on Raspberry Pi 3b+ but no sure how to fix it. Anyone?