RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1898314 - Converting a UEFI install drops to grub> prompt, or fails to boot.
Summary: Converting a UEFI install drops to grub> prompt, or fails to boot.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: convert2rhel
Version: 7.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Michal Bocek
QA Contact: Upgrades and Supportability
Miriam Portman
URL:
Whiteboard:
Depends On:
Blocks: 1818077 1818088 2010707 2010708
TreeView+ depends on / blocked
 
Reported: 2020-11-16 19:30 UTC by Ryan Blakley
Modified: 2024-10-01 17:05 UTC (History)
22 users (show)

Fixed In Version: convert2rhel-0.24-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2010707 2010708 (view as bug list)
Environment:
Last Closed: 2021-10-13 07:11:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-74394 0 None None None 2021-08-26 16:14:03 UTC
Red Hat Knowledge Base (Solution) 5955581 0 None None None 2021-04-12 13:12:58 UTC
Red Hat Product Errata RHEA-2021:3834 0 None None None 2021-10-13 07:11:46 UTC

Description Ryan Blakley 2020-11-16 19:30:35 UTC
Description of problem: It appears efibootmgr isn't ran to add a new entry pointing to the RHEL /boot/efi/EFI/redhat/shimx64.efi file. Also there isn't a new grub.cfg or grubenv file generated under /boot/efi/EFI/redhat/, which is what causes the drop to the grub> prompt, because the bios falls back to scanning and adding temporary entries.


Version-Release number of selected component (if applicable): convert2rhel-0.12-1.el7.noarch and convert2rhel-0.13-2.20201116104501321324.master.2.gbf256fe.el7.noarch


How reproducible: Easy


Steps to Reproduce:
1. Convert a UEFI CentOS install(I have no way of testing OEL but it should be affected also)
2. Reboot

Actual results:
boots to the grub> prompt or fails to load an entry.


Expected results:
boot to the grub menu


Additional info:
root@c7-uefi ~ # efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0001,0003,0002,0000
Boot0000* UiApp	FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI QEMU DVD-ROM QM00001 	/Pci(0x1f,0x2)/Sata(0,65535,0)N.....YM....R,Y.
Boot0002* UEFI Misc Device	/Pci(0x2,0x3)/Pci(0x0,0x0)N.....YM....R,Y.
Boot0003* CentOS	HD(1,GPT,bd3b3f0b-870e-4bba-afc9-2ed895a2b684,0x800,0x32000)/File(\EFI\centos\shimx64.efi) <<<--file doesn't exist anymore

root@c7-uefi ~ # ls -laR /boot/efi/EFI/
/boot/efi/EFI/:
total 24
drwx------. 5 root root  2048 Nov 16 13:38 .
drwx------. 3 root root 16384 Dec 31  1969 ..
drwx------. 2 root root  2048 Nov 16 13:39 BOOT
drwx------. 2 root root  2048 Nov 16 13:39 centos
drwx------. 3 root root  2048 Nov 16 13:39 redhat

/boot/efi/EFI/BOOT:
total 1582
drwx------. 2 root root    2048 Nov 16 13:39 .
drwx------. 5 root root    2048 Nov 16 13:38 ..
-rwx------. 1 root root 1252568 Jul 31 16:07 BOOTX64.EFI
-rwx------. 1 root root  362360 Jul 31 16:07 fbx64.efi

/boot/efi/EFI/centos:
total 12
drwx------. 2 root root 2048 Nov 16 13:39 .
drwx------. 5 root root 2048 Nov 16 13:38 ..
-rwx------. 1 root root 4160 Nov 16 13:37 grub.cfg
-rwx------. 1 root root 1024 Nov 16 13:37 grubenv

/boot/efi/EFI/redhat:
total 5952
drwx------. 3 root root    2048 Nov 16 13:39 .
drwx------. 5 root root    2048 Nov 16 13:38 ..
-rwx------. 1 root root     182 Jul 31 16:07 BOOT.CSV
-rwx------. 1 root root     182 Jul 31 16:07 BOOTX64.CSV
drwx------. 2 root root    2048 Nov 16 13:39 fonts
-rwx------. 1 root root 1175544 Jul 28 13:11 grubx64.efi
-rwx------. 1 root root 1154768 Jul 31 16:07 mmx64.efi
-rwx------. 1 root root 1252568 Jul 31 16:07 shim.efi
-rwx------. 1 root root 1252568 Jul 31 16:07 shimx64.efi
-rwx------. 1 root root 1246656 Jul 31 16:07 shimx64-redhat.efi

/boot/efi/EFI/redhat/fonts:
total 2506
drwx------. 2 root root    2048 Nov 16 13:39 .
drwx------. 3 root root    2048 Nov 16 13:39 ..
-rwx------. 1 root root 2560080 Jul 28 13:11 unicode.pf2

Comment 1 Michal Bocek 2021-01-18 15:21:13 UTC
Tracked internally under https://issues.redhat.com/browse/OAMG-4142.

Comment 2 john broome 2021-02-03 22:15:27 UTC
This is the fix, after conversion, before reboot:
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

From this comment, in April 2020:
https://access.redhat.com/articles/2360841#comment-1774301

Comment 5 Pradeep Jagtap 2021-02-17 15:52:48 UTC
-------Workaround -------- (Tested on both CentOS 7 & CentOS 8 works without any issue.)

Do not reboot the system after conversion just follow below additional steps 

[1] Generated the grub.cfg file
      # grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg


[2] Remove CentOS entry. 
         [2.1] Find centos entry run # efibootmgr -v
               Example:
               [root@centos ~]# efibootmgr
               BootCurrent: 0003
               Timeout: 0 seconds
               BootOrder: 0003,0001,0002
               Boot0001* UiApp
               Boot0002* UEFI Misc Device
               Boot0003* CentOS Linux


        [2.2] Remove entry replacing the boolean value found in the above step
              # efibootmgr -Bb 0003


