Bug 31009

Summary: EFI install failure: Could not prepare Boot variable: Function not implemented
Product: Mageia Reporter: Frank Griffin <ftg>
Component: InstallerAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: release_blocker CC: mageia
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:
Attachments: Zipped report.bug

Description Frank Griffin 2022-10-23 20:16:34 CEST
bug#31008 documents an EFI failure in grub install and suggests a workaround.  However, when I use the workaround, I get the following error:

Error: <Installing for x86_64-efi platform.
Could not prepare Boot variable: Function not implemented
grub2-install: error: efibootmgr failed to register the boot entry: input/output error
       ...propagated at /usr/lib/libDrakX/any.pm line 278

Any ideas on further information ?

Tagging as release-blocker based on the status of bug#31008 .
Comment 1 Lewis Smith 2022-10-23 20:28:20 CEST
Thanks for the report.
Assigning to tools people re the Installer.

Assignee: bugsquad => mageiatools

Comment 2 Martin Whitaker 2022-10-24 23:40:00 CEST
After the failure, switch to the debug console using Ctrl-Alt-F2, insert a formatted USB stick in a spare socket, and enter the command "bug". That will write a "report.bug" file to the USB stick. Compress that file and attach it to this bug report.

CC: (none) => mageia

Comment 3 Frank Griffin 2022-10-25 22:21:39 CEST
Created attachment 13450 [details]
Zipped report.bug

report.bug.zip as requested.
Comment 4 Martin Whitaker 2022-10-29 12:46:03 CEST
Have you previously installed Mageia 8 on this machine without any such problem?

Can you use your BIOS to manually select and boot from the \EFI\mageia\grubx64.efi file? If so, after booting Mageia 9, what's the output from (as root) 'efibootmgr -v'?

If that's not possible, try selecting the option to install GRUB in \EFI\BOOT when configuring GRUB in the installer.
Comment 5 Frank Griffin 2022-10-29 22:26:14 CEST
(In reply to Martin Whitaker from comment #4)
> Have you previously installed Mageia 8 on this machine without any such
> problem?

No, I've always been cauldron-only.

> 
> Can you use your BIOS to manually select and boot from the
> \EFI\mageia\grubx64.efi file? If so, after booting Mageia 9, what's the
> output from (as root) 'efibootmgr -v'?

No, unfortunately.

> 
> If that's not possible, try selecting the option to install GRUB in
> \EFI\BOOT when configuring GRUB in the installer.

That actually worked, sort of.  It boots, and immediately stalls for several minutes before putting out the message that the timeout for some UUID has been reached, but then the boot proceeds normally.  Actually, doing the install/update to get back to the summary screen, grub/ESP(EFI) is now selected automatically, and I just had to check "boot from EFI" on the first subpanel.

Booting this way, there's no efibootmgr in the root path.
Comment 6 Martin Whitaker 2022-10-30 00:11:35 CEST
If it has never worked before, it seems likely that your machine does not support writing to the EFI NVRAM from the OS. To test that, install efibootmgr and try rewriting the boot order.
Comment 7 Frank Griffin 2022-10-31 20:56:29 CET
It's not that it never worked before, it always worked under previous cauldrons.  However, I haven't had the machine in service for quite a while, and I can't swear that it ever worked with UEFI as opposed to legacy boot.
Comment 8 Martin Whitaker 2022-10-31 21:37:11 CET
Well, the way to test would be to try to install Mageia 8 in UEFI mode. If that runs into the same problem, it's likely you never used UEFI before.
Comment 9 Frank Griffin 2022-10-31 21:43:29 CET
I'll try that.  Just out of curiosity, did we drop legacy boot and if so why ?
Comment 10 Martin Whitaker 2022-10-31 21:45:35 CET
No, legacy boot is still supported. It's your BIOS that chooses which mode to boot in.
Comment 11 Martin Whitaker 2022-11-12 14:31:09 CET
Without evidence to the contrary, I'm assuming this is a genuine limitation of the BIOS on your machine, so closing. Feel free to reopen if you can show it works with Mageia 8 or with another distribution.

Resolution: (none) => INVALID
Status: NEW => RESOLVED