Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1874470

Summary: [Azure]grub2-mkconfig -o /boot/grub2/grub.cfg renders the VM Unbootable on the Dual Booted Machine [rhel-8.2.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
Component: grub2Assignee: Javier Martinez Canillas <fmartine>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 8.0CC: abgopal, alsin, bootloader-eng-team, bsivasub, cpelland, dkinkead, esflores, fmartine, hhei, huzhao, javierm, jsturgis, jwboyer, mathapli, mhavrila, mikelley, mmorsy, paulmey, pbasnal, pjanda, pjones, ribarry, sisatia, sparcysparc, sribs, vkuznets, wshi, xuli, yacao, yuxisun
Target Milestone: rcKeywords: ZStream
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: grub2-2.02-87.el8_2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1850193 Environment:
Last Closed: 2020-11-04 11:02:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1850193    
Bug Blocks:    

Comment 5 Petr Janda 2020-10-09 14:23:14 UTC
Verified with released RHEL-8.2 x86_64 and grub2-2.02-87.el8_2.1 following steps from https://bugzilla.redhat.com/show_bug.cgi?id=1850193#c29

Comment 7 HuijingHei 2020-10-10 04:16:10 UTC
Verify passed in VM on Hyper-V

Setup VM:
1) Create gen2 vm based on released RHEL8.2 and ks.cfg from https://bugzilla.redhat.com/attachment.cgi?id=1711579
2) Update os to RHEL-8.2.0-updates-20200603.0 and grub2 to grub2-2.02-87.el8_2.1.x86_64
3) Exec 'grub2-install --target=i386-pc /dev/sda' and reboot
4) Both gen2 and gen1 can start successfully with the same vhdx

Other test cases in Gen1/Gen2 VM:
1) Install new kernel and reboot, can switch to new kernel
2) Use grubby/grub2-set-default/grub2-reboot to switch back to the old kernel. Can boot up with the old kernel.
3) Update kernel parameter in /etc/default/grub and grub2-mkconfig -o /etc/grub2.cfg, the parameter can work.
4) Update kenrel parameter with grubby/grub2-editenv, the parameter can work
5) If regernate grub2-efi.cfg, gen2 vm can also boot

Comment 8 HuijingHei 2020-10-12 09:51:25 UTC
Additional info for Comment #7,
5) For gen2 vm, if regernate grub2-efi.cfg with 'grub2-mkconfig -o /etc/grub2-efi.cfg', vm can also boot. But cannot switch kernel with grubby/'grub2-set-default'/'grub2-reboot' after regenerate grub2-efi.cfg. As workaround, need to set 'GRUB_DEFAULT=$kernel_index' in /etc/default/grub, then regernate grub2-efi.cfg. 

Accroding to https://bugzilla.redhat.com/show_bug.cgi?id=1850193#c73
Now re-generating the stub config in /boot/efi/EFI/redhat/grub.cfg would not render the machine unbootable anymore, but still is something that shouldn't be done because then the two config files will get out of sync.

Comment 9 HuijingHei 2020-10-12 09:53:11 UTC
Upload vhd to Azure, create gen1/gen2 vm with vhd, both gen1 and gen2 vm can start successfully.

Test in Gen1/Gen2 VM:
1) Install new kernel and reboot, can switch to new kernel
2) Update kernel parameter in /etc/default/grub and 'grub2-mkconfig -o /etc/grub2.cfg', the parameter can make effect

Comment 10 Yuxin Sun 2020-10-20 04:01:08 UTC
Hi Pankaj Basnal,

Here are the grub2 packages for RHEL-8.2.0.z: http://people.redhat.com/~yuxisun/grub2/8.2.0.z/
Please use it for your RHEL-8.2.0.z image test. Thanks!

Comment 16 errata-xmlrpc 2020-11-04 11:02:39 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 (grub2 bug fix and 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/RHBA-2020:4894