[3] Add UEFI boot entry for RHEL (Note: Replace the disk part shown in the below command with the disk that /boot/efi is on.
     # efibootmgr -c -d /dev/<disk> -p 1  -l \\EFI\\redhat\\shimx64.efi -L "Red Hat Enterprise Linux <insert a 7 or an 8 here depending>"

    Example:
    # efibootmgr -c -d /dev/sda -p 1  -l \\EFI\\redhat\\shimx64.efi -L "Red Hat Enterprise Linux 7"

[4] Check if the new boot entry was added properly, by running the below command.
       # efibootmgr -v

    Example:
    [root@centos ~]# efibootmgr
    BootCurrent: 0003
    Timeout: 0 seconds
    BootOrder: 0001,0002,0000
    Boot0000* UiApp
    Boot0001* Red Hat Enterprise Linux 8
    Boot0002* UEFI Misc Device

[5] Reboot the system


-------8<--------8<--------8<-------- 8<-------- 8<-------- 8<-------- 8<--------
 
If the system is already rebooted before following these steps. Then the system will be in a can't boot state. 
This can't boot issue can be resolved by booting system in rescue mode using RHEL ISO and following the same steps.

Comment 6 Petr Stodulka 2021-03-16 08:29:35 UTC
The PR with the conversion inhibitor when UEFI is detected is prepared here:
  https://github.com/oamg/convert2rhel/pull/206

(this is temporary workaround until the proper handling of conversion for UEFI is prepared)

Comment 7 Petr Stodulka 2021-04-06 08:10:42 UTC
Just for the info, the proper solution for UEFI support is in progress. The upstream PR:
  https://github.com/oamg/convert2rhel/pull/223

Comment 11 Pradeep Jagtap 2021-05-18 14:27:27 UTC
The workaround shared #comment 5 works with convert2rhel-0.17-1.el7.noarch, convert2rhel-0.17-1.el8.noarch (Self-supported version)
        
Package links:
        https://github.com/oamg/convert2rhel/releases/download/v0.17/convert2rhel-0.17-1.el7.noarch.rpm 
        https://github.com/oamg/convert2rhel/releases/download/v0.17/convert2rhel-0.17-1.el8.noarch.rpm 

But with the currently Red Hat shipped and supported convert2rhel-0.20-1.el7.noarch, convert2rhel-0.20-1.el8.noarch packages ( Supported version: http://ftp.redhat.com/redhat/convert2rhel/ ) 

It directly stops the conversion with the below messages:
       CRITICAL - Conversion of UEFI systems is currently not supported, see https://bugzilla.redhat.com/show_bug.cgi?id=1898314 for more information.
       No changes were made to the system.

Comment 14 jdravet 2021-08-06 14:09:33 UTC
https://github.com/oamg/convert2rhel/pull/223 hasn't had an author posting since May 10.  It is now less than 5 months before Centos 8 is EOL.  Can we please see some progress on this?

Comment 16 Terry Bowling 2021-08-10 13:10:10 UTC
(In reply to jdravet from comment #14)
> https://github.com/oamg/convert2rhel/pull/223 hasn't had an author posting
> since May 10.  It is now less than 5 months before Centos 8 is EOL.  Can we
> please see some progress on this?

@jdravet,

Greetings, and thank you for raising this question.  We agree with you that this is a high priority fix that needs resolved soon.  Currently we are blocked by our automated CI testing implementation to ensure that we are able to test this against a wide variety of hardware and virtual/cloud environments before declaring it "enterprise supported".  I understand your frustrations and can only assure you that we agree and are working on it internally.  Our CI testing is critical as one of our top goals is to ensure that we do no harm before we release it as ready to the broad user base.

In the meantime, if you have a test environment that matches your hardware, you can use the workaround described in cmt13 to test that it works for you and if so, you should be able to proceed by testing the workaround described above.  A reminder that documentation strongly recommends for all scenarios that backups be taken as a precaution.

Best regards,
Terry Bowling
RHEL Product Management

Comment 18 Michal Bocek 2021-09-24 13:58:06 UTC
(this is to remediate confusion that might arise from #c12, #c13 and #c17)

Here's an unsupported workaround for those who:
1. have a recoverable system backup
2. have done the preparation steps mentioned by Pradeep in https://bugzilla.redhat.com/show_bug.cgi?id=1898314#c5

Run the following command after installing convert2rhel:
a) on CentOS/Oracle Linux 7: # sed -i 's|  check_uefi|#check_uefi|' /usr/lib/python2.7/site-packages/convert2rhel/checks.py
b) on CentOS/Oracle Linux 8: # sed -i 's|  check_uefi|#check_uefi|' /usr/lib/python3.6/site-packages/convert2rhel/checks.py

Comment 23 errata-xmlrpc 2021-10-13 07:11:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (convert2rhel enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3834

Comment 24 fmkoreacom 2021-10-13 08:37:36 UTC
Of note the link https://access.redhat.com/errata/RHEA-2021:3832 is broken.

On another note, since this is a super common scenario I would hope an automated fix would be made to convert2rhel

Comment 25 Terry Bowling 2021-10-18 18:13:37 UTC
Errata page links are now working.  Below is a complete list:

RHEL 8 RHEA-2021:3833 https://access.redhat.com/errata/RHEA-2021:3833
RHEL 7 RHEA-2021:3834 https://access.redhat.com/errata/RHEA-2021:3834
RHEL 6 RHEA-2021:3832 https://access.redhat.com/errata/RHEA-2021:3832


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