Bug 31008 - Mageia-9-alpha1-x86_64.iso : grub2-install failed : EFI variables are not supported on this system : efibootmgr failed
Summary: Mageia-9-alpha1-x86_64.iso : grub2-install failed : EFI variables are not sup...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker major
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-23 01:11 CEST by PC LX
Modified: 2022-11-05 18:27 CET (History)
4 users (show)

See Also:
Source RPM: drakx-installer-stage2
CVE:
Status comment: fixed in drakx-installer-stage2-18.51


Attachments
Install report. (354.59 KB, application/gzip)
2022-10-23 01:12 CEST, PC LX
Details
Screen shot of error messages. (134.60 KB, image/png)
2022-10-23 01:12 CEST, PC LX
Details

Description PC LX 2022-10-23 01:11:41 CEST
Description of problem:

Installing from the image Mageia-9-alpha1-x86_64.iso (Sat Oct 22 09:14:15 PM CEST 2022) in to a QEMU/KVM (EFI) virtual machine fails at the final stages when setting up the EFI boot loader with the messages "EFI variables are not supported on this system" and "efibootmgr failed to register a boot entry: file or directory does not exist".

See attached screenshot image and report.



Version-Release number of selected component (if applicable):

Mageia-9-alpha1-x86_64.iso (Sat Oct 22 09:14:15 PM CEST 2022)



How reproducible:

Always.



Steps to Reproduce:
1. Setup a QEMU/KVM virtual machine.
2. Boot from Mageia-9-alpha1-x86_64.iso (Sat Oct 22 09:14:15 PM CEST 2022).
3. Add a HTTP repository (don't know if this is relevant, may not be needed).
4. Install to a virtual drive.
Comment 1 PC LX 2022-10-23 01:12:09 CEST
Created attachment 13438 [details]
Install report.
Comment 2 PC LX 2022-10-23 01:12:28 CEST
Created attachment 13439 [details]
Screen shot of error messages.
Comment 3 Martin Whitaker 2022-10-23 13:27:06 CEST
This occurs because the Linux 6.0 kernel has removed the old and deprecated interface to the EFI variables which was previously found at /sys/firmware/efi/vars. The new way to access the EFI variables is to mount the efivarfs filesystem at /sys/firmware/efi/efivars, but this is not done by the installer.

The temporary workaround is to wait until the installer reaches the Summary screen, then switch to the debug console by pressing Ctrl-Alt-F2 (or emulating that key press if you are using QEMU), entering the command

  mount -t efivarfs none /mnt/sys/firmware/efi/efivars

then switching back to the installer GUI by pressing Ctrl-Alt-F7 and continuing with the installation.

CC: (none) => mageia
Priority: Normal => release_blocker
Assignee: bugsquad => mageiatools
Source RPM: (none) => drakx-installer-stage2

Comment 4 Thomas Backlund 2022-10-23 15:01:23 CEST
Interestingly it might/should work if you choose refind as bootloader as that already checks for efivars being mounted :)
Comment 5 Thomas Backlund 2022-10-23 15:08:03 CEST
ah, its part of write_refind_previous_boot_var(), so need more work.

I guess we should factor out that checking/mounting/unmounting efivarfs and hook it into needed places...
Comment 6 Frank Griffin 2022-10-23 18:59:43 CEST
(In reply to Martin Whitaker from comment #3)
> This occurs because the Linux 6.0 kernel has removed the old and deprecated
> interface to the EFI variables which was previously found at
> /sys/firmware/efi/vars. The new way to access the EFI variables is to mount
> the efivarfs filesystem at /sys/firmware/efi/efivars, but this is not done
> by the installer.
> 
> The temporary workaround is to wait until the installer reaches the Summary
> screen, then switch to the debug console by pressing Ctrl-Alt-F2 (or
> emulating that key press if you are using QEMU), entering the command
> 
>   mount -t efivarfs none /mnt/sys/firmware/efi/efivars
> 
> then switching back to the installer GUI by pressing Ctrl-Alt-F7 and
> continuing with the installation.

When I do this I get the following error during bootloader installation:

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

CC: (none) => ftg

Comment 7 Martin Whitaker 2022-10-23 19:40:28 CEST
(In reply to Frank Griffin from comment #6)
> When I do this I get the following error during bootloader installation:
> 
> 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

That would appear to be a different issue. Best open a new bug report for that.
Martin Whitaker 2022-10-24 23:18:41 CEST

Status comment: (none) => fix added in git

Ulrich Beckmann 2022-10-25 13:58:02 CEST

CC: (none) => bequimao.de

Comment 8 PC LX 2022-10-25 14:42:00 CEST
(In reply to Martin Whitaker from comment #3)
>   mount -t efivarfs none /mnt/sys/firmware/efi/efivars

That command solved the issue. The installation completed correctly and the system booted to a working Plasma desktop, after entering the username/password. 

Thanks.
Comment 9 Daniel Tartavel 2022-10-25 18:07:52 CEST
I confirm the bug on Mageia9-alpha1 iso when installing on efi x86_64 system

CC: (none) => contact

Comment 10 Martin Whitaker 2022-10-29 14:05:23 CEST
The fix will be include in the next ISO build.

Status comment: fix added in git => fixed in drakx-installer-stage2-18.51

Comment 11 Martin Whitaker 2022-11-05 18:27:15 CET
This was fixed in the second round of alpha1 ISOs, dated Sat Oct 29 07:52:30 PM CEST 2022.

I have just retested and confirmed the fix.

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


Note You need to log in before you can comment on or make changes to this bug.