Hide Forgot
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
Tracked internally under https://issues.redhat.com/browse/OAMG-4142.
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
-------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.
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)
Just for the info, the proper solution for UEFI support is in progress. The upstream PR: https://github.com/oamg/convert2rhel/pull/223
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.
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?
(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
(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
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
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
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