Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console defaults for x86_64 qemu platform #954

Closed
dustymabe opened this issue Sep 2, 2021 · 8 comments · Fixed by coreos/fedora-coreos-config#1769
Closed

console defaults for x86_64 qemu platform #954

dustymabe opened this issue Sep 2, 2021 · 8 comments · Fixed by coreos/fedora-coreos-config#1769
Assignees
Labels
jira for syncing to jira kind/enhancement

Comments

@dustymabe
Copy link
Member

dustymabe commented Sep 2, 2021

With the work in coreos/coreos-assembler#2400 we'll soon be able to configure console defaults on each platform individually. After a notice period, the x86_64 qemu images will revert to no console= entry on the kernel command line, which means it will default to VGA console by default, which is what some users expect and will welcome the change.

For me (I suspect I'm not alone, but maybe), I use a lot of scripting to run various tests and I typically use the qemu qcow to pull that off. In a lot of cases I use the serial console output to debug, go through scrollback, etc.. In my cases I typically don't offer a graphical console to the machine at all (i.e. virt-install --graphics=none).

It would be nice if either the kernel would choose the serial console when there was no VGA console OR we set console defaults for QEMU that would fallback to serial console if VGA isn't available. From preliminary testing setting console=ttyS0 console=tty0 does that.

@dustymabe dustymabe changed the title console defaults for qemu platform console defaults for x86_64 qemu platform Sep 2, 2021
@bgilbert
Copy link
Contributor

bgilbert commented Sep 2, 2021

console=ttyS0 console=tty0 will still use ttyS0 as a secondary console, the way we're doing for VGA now. If we did that in the metal images, it'd still risk boot failures if the platform serial port doesn't work, and boot slowdowns if it does. But those concerns might not apply to QEMU.

@jlebon
Copy link
Member

jlebon commented Sep 7, 2021

I think it might be worth trying to dig into the kernel auto-detection logic here some more and/or chat with the relevant kernel folks. I quoted the relevant kernel docs in #567 (comment) which seem to express exactly the semantics we'd want for kola/virt-install --graphics=none. But both @bgilbert and I tested this and we're not getting that result.

So either we're missing something, or the docs are wrong, or there's a bug in the kernel (non-exclusive :) ).

@bgilbert
Copy link
Contributor

bgilbert commented Sep 7, 2021

AFAICT if virtual consoles are enabled, they're always assumed to be present, so the kernel never falls back to serial. This is sort-of documented in Kconfig.

@dustymabe dustymabe added the meeting topics for meetings label Sep 8, 2021
@bgilbert
Copy link
Contributor

bgilbert commented Sep 8, 2021

Testing shows that console=ttyS0 console=tty0 doesn't behave as desired. If there's no VGA console, the serial console stays secondary, so it only gets kernel messages.

@lucab
Copy link
Contributor

lucab commented Sep 16, 2021

From last meeting:

  * AGREED: for now, we will continue to add `console=tty0
    console=ttyS0,115200` to the QEMU image.  we will investigate having
    the initramfs e-shell print some info to secondary consoles, and
    possibly start additional shells on them.  (bgilbert, 17:29:11)

@lucab lucab removed the meeting topics for meetings label Sep 16, 2021
@dustymabe dustymabe added the jira for syncing to jira label Apr 4, 2022
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Jun 2, 2022
This allows us to print the helpful messages that we have added
for our users before they enter dracut's emergency shell to all
configured consoles on the machine.

Closes coreos/fedora-coreos-tracker#954
@dustymabe
Copy link
Member Author

we will investigate having the initramfs e-shell print some info to secondary consoles

and possibly start additional shells on them.

Looks like that is already the case today (see dracutdevs/dracut@32f68c1). At least I just verified on a qemu qcow2 with console=tty0 console=ttyS0,115200 that I get a shell on both consoles.

dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this issue Jun 2, 2022
This allows us to print the helpful messages that we have added
for our users before they enter dracut's emergency shell to all
configured consoles on the machine.

Closes coreos/fedora-coreos-tracker#954
dustymabe added a commit to coreos/fedora-coreos-config that referenced this issue Jun 3, 2022
This allows us to print the helpful messages that we have added
for our users before they enter dracut's emergency shell to all
configured consoles on the machine.

Closes coreos/fedora-coreos-tracker#954
@dustymabe dustymabe added the status/pending-testing-release Fixed upstream. Waiting on a testing release. label Jun 3, 2022
@dustymabe
Copy link
Member Author

The fix for this went into testing stream release 36.20220605.2.0. Please try out the new release and report issues.

@dustymabe dustymabe added status/pending-stable-release Fixed upstream and in testing. Waiting on stable release. and removed status/pending-testing-release Fixed upstream. Waiting on a testing release. labels Jun 7, 2022
@dustymabe
Copy link
Member Author

The fix for this went into stable stream release 36.20220605.3.0.

@dustymabe dustymabe removed the status/pending-stable-release Fixed upstream and in testing. Waiting on stable release. label Jun 22, 2022
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this issue Oct 10, 2023
This allows us to print the helpful messages that we have added
for our users before they enter dracut's emergency shell to all
configured consoles on the machine.

Closes coreos/fedora-coreos-tracker#954
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this issue Oct 10, 2023
This allows us to print the helpful messages that we have added
for our users before they enter dracut's emergency shell to all
configured consoles on the machine.

Closes coreos/fedora-coreos-tracker#954
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira kind/enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants