Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message if no BootOrder variable is there #7

Closed
paulepanter opened this issue Feb 16, 2014 · 1 comment
Closed

Improve error message if no BootOrder variable is there #7

paulepanter opened this issue Feb 16, 2014 · 1 comment

Comments

@paulepanter
Copy link

On my system there currently no variable BootOrder. The error message should be improved and maybe even suggest what the implications are. (This is an Asus U38N laptop with the latest UEFI version and using its interface I am unable to create any boot entries for some time now. No idea if it started after having deleted all other entries.)

$ sudo efibootmgr -V
version 0.6.1
$ git describe
Release_0_6_0-60-gb3deec9   
$ sudo efibootmgr -v
Timeout: 0 seconds
show_boot_order(): No such file or directory
$ ls -lh /sys/firmware/efi/vars/
insgesamt 0
drwxr-xr-x 2 root root 0 Feb 16 19:10 AcpiGlobalVariable-af9ffd67-ec10-488a-9dfc-6cbf5ee22c2e
drwxr-xr-x 2 root root 0 Feb 16 19:10 AEDID-75860b2c-f315-4ff1-9e19-029ad0129dba
drwxr-xr-x 2 root root 0 Feb 16 19:10 AmdAcpiVar-79941ecd-ed36-49d0-8124-e4c31ac75cd4
drwxr-xr-x 2 root root 0 Feb 16 19:10 AMIMemInfo-43387991-1223-7645-b5bb-aa7675c5c8ef
drwxr-xr-x 2 root root 0 Feb 16 19:10 AMITSESetup-c811fa38-42c8-4579-a9bb-60e94eddfb34
drwxr-xr-x 2 root root 0 Feb 16 19:10 ASUSSetupDefault-f1920447-7a78-4c0d-a028-ba9d003985e8
drwxr-xr-x 2 root root 0 Feb 16 19:10 ASUSTPType-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 BootOptionSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 ConInDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 ConOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 ConOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 CpuS3Resume-30b98b95-dfa3-4501-a3ce-e38c186384a0
drwxr-xr-x 2 root root 0 Feb 16 19:10 db-d719b2cb-3d3a-4596-a3bc-dad00e67656f
drwxr-xr-x 2 root root 0 Feb 16 19:10 dbx-d719b2cb-3d3a-4596-a3bc-dad00e67656f
drwxr-xr-x 2 root root 0 Feb 16 19:10 DefaultBootOrder-45cf35f6-0d6e-4d04-856a-0370a5b16f53
--w------- 1 root root 0 Feb 16 19:10 del_var
drwxr-xr-x 2 root root 0 Feb 16 19:10 DriverHealthCount-7459a7d4-6533-4480-bba7-79e25a4443c9
drwxr-xr-x 2 root root 0 Feb 16 19:10 DriverHlthEnable-0885f288-418c-4be1-a6af-8bad61da08fe
drwxr-xr-x 2 root root 0 Feb 16 19:10 ErrOut-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 ErrOutDev-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 FastEfiBootOption-b540a530-6978-4da7-91cb-7207d764d262
drwxr-xr-x 2 root root 0 Feb 16 19:10 FirstSetup-4c23059f-4137-4dd3-9c10-8b97a83ffdef
drwxr-xr-x 2 root root 0 Feb 16 19:10 FPDT_Variable-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 GPTHDD_PRESENT-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 HobRomImage-dde1bc72-d45e-4209-ab85-14462d2f5074
drwxr-xr-x 2 root root 0 Feb 16 19:10 KEK-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 Lang-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 LangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 LegacyGroup-a56074db-65fe-45f7-bd21-2d2bdd8e9652
drwxr-xr-x 2 root root 0 Feb 16 19:10 MDSMTBL-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemCeil.-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemChecksum-c3a4e49f-485f-4fd6-a2ea-2bc87455ad4b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemContext-c3a4e49f-485f-4fd6-a2ea-2bc87455ad4b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemContextNv-c3a4e49f-485f-4fd6-a2ea-2bc87455ad4b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemoryS3SaveNv-b1cfc482-4cb2-4cee-9b00-ce2579ec7186
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemoryS3SaveVol-0a51b41d-de21-43fe-be27-d6dbc9efd104
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemoryS3SaveVolLength-0a51b41d-de21-43fe-be27-d6dbc9efd104
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemoryTypeInformation-4c19049f-4137-4dd3-9c10-8b97a83ffdfa
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemRestoreConfigId-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemRestoreCpuId-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemRestoreSerialLength-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MemRestoreTime-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 ModuleVersion-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 MonotonicCounter-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 NBMemoryLength-490216c0-076a-44d3-a536-ace05c90e386
drwxr-xr-x 2 root root 0 Feb 16 19:10 NetworkStackVar-d1405d16-7afc-4695-bb12-41459d3695a2
--w------- 1 root root 0 Feb 16 19:10 new_var
drwxr-xr-x 2 root root 0 Feb 16 19:10 OA3MSDMvariable-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 OHCI1RestoreData-e966c438-b841-2d6e-8137-09b1f51e2d78
drwxr-xr-x 2 root root 0 Feb 16 19:10 OHCI2RestoreData-e966c438-b841-2d6e-8137-09b1f51e2d78
drwxr-xr-x 2 root root 0 Feb 16 19:10 OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 PK-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 PlatformLang-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 PlatformLangCodes-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 PreviousMemoryTypeInformation-4c19049f-4137-4dd3-9c10-8b97a83ffdfa
drwxr-xr-x 2 root root 0 Feb 16 19:10 RegisterPwrBtnHook-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 RSCInfoAddresss-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 S3SS-4bafc2b4-02dc-4104-b236-d6f1b98d9e84
drwxr-xr-x 2 root root 0 Feb 16 19:10 SbNvramVar-393c4833-402f-4bd5-bf5a-1f5cd8681444
drwxr-xr-x 2 root root 0 Feb 16 19:10 SB_USB_POINT-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 SetupCpuFeatures-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x 2 root root 0 Feb 16 19:10 Setup-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x 2 root root 0 Feb 16 19:10 SetupMode-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 SignatureSupport-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 SpdBypassData-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 SpdBypassSerial-01368881-c4ad-4b1d-b631-d57a8ec8db6b
drwxr-xr-x 2 root root 0 Feb 16 19:10 StdDefaults-4599d26f-1a11-49b8-b91f-858745cff824
drwxr-xr-x 2 root root 0 Feb 16 19:10 TcgInternalSyncFlag-f3ed95df-828e-41c7-bca0-16c41965a634
drwxr-xr-x 2 root root 0 Feb 16 19:10 Timeout-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 USBCHARGE_VAR-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x 2 root root 0 Feb 16 19:10 UsbMassDevNum-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x 2 root root 0 Feb 16 19:10 UsbMassDevValid-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
drwxr-xr-x 2 root root 0 Feb 16 19:10 USB_POINT-8be4df61-93ca-11d2-aa0d-00e098032b8c
drwxr-xr-x 2 root root 0 Feb 16 19:10 UsbSupport-ec87d643-eba4-4bb5-a1e5-3f3e36b20da9
@vathpela
Copy link
Contributor

