Bug 2457336 - LUKS password missing when system has a serial console.
Summary: LUKS password missing when system has a serial console.
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 44
Hardware: aarch64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Martin Kolman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2026-04-10 16:30 UTC by Jeremy Linton
Modified: 2026-04-14 12:16 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeremy Linton 2026-04-10 16:30:11 UTC
This is in the "serious consequences from trivial issue" category. A lot of these arm systemready machines are default providing SPCR per the old SBSA/etc documentation which required it if a serial console is present. And this isn't by itself a problem except that the kernel likes to make it the default text console, again not a big deal because booting the fedora workstation installer that just means that all the kernel/etc messages are going out the serial console and fedora jumps from the grub menu, to the live image UI.

But then the new webui seems to be noticing this and instead of tossing 'rhgb silent' into the grub config leaving it out. Again not an issue unless the user also selects to LUKs encrypt the volume. At which point there is never a GUI password prompt because its going out the web console. If the user tosses 'acpi=nospcr' into the command line during install everything works as expected, but then if they toss it in after the install to move the password prompt back to the graphical console they also need to add 'rhgb' to get the graphical console. 

So, anaconda should probably be noticing that its running in graphics mode and go ahead and add the rhgb all the time.


Reproducible: Always

Steps to Reproduce:
1. M1 + virt-manager + F44 RC 1.1 workstation image
2. Install and select encrypted volume in graphical/default mode
3. Notice machine boots and never displays a password prompt. it just hangs.
Actual Results:
Password prompt is on alternate serial port (maybe correctly)
But then with acpi=nospcr it shows up on the graphics console in text mode, but rhgb is missing so its not the pretty graphical screen.

Comment 1 Jeremy Linton 2026-04-10 17:46:14 UTC
Right, its not in the F43 1.6 release.

Comment 2 Jeremy Linton 2026-04-10 17:50:36 UTC
Ignore comment 1, wrong BZ.

Comment 3 Adam Williamson 2026-04-10 17:59:45 UTC
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.

Comment 4 Adam Williamson 2026-04-10 18:11:38 UTC
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...

Comment 5 Adam Williamson 2026-04-10 18:18:59 UTC
er, `if (util.isConsoleOnVirtualTerminal() or install_is_graphical)` etc, i.e. it needs to be wrapped in parentheses.


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