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 2162307 - Broken GRUB output on a serial console
Summary: Broken GRUB output on a serial console
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: edk2
Version: 9.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Depends On:
Blocks: 2129768 2144442
TreeView+ depends on / blocked
 
Reported: 2023-01-19 10:04 UTC by Jiri Kortus
Modified: 2023-05-09 07:58 UTC (History)
13 users (show)

Fixed In Version: edk2-20221207gitfff6d81270b5-7.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:23:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of console output (31.78 KB, image/png)
2023-01-19 10:04 UTC, Jiri Kortus
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src edk2 merge_requests 28 0 None opened Revert "MdeModulePkg: TerminalDxe: add other text resolutions (RHEL only)" 2023-02-15 09:55:52 UTC
Red Hat Issue Tracker RHELPLAN-145741 0 None None None 2023-02-08 13:10:44 UTC
Red Hat Product Errata RHSA-2023:2165 0 None None None 2023-05-09 07:25:22 UTC

Description Jiri Kortus 2023-01-19 10:04:42 UTC
Created attachment 1939119 [details]
screenshot of console output

Description of problem:
GRUB2 TUI is broken when a headless machine with serial console is used. The text is not displayed or redrawn properly and is followed by many lines of something resembling to terminal control sequences.

It is possible to select the available entries, but it's very difficult to edit an existing entry. It has to be done 'blind' (no text is displayed unless some text is typed) by guessing where the required line is, and then start typing. Deleting the text also leads to unwanted and improper text redrawing.

I could only see this issue in a VM (reproduced on x86_64 and aarch64), bare metal machines seemed to work fine.

Version-Release number of selected component (if applicable): 
grub2-2.06-46.el9.x86_64 (libvirt-8.10.0-2.el9.x86_64, qemu-kvm-7.2.0-3.el9.x86_64) / RHEL-9.2.0-20230115.7                                                                                                                                                                                         

How reproducible:
100%

Steps to Reproduce:
1. Prepare an x86_64/UEFI or aarch64 headless VM with just a serial console.
2. Boot the installation ISO.

Actual results:
GRUB's TUI output to the serial console is broken, it's very difficult to edit a boot entry.

Expected results:
The output looks the same way as on a machine with graphical output, boot entry editing works in the same way as well.

Comment 1 Marta Lewandowska 2023-02-06 16:19:07 UTC
To clarify (if only for myself), this occurs when the hypervisor is UEFI.
Reproduced using RHEL-9.2.0-20230122.13 which contains grub2-2.06-53.el9 on ampere-mtsnow-altramax-37.khw4.lab.eng.bos.redhat.com and intel-purley-04.khw1.lab.eng.bos.redhat.com

virt-install --os-variant rhel9-unknown --name test --arch aarch64 --memory 2048 --cdrom /var/lib/libvirt/images/boot.iso --boot cdrom --vcpus 2 --disk size=10 --boot uefi --graphics none

Even after installation, it is very difficult to edit entries in the grub menu.
It's much worse on aarch64 than on x86/UEFI, but neither one is friendly.

Comment 2 Marta Lewandowska 2023-02-06 16:23:31 UTC
both hypervisors were running relatively recent nightlies: RHEL-9.2.0-20230122.13, RHEL-9.2.0-20230201.12

Comment 3 Marta Lewandowska 2023-02-14 07:30:03 UTC
Playing around with this, I've found that it breaks between RHEL-9.0.0-20220501.0 and RHEL-9.1.0-20220718.0. Installing an aarch hypervisor with RHEL-9.0.0-20220501.0 and updating edk2 to edk2-aarch64-20220526git16779ede2d36-2.el9 reproduces the problem.
Reassigning to edk2.

Comment 4 Gerd Hoffmann 2023-02-14 12:20:21 UTC
https://kojihub.stream.rdu2.redhat.com/koji/taskinfo?taskID=1953904
Added: Revert "MdeModulePkg: TerminalDxe: add other text resolutions (RHEL only)"