I think you've put this on the wrong repo; you meant efibootmgr. I've fixed the problem there, though, so I'll go ahead and close this here.

hmtheboy154 added a commit to android-generic/external_efivar that referenced this issue Oct 8, 2023
Disable debugging will cause crash with a FORTIFY failure:

Abort message: 'FORTIFY: fprintf: null FILE*'
    rax 0000000000000000  rbx 0000000000000d14  rcx 00007c3d0749069f  rdx 0000000000000006
    r8  0000000000000000  r9  0000000000000000  r10 00007ffdefe13030  r11 0000000000000217
    r12 0000000000000000  r13 0000000000000000  r14 00007ffdefe13028  r15 0000000000000d14
    rdi 0000000000000d14  rsi 0000000000000d14
    rbp 000000000000009d  rsp 00007ffdefe13020  rip 00007c3d0749069f

backtrace:
      #00 pc 000000000005f69f  /apex/com.android.runtime/lib64/bionic/libc.so (abort+191) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)
      rhboot#1 pc 00000000000612f0  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+160) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)
      rhboot#2 pc 00000000000c5d9a  /apex/com.android.runtime/lib64/bionic/libc.so (fprintf+282) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)
      rhboot#3 pc 000000000002bc72  /system/bin/efibootmgr (log_+178) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#4 pc 000000000002ab87  /system/bin/efibootmgr (_format_acpi_dn+583) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#5 pc 0000000000029f63  /system/bin/efibootmgr (efidp_format_device_path+515) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#6 pc 000000000001a1a0  /system/bin/efibootmgr (show_vars+336) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#7 pc 0000000000018e3a  /system/bin/efibootmgr (main+7578) (BuildId: 0e8d9a0cd8994623ec86c1005c9d5e8b)
      rhboot#8 pc 0000000000050d19  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+89) (BuildId: cbf2c6babf4ce509f78a7963e811ace3)

So we need to bring debugging to Android. Our target to support is 11+ so we got memfd_create. Also
for fopencookie() we can use https://gitlab.com/Conan_Kudo/portable-fopencookie

This reverts commit 79c490e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants