Bug 2182623

Summary: ReaR cannot complete its operation with serial console when boot the rescue image.
Product: Red Hat Enterprise Linux 8 Reporter: Keigo Noha <knoha>
Component: rearAssignee: Pavel Cahyna <pcahyna>
Status: ASSIGNED --- QA Contact: CS System Management SST QE <rhel-cs-system-management-subsystem-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: ovasik, pcahyna
Target Milestone: rcFlags: pcahyna: needinfo? (knoha)
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Keigo Noha 2023-03-29 05:49:54 UTC
Description of problem:
ReaR cannot complete its operation with serial console when boot the rescue image.

ReaR seems to support serial console by the combination of 'USE_SERIAL_CONSOLE=y' and 'KERNEL_CMDLINE="console=ttyS0 console=ttyS0,115200n8"'

However, the prompt for login is not shown with serial console.

Version-Release number of selected component (if applicable):
rear-2.4

How reproducible:
Always

Steps to Reproduce:
1. Add parameters, 'USE_SERIAL_CONSOLE=y' and 'KERNEL_CMDLINE="console=ttyS0 console=ttyS0,115200n8"' into locale.conf and rescue.conf
2. Use virt-install to restore the system with --graphics none option.

Actual results:
After the initramfs unpacking messages are shown, there is no command line prompt.

Expected results:
The prompt is shown in serial console and complete the operation on the serial console.

Additional info:

Comment 1 Keigo Noha 2023-04-28 01:05:17 UTC
Hi Pavel and team,

Would you please share your updates about this bugzilla?

Best regards,
Keigo Noha

Comment 9 Pavel Cahyna 2023-05-23 16:05:25 UTC
Hi Keigo,

I have investigated the problem in more detail and it looks that there are at least two issues.

1. USE_SERIAL_CONSOLE=y actually conflicts with the console settings in KERNEL_CMDLINE. With USE_SERIAL_CONSOLE=y ReaR tries to autodetect the serial console and removes all the console settings in KERNEL_CMDLINE. Therefore it does not work to provide these two settings together. Please try to change USE_SERIAL_CONSOLE to 'n'.

2. KERNEL_CMDLINE="console=ttyS0 console=ttyS0,115200n8" apparently leads to the serial port using speed 9600 baud. I suppose it is because the first entry takes precedence and 9600 is the default. If you want 115200 baud, use just KERNEL_CMDLINE="console=ttyS0,115200n8". This may and may not be a problem. It was a problem for me on physical hardware - when configured for 9600 baud the console did not work and I had to change the speed to 115200 manually after booting. OTOH, in a virtual environment this was not a problem, the serial console worked even this way. So I suppose it depends on whether the customer has physical hardware or virtual machine and if physical hardware, what console speed are they using.

I can confirm that with the settings

USE_SERIAL_CONSOLE=n
KERNEL_CMDLINE="console=ttyS0,115200n8"

the problem was fixed for me both with ReaR 2.4 and ReaR 2.6 (the one available in newer RHEL versions). That means, I get boot messages and then ReaR messages and prompts (if ReaR is started automatically) on the serial console. So, please, try these settings.

Regards, Pavel

Comment 10 Keigo Noha 2023-06-01 00:24:01 UTC
Hi Pavel,

Thank you for your comment! I'm checking the behavior on my lab. I'll update this bugzilla once I get any results from my lab.

Best regards,
Keigo