Comment 5 Xueqiang Wei 2023-02-15 06:15:08 UTC
Tested with edk2-ovmf-20221207gitfff6d81270b5-6.el9.noarch, reproduce this issue.

# cat virt_install.sh
virt-install \
        --os-variant rhel9.0 \
        --name test \
        --memory 4096 \
        --cdrom /var/lib/libvirt/images/RHEL-9.2.0-20230206.16-x86_64-boot.iso \
        --boot cdrom \
        --vcpus 2 \
        --disk size=10 \
        --boot uefi \
        --graphics none 


The output is as follows:

BdsDxe: loading Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)

3;07HUse the ^ and v keys to change the selection.                                                                                                                                                                                                                                                                Install Red Hat Enterprise Linux 9.2
Test this media & install Red Hat Enterprise Linux 9.2
Troubleshooting -->
                                            0;01H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               0;?3H1;01H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               1;?3H2;01H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               2;?3H3;01H

0;01H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           1;01H                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       5;01H   

The selected entry will be started automatically in 60s.

5;01H   The selected entry will be started automatically in 1s.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     5;01H   The selected entry will be started automatically in 0s.



Tested with attached edk2-ovmf-20221207gitfff6d81270b5-6.el9.bz2162307.20230214.1252.noarch in Comment 4, it works well.

The output is as follows:
# sh virt_install.sh 

Starting install...
Allocating 'test-1.qcow2'                                                    |    0 B  00:00:00 ... 
Creating domain...                                                           |    0 B  00:00:00     
Running text console command: virsh --connect qemu:///system console test
Connected to domain 'test'
Escape character is ^] (Ctrl + ])

BdsDxe: loading Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)

      Install Red Hat Enterprise Linux 9.2                                      
      Test this media & install Red Hat Enterprise Linux 9.2                   
      Troubleshooting --> 



Hi Gerd,

Is this still a 9.2 target? Since ITM 26 is 1 week away and we will get into blocker/exception phase soon, I want to confirm whether QE can get the build before ITM26. In order to have enough time to arrange the test. Thanks.


Hi Jiri,

Can you help double check the fixed build attached in Comment 4? Does it meet your needs? Thanks.

Comment 12 Xueqiang Wei 2023-02-21 15:23:25 UTC
According to Comment 5, tested with edk2-ovmf-20221207gitfff6d81270b5-7.el9.noarch, not hit this issue.

Versions:
kernel-5.14.0-252.el9.x86_64
qemu-kvm-7.2.0-8.el9
edk2-ovmf-20221207gitfff6d81270b5-7.el9.noarch


The output is as follows:
# sh virt_install.sh 

Starting install...
Allocating 'test-9.qcow2'                                  |    0 B  00:00:00 ... 
Creating domain...                                         |    0 B  00:00:00     
Running text console command: virsh --connect qemu:///system console test
Connected to domain 'test'
Escape character is ^] (Ctrl + ])

BdsDxe: loading Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)
BdsDxe: starting Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x0,0xFFFF,0x0)

      Install Red Hat Enterprise Linux 9.2                                      
      Test this media & install Red Hat Enterprise Linux 9.2                   
      Troubleshooting -->

Comment 13 Xueqiang Wei 2023-02-22 05:34:45 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 17 Xueqiang Wei 2023-02-22 08:18:07 UTC
qemu gating test and edk2 loop test with edk2-ovmf-20221207gitfff6d81270b5-7.el9.noarch, no new bug was found.

Versions:
kernel-5.14.0-268.el9.x86_64
qemu-kvm-7.2.0-8.el9
edk2-ovmf-20221207gitfff6d81270b5-7.el9.noarch.rpm

1. Gating_test_rhel9 - the results were passed.
2. edk2 test loop - hit existing bug, Bug 2168446 - Booting VM failed on AMD EPYC 7252 host with npt=0

Comment 18 Xueqiang Wei 2023-02-22 08:21:10 UTC
According to Comment 12 and Comment 17, set status to VERIFIED.

Comment 20 errata-xmlrpc 2023-05-09 07:23:58 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 (Important: edk2 security, 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/RHSA-2023:2165


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