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

EFI::BOOTLOADER_ERROR with RAID + UEFI #1247

Open
advorkin opened this issue May 30, 2024 · 5 comments
Open

EFI::BOOTLOADER_ERROR with RAID + UEFI #1247

advorkin opened this issue May 30, 2024 · 5 comments

Comments

@advorkin
Copy link

advorkin commented May 30, 2024

Hello,

convert2rhel version: 2.0.0

I'm trying to convert from Springdale 9.2 to RedHat and getting the following error message:

[2024-05-30T09:53:37-0400] TASK - [Prepare: Check the firmware interface type (BIOS/UEFI)] ***********
UEFI detected.
ERROR - (ERROR) EFI::BOOTLOADER_ERROR - Bootloader error detected
 Description: An unknown bootloader error occurred, please look at the diagnosis for more information.
 Diagnosis: The '/dev/md2' device has no PART_ENTRY_NUMBER
 Remediations: N/A

I've tried to umount the partition:

After umount /dev/md2

[2024-05-30T09:57:19-0400] TASK - [Prepare: Check the firmware interface type (BIOS/UEFI)] ***********
UEFI detected.
ERROR - (ERROR) EFI::BOOTLOADER_ERROR - Bootloader error detected
 Description: An unknown bootloader error occurred, please look at the diagnosis for more information.
 Diagnosis: The UEFI has been detected but the ESP is not mounted in /boot/efi as required.
 Remediations: N/A
$ blkid -po export /dev/md2
DEVNAME=/dev/md2
SEC_TYPE=msdos
LABEL_FATBOOT=10
LABEL=10
UUID=8344-7222
VERSION=FAT16
FSBLOCKSIZE=4096
BLOCK_SIZE=512
TYPE=vfat
USAGE=filesystem

What can be done to fix the problem? From kickstart file:

raid /boot/efi --fstype efi --device md2 --level=RAID1 raid.00 raid.10

Thank you!

@bocekm
Copy link
Member

bocekm commented May 31, 2024

Hi @advorkin, conversions to RHEL 9 are still in a preparational/experimental phase. What configuration file did you use for converting Springdale 9.2? Have you copied one of those in https://github.com/oamg/convert2rhel/tree/main/convert2rhel/data/9/x86_64/configs?

@advorkin
Copy link
Author

Thank you for responding. I used one configured for springdale, but very much similar to rocky/almalinux ones.

Just to provide some additional information.. this is with --debug option:

[2024-05-31T09:33:45-0400] TASK - [Prepare: Check the firmware interface type (BIOS/UEFI)] ***********
UEFI detected.
[2024-05-31T09:33:45-0400] DEBUG - Calling command 'mokutil --sb-state'
[2024-05-31T09:33:45-0400] DEBUG - Calling command '/usr/sbin/efibootmgr -v'
[2024-05-31T09:33:45-0400] DEBUG - Bootloader setup:
Current boot: 0001
Boot order: 0001, 0000, 000A, 000B, 0006, 0007, 0008, 0009, 0003, 0004, 000C, 000E, 000F, 0010, 0011, 0002
Boot entries:
- 0000: Springdale Linux
- 0001: Springdale Linux
- 0002: UEFI: Built-in EFI Shell
- 0003: UEFI: PXE IPv4 Intel(R) Ethernet Converged Network Adapter X550-T2
- 0004: UEFI: PXE IPv4 Intel(R) Ethernet Converged Network Adapter X550-T2
- 0006: AMI Virtual CDROM0 1.00
- 0007: AMI Virtual CDROM1 1.00
- 0008: AMI Virtual CDROM2 1.00
- 0009: AMI Virtual CDROM3 1.00
- 000A: XA240LE10003
- 000B: XA240LE10003
- 000C: SAMSUNG MZQL23T8HCLS-00A07
- 000E: AMI Virtual HDisk0 1.00
- 000F: AMI Virtual HDisk1 1.00
- 0010: AMI Virtual HDisk2 1.00
- 0011: AMI Virtual HDisk3 1.00
[2024-05-31T09:33:45-0400] DEBUG - Calling command '/usr/sbin/grub2-probe --target=device /boot/efi/'
[2024-05-31T09:33:45-0400] DEBUG - Calling command '/usr/sbin/blkid -p -s PART_ENTRY_NUMBER /dev/md2'
ERROR - (ERROR) EFI::BOOTLOADER_ERROR - Bootloader error detected
 Description: An unknown bootloader error occurred, please look at the diagnosis for more information.
 Diagnosis: The '/dev/md2' device has no PART_ENTRY_NUMBER
 Remediations: N/A

ELS_SYSTEM_CHECK has succeeded
EUS_SYSTEM_CHECK has succeeded

@bocekm
Copy link
Member

bocekm commented May 31, 2024

This seems to be similar to #1167. The lack of PART_ENTRY_NUMBER might be because of RAID with which we don't test conversions at the moment. We need to try reproducing it and then come up with a fix.

@advorkin
Copy link
Author

Thank you very much for looking into it.

@BradLugo
Copy link

Hey @bocekm! I was the reporter of #1167. The problem was indeed caused by RAID (mdadm specifically). I'm not sure if things have changed, but when I originally reported the issue, I was able to reproduce it consistently.

IIRC, I ended up adding some logic to this:

dev_number = get_device_number(get_efi_partition())
blk_dev = get_grub_device()
logger.debug("Block device: %s" % str(blk_dev))
logger.debug("ESP device number: %s" % str(dev_number))
efi_path = None
for filename in DEFAULT_INSTALLED_EFIBIN_FILENAMES:
tmp_efi_path = os.path.join(RHEL_EFIDIR_CANONICAL_PATH, filename)
if os.path.exists(tmp_efi_path):
efi_path = canonical_path_to_efi_format(tmp_efi_path)
logger.debug("The new UEFI binary: %s" % tmp_efi_path)
break
if not efi_path:
raise BootloaderError("Unable to detect any RHEL UEFI binary file.")
label = "Red Hat Enterprise Linux %s" % str(systeminfo.system_info.version.major)
logger.info("Adding '%s' UEFI bootloader entry." % label)
if _is_rhel_in_boot_entries(efibootinfo_orig, efi_path, label):
logger.info("The '%s' UEFI bootloader entry is already present." % label)
return efibootinfo_orig
# The new boot entry is being set as first in the boot order
cmd = [
"/usr/sbin/efibootmgr",
"--create",
"--disk",
blk_dev,
"--part",
str(dev_number),
"--loader",
efi_path,
"--label",
label,
]

where if dev_number was empty, the efibootmgr command would run without the --part flag. According to the efibootmgr man page, the partition number defaults to 1, which ended up working for me.

@bocekm bocekm changed the title ERROR - (ERROR) EFI::BOOTLOADER_ERROR - Bootloader error detected EFI::BOOTLOADER_ERROR with RAID + UEFI Jun 3, 2024
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

3 participants