Bug 32133 - Mageia 9 installation fail during grub2 setup due to failure to write to EFI NVRAM
Summary: Mageia 9 installation fail during grub2 setup due to failure to write to EFI ...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High critical
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-23 17:54 CEST by Cyril Levet
Modified: 2023-08-25 10:13 CEST (History)
2 users (show)

See Also:
Source RPM: kernel-6.4.3-1.mga9
CVE:
Status comment:


Attachments

Description Cyril Levet 2023-07-23 17:54:58 CEST
Description of problem: I try to install Mageia 9 RC1 on an old ASUS ROG using Classic ISO and live Plasma ISO. Both of them failed at the same point. The bootloader configuration failed with the following error :
grub2-install failed: Installation pour la plate-forme x86_64-efi.
Could not prepare Boot variable: No space left on device.
grub2-install : erreur : efibootmgr n'a pas réussi à enregistrer l'entrée de démarrage: Erreur d'entrée/sortie

I have a 500 Mio EFI partition which is mounted on /boot/EFI.

Previously, I had a Mageia 8 installation (that comes from an upgrade of Mageia 7).

I try to install grub from the live (because everything else is installed) and it displays the same error.

lspcidrake -v
unknown         : Intel Corporation|Core Processor System Control and Status Registers [SYSTEM_OTHER] (vendor:8086 device:d157 subv:0043 subd:0077) (rev: 11)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Target Address Decoder [BRIDGE_HOST] (vendor:8086 device:2c99 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 1 Control Registers [BRIDGE_HOST] (vendor:8086 device:2ca8 subv:8086 subd:8086) (rev: 04)
atl1c           : Qualcomm Atheros|AR8131 Gigabit Ethernet [NETWORK_ETHERNET] (vendor:1969 device:1063 subv:1043 subd:1820) (rev: c0)
unknown         : Intel Corporation|Core Processor QuickPath Architecture System Address Decoder [BRIDGE_HOST] (vendor:8086 device:2c81 subv:8086 subd:8086) (rev: 04)
i7core_edac     : Intel Corporation|Core Processor QPI Link 0 [BRIDGE_HOST] (vendor:8086 device:2c90 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 1 Rank Registers [BRIDGE_HOST] (vendor:8086 device:2caa subv:8086 subd:8086) (rev: 04)
snd_hda_intel   : Advanced Micro Devices, Inc. [AMD/ATI]|Juniper HDMI Audio [Radeon HD 5700 Series] [MULTIMEDIA_AUDIO_DEV] (vendor:1002 device:aa58 subv:1043 subd:aa58)
ehci_pci        : Intel Corporation|5 Series/3400 Series Chipset USB2 Enhanced Host Controller [SERIAL_USB] (vendor:8086 device:3b34 subv:1043 subd:1c77) (rev: 06)
ehci_pci        : Intel Corporation|5 Series/3400 Series Chipset USB2 Enhanced Host Controller [SERIAL_USB] (vendor:8086 device:3b3c subv:1043 subd:1c77) (rev: 06)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 0 Address Registers [BRIDGE_HOST] (vendor:8086 device:2ca1 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor QPI Routing and Protocol Registers [SYSTEM_OTHER] (vendor:8086 device:d151 subv:0043 subd:0077) (rev: 11)
unknown         : Intel Corporation|Core Processor PCI Express Root Port 1 [BRIDGE_PCI] (vendor:8086 device:d138) (rev: 11)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 0 Thermal Control Registers [BRIDGE_HOST] (vendor:8086 device:2ca3 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor Semaphore and Scratchpad Registers [SYSTEM_OTHER] (vendor:8086 device:d156 subv:0043 subd:0077) (rev: 11)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller [BRIDGE_HOST] (vendor:8086 device:2c98 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|5 Series/3400 Series Chipset PCI Express Root Port 2 [BRIDGE_PCI] (vendor:8086 device:3b44) (rev: 06)
unknown         : Intel Corporation|Core Processor DMI [BRIDGE_HOST] (vendor:8086 device:d132 subv:1043 subd:1c77) (rev: 11)
i2c_i801        : Intel Corporation|5 Series/3400 Series Chipset SMBus Controller [SERIAL_SMBUS] (vendor:8086 device:3b30 subv:1043 subd:1c77) (rev: 06)
unknown         : Intel Corporation|82801 Mobile PCI Bridge [BRIDGE_PCI] (vendor:8086 device:2448) (rev: a6)
unknown         : Intel Corporation|Core Processor Miscellaneous Registers [SYSTEM_OTHER] (vendor:8086 device:d158 subv:0043 subd:0077) (rev: 11)
unknown         : Intel Corporation|Core Processor QuickPath Architecture Generic Non-Core Registers [BRIDGE_HOST] (vendor:8086 device:2c52 subv:8086 subd:8086) (rev: 04)
snd_hda_intel   : Intel Corporation|5 Series/3400 Series Chipset High Definition Audio [MULTIMEDIA_AUDIO_DEV] (vendor:8086 device:3b56 subv:1043 subd:1373) (rev: 06)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 1 Address Registers [BRIDGE_HOST] (vendor:8086 device:2ca9 subv:8086 subd:8086) (rev: 04)
Card:ATI Radeon HD 5000 to HD 6300 (radeon): Advanced Micro Devices, Inc. [AMD/ATI]|Broadway XT [Mobility Radeon HD 5870] [DISPLAY_VGA] (vendor:1002 device:68a0 subv:1043 subd:1c02)
mei_me          : Intel Corporation|5 Series/3400 Series Chipset HECI Controller [COMMUNICATION_OTHER] (vendor:8086 device:3b64 subv:1043 subd:1c77) (rev: 06)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Test Registers [BRIDGE_HOST] (vendor:8086 device:2c9c subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|5 Series/3400 Series Chipset PCI Express Root Port 6 [BRIDGE_PCI] (vendor:8086 device:3b4c) (rev: 06)
unknown         : Intel Corporation|Core Processor QPI Physical 0 [BRIDGE_HOST] (vendor:8086 device:2c91 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 1 Thermal Control Registers [BRIDGE_HOST] (vendor:8086 device:2cab subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 0 Control Registers [BRIDGE_HOST] (vendor:8086 device:2ca0 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor QPI Link [SYSTEM_OTHER] (vendor:8086 device:d150 subv:0043 subd:0077) (rev: 11)
lpc_ich         : Intel Corporation|HM55 Chipset LPC Interface Controller [BRIDGE_ISA] (vendor:8086 device:3b09 subv:1043 subd:1c77) (rev: 06)
unknown         : Intel Corporation|Core Processor Integrated Memory Controller Channel 0 Rank Registers [BRIDGE_HOST] (vendor:8086 device:2ca2 subv:8086 subd:8086) (rev: 04)
unknown         : Intel Corporation|Core Processor System Management Registers [SYSTEM_OTHER] (vendor:8086 device:d155 subv:0043 subd:0077) (rev: 11)
unknown         : Intel Corporation|5 Series/3400 Series Chipset PCI Express Root Port 1 [BRIDGE_PCI] (vendor:8086 device:3b42) (rev: 06)
unknown         : Intel Corporation|5 Series/3400 Series Chipset 4 port SATA AHCI Controller [STORAGE_SATA] (vendor:8086 device:3b29 subv:1043 subd:1c77) (rev: 06)
ath9k           : Qualcomm Atheros|AR9285 Wireless Network Adapter (PCI-Express) [NETWORK_OTHER] (vendor:168c device:002b subv:1a3b subd:1089) (rev: 01)
hub             : Linux 6.4.3-desktop-1.mga9 ehci_hcd|EHCI Host Controller [Hub|Unused|Full speed (or root) hub] (vendor:1d6b device:0002)
hub             : Intel Corp.|Integrated Rate Matching Hub [Hub|Unused|Full speed (or root) hub] (vendor:8087 device:0020)
uvcvideo        : Chicony Electronics Co., Ltd|USB2.0 2.0M UVC WebCam [Video|Video Control] (vendor:04f2 device:b106)
hub             : Linux 6.4.3-desktop-1.mga9 ehci_hcd|EHCI Host Controller [Hub|Unused|Full speed (or root) hub] (vendor:1d6b device:0002)
hub             : Intel Corp.|Integrated Rate Matching Hub [Hub|Unused|Full speed (or root) hub] (vendor:8087 device:0020)
usbhid          : DaKai|2.4G RX [Human Interface Device|Boot Interface Subclass|Keyboard] (vendor:0e8f device:00a7)
usb_storage     : SMI Corporation|USB DISK [Mass Storage|SCSI|Bulk-Only] (vendor:090c device:1000)

How reproducible: Always


Steps to Reproduce:
1. Try installing Mageia 9 RC1 on this computer.
Cyril Levet 2023-07-23 17:55:34 CEST

Priority: Normal => High

Comment 1 Nicolas Lécureuil 2023-07-23 18:41:19 CEST
I set to release_blocker as it is a regression from mga8.

Martin do you think you can take a look to this ?

CC: (none) => mageia
Priority: High => release_blocker

Comment 2 Martin Whitaker 2023-07-23 21:45:55 CEST
The error message indicates that efibootmgr could not add a new entry in the EFI non-volatile RAM. What is the output from

  /sbin/efibootmgr

when booting from the Live ISO?

CC: (none) => mageia

Comment 3 Cyril Levet 2023-07-23 22:56:57 CEST
/sbin/efibootmgr
BootCurrent: 0005
Timeout: 2 seconds
BootOrder: 0003,0002,0004,0005
Boot0002* Windows Boot Manager HD(2,GPT,7daa84fc-b1aa-4626-9a66-31ea054c3866,0xfa000,0x31800)/File(\EFI\Micro
soft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390
064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d0066003300320062003
30034003400640034003700390035007d0000006f000100000010000000040000007fff0400
Boot0003* Hard Drive BBS(HD,,0x0)
Boot0004* CD/DVD Drive BBS(CDROM,,0x0)
Boot0005* UEFI: SMI USB DISK 1100 PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(3,0)/HD(1,MBR,0x0,0x785134,0x2
000)
Comment 4 Cyril Levet 2023-07-23 22:57:55 CEST
For information, Windows is no longer installed since several years but the entre for Windows Boot manager is still here.
Comment 5 Martin Whitaker 2023-07-24 11:47:31 CEST
Again using the Live ISO, run the following command as root

  efibootmgr -c

Does that add a new boot entry, or fail with the same error reported when installing GRUB?

That entry is unlikely to work as it will have default values for everything. You can delete it by

  efibootmgr -b 1 -B

assuming the new entry was Boot0001 (it might be a different number). Similarly you could delete the Windows entry by

  efibootmgr -b 2 -B

If it doesn't work, could you try the same thing with a Mageia 8 Live ISO.
Comment 6 Cyril Levet 2023-07-24 19:17:31 CEST
Neither efibootmgr -c or efibootmgr -b 2 -B works. The same message is displayed each time : No space left on device.

efibootmgr -c works with the Mageia 8 Live ISO. It creates a Boot0000* Linux

Another strange behaviour, when I try to delete Windows entry with Mageia 9 Live ISO, it tells me that it is impossible because No space left on device. However, when I reboot on the Mageia 8 Live, the Windows entry has disappeared.
Comment 7 Martin Whitaker 2023-07-24 20:52:52 CEST
I think this is either a bug in the efivarfs pseudo-filesystem or a BIOS bug that the kernel previously ignored. Assigning to the kernel/drivers team.

The workaround is to select the "Install in /EFI/BOOT" option when configuring GRUB at the end of installation. That causes GRUB to be installed in the EFI fallback location, which means it doesn't need to add an entry in the NVRAM.

Component: Installer => RPM Packages
Source RPM: grub2-2.06-27.mga9.src.rpm => kernel-6.4.3-1.mga9
Assignee: bugsquad => kernel
Summary: Mageia 9 installation fail during grub2 setup => Mageia 9 installation fail during grub2 setup due to failure to write to EFI NVRAM

Comment 8 Cyril Levet 2023-07-24 21:34:38 CEST
When selecting the option "Install in /EFI/BOOT" I can finish the installation, but I don't know how to boot on Mageia after. I haven't any proper options at startup.
Comment 9 Cyril Levet 2023-07-24 21:56:27 CEST
It's ok. I found how to do it in the BIOS. This old ASUS BIOS is not really user-friendly.
Nicolas Lécureuil 2023-07-25 19:40:31 CEST

Priority: release_blocker => High

Martin Whitaker 2023-08-25 10:13:46 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=31403


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