Bug 2457336
| Summary: | LUKS password missing when system has a serial console. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jeremy Linton <jeremy.linton> |
| Component: | anaconda | Assignee: | Martin Kolman <mkolman> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 44 | CC: | alpha, anaconda-maint, awilliam, kkoukiou, mkolman, rvykydal, w |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | aarch64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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: | |||
| Bug Blocks: | 245418 | ||
|
Description
Jeremy Linton
2026-04-10 16:30:11 UTC
Right, its not in the F43 1.6 release. I'm not sure 'anaconda running in graphical mode' is the correct test; it may depend on the package set deployed. we may not want rhgb on minimal installs. Looking at the code, anaconda-webui has nothing for this, only anaconda does, and the check is in pyanaconda/modules/storage/bootloader/base.py `Bootloader._set_graphical_boot_args`:
===
# Only add "rhgb quiet" on non-s390, non-serial installs.
if util.isConsoleOnVirtualTerminal() \
and (ts.dbMatch('provides', 'rhgb').count()
or ts.dbMatch('provides', 'plymouth').count()):
args = ["rhgb", "quiet"]
===
util.isConsoleOnVirtualTerminal() is implemented thus:
===
def get_active_console(dev="console"):
"""Find the active console device.
Some tty devices (/dev/console, /dev/tty0) aren't actual devices;
they just redirect input and output to the real console device(s).
These 'fake' ttys have an 'active' sysfs attribute, which lists the real
console device(s). (If there's more than one, the *last* one in the list
is the primary console.)
"""
# If there's an 'active' attribute, this is a fake console..
while os.path.exists("/sys/class/tty/%s/active" % dev):
# So read the name of the real, primary console out of the file.
console_path = "/sys/class/tty/%s/active" % dev
active = open(console_path, "rt").read()
if active.split():
# the active attribute seems to be pointing to another console
dev = active.split()[-1]
else:
# At least some consoles on PPC have the "active" attribute, but it is empty.
# (see rhbz#1569045 for more details)
log.warning("%s is empty while console name is expected", console_path)
# We can't continue to a next console if active is empty, so set dev to ""
# and break the search loop.
dev = ""
break
return dev
def isConsoleOnVirtualTerminal(dev="console"):
console = get_active_console(dev) # e.g. 'tty1', 'ttyS0', 'hvc1'
consoletype = console.rstrip('0123456789') # remove the number
return consoletype == 'tty'
===
*Maybe* it'd be safe to do something like this?
===
# Only add "rhgb quiet" on non-s390, non-serial installs.
if util.isConsoleOnVirtualTerminal() or install_is_graphical \
and (ts.dbMatch('provides', 'rhgb').count()
or ts.dbMatch('provides', 'plymouth').count()):
args = ["rhgb", "quiet"]
===
with an appropriate implementation of `install_is_graphical`. The `Anaconda` class has a `display_mode` property we could use but I don't know how we access it from here.
Note that passing `acpi=nospcr` to the installer works because acpi is in the `preserved_arguments` list of kernel args that are automatically "preserved" in the installed system...
er, `if (util.isConsoleOnVirtualTerminal() or install_is_graphical)` etc, i.e. it needs to be wrapped in parentheses. |