Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-52331

convert2rhel fails in pre-checks when converting systems in UEFI + software Raid for the EFI partition

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • None
    • rhel-7.9, rhel-8.10
    • convert2rhel
    • None
    • No
    • Moderate
    • rhel-sst-conversions
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      When the system to be converted is a UEFI system with the EFI partition on a software raid, the conversion fails in pre-checks:

      # efibootmgr -v
      BootCurrent: 0001
      Timeout: 0 seconds
      BootOrder: 0002,0001,0003,0000
      Boot0000* UiApp	FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
      Boot0001* UEFI Misc Device	/Pci(0x2,0x4)/Pci(0x0,0x0)N.....YM....R,Y.
      Boot0002* CentOS Linux	HD(2,GPT,e7a38352-e870-48b5-8174-72ebe8e09d91,0x201000,0x64800)/File(\EFI\centos\shimx64.efi)
      Boot0003* UEFI Misc Device 2	/Pci(0x2,0x5)/Pci(0x0,0x0)N.....YM....R,Y.
      
      # lsblk
      NAME              MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
      sr0                11:0    1 1024M  0 rom   
      vda               252:0    0   20G  0 disk  
      ├─vda1            252:1    0    1G  0 part  
      │ └─md127           9:127  0 1023M  0 raid1 /boot
      ├─vda2            252:2    0  201M  0 part  
      │ └─md125           9:125  0  201M  0 raid1 /boot/efi
      └─vda3            252:3    0 18.8G  0 part  
        └─md126           9:126  0 18.8G  0 raid1 
          ├─rootvg-root 253:0    0   10G  0 lvm   /
          └─rootvg-swap 253:1    0    2G  0 lvm   [SWAP]
      vdb               252:16   0   20G  0 disk  
      ├─vdb1            252:17   0    1G  0 part  
      │ └─md127           9:127  0 1023M  0 raid1 /boot
      ├─vdb2            252:18   0  201M  0 part  
      │ └─md125           9:125  0  201M  0 raid1 /boot/efi
      └─vdb3            252:19   0 18.8G  0 part  
        └─md126           9:126  0 18.8G  0 raid1 
          ├─rootvg-root 253:0    0   10G  0 lvm   /
          └─rootvg-swap 253:1    0    2G  0 lvm   [SWAP]
      

      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/md125' device has no PART_ENTRY_NUMBER
           Remediations: N/A
      

      The reason for this is grub.get_efi_partition() in /usr/lib/python2.7/site-packages/convert2rhel/actions/system_checks/efi.py returns the virtual device /dev/md125, instead of each device making the Raid (which is in 1.0 metadata format), i.e. /dev/vda2 and /dev/vdb2 (multi-valued as well).

      The code clearly doesn't handle UEFI + Software Raid.

      Please implement a wiser check.
      Additionally you will have to implement a wiser implementation of EFI Boot Manager entries replacement as well, function _add_rhel_boot_entry() in /usr/lib/python2.7/site-packages/convert2rhel/grub.py, this part is also failing, since each individual device must be added to boot loader.

      Please provide the package NVR for which bug is seen:

      convert2rhel-2.0.1-1.el7.noarch
      Probably RHEL8 convert2rhel but didn't check

      How reproducible:

      Always

      Steps to reproduce

      1. Install a VM in UEFI mode with Software Raid
        See above for the minimal disk layout.
      2. Try converting it

      Expected results

      Success

      Actual results

      Failure in pre-checks.
      When disabling the pre-check, failure writing the new bootloader entry:

      Adding a new UEFI bootloader entry for RHEL.
      CRITICAL - The '/dev/md125' device has no PART_ENTRY_NUMBER
      

              mbocek@redhat.com Michal Bocek
              rhn-support-rmetrich Renaud Métrich
              Michal Bocek Michal Bocek
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Miriam Portman Miriam Portman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: