Bug 1401325

Summary: Unable to enter password with console=ttyUSB0
Product: [Fedora] Fedora Reporter: Jonas Jonsson <jonas>
Component: dracutAssignee: dracut-maint-list
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 27CC: dominik, dracut-maint-list, harald, jonas, jonathan, zbyszek
Target Milestone: ---   
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: 2018-11-30 18:17:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
udevadm info -a /dev/ttyUSB0 none

Description Jonas Jonsson 2016-12-04 20:03:15 UTC
Description of problem:
I run a headless server with serial console access via an USB-Serial converter.

During boot the password prompt for the encrypted disks are shown on tty0 instead of the serial console despite console=ttyUSB0.

I get the kernel log on the serial console but not the password prompt. On tty0 a message about disks that are found and the password prompt is shown, nothing else.

This worked fine with Fedora 23.

By looking at the log during boot it's possible to see
...
dec 03 21:14:46 bender systemd[1]: Starting Show Plymouth Boot Screen...
dec 03 21:14:46 bender systemd[1]: Starting dracut initqueue hook...
dec 03 21:14:46 bender systemd[1]: Received SIGRTMIN+20 from PID 362 (plymouthd).
dec 03 21:14:46 bender audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=plymouth-start comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
dec 03 21:14:46 bender systemd[1]: Started Show Plymouth Boot Screen.
dec 03 21:14:46 bender systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.
dec 03 21:14:46 bender systemd[1]: Reached target Paths.
....
dec 03 21:14:46 bender systemd[1]: Reloading.
....
dec 03 21:14:46 bender kernel: usb 1-1.4: pl2303 converter now attached to ttyUSB0
dec 03 21:14:46 bender kernel: console [ttyUSB0] enabled

This hints that plymouth is started before the ttyUSB0 driver is loaded which is probably the cause of the problem.

A workaround is to append plymouth.enable=0 to the kernel cmdline. This might be pure luck that the systemd-ask-password-console is started later, but it works for now.

Version-Release number of selected component (if applicable):
dracut-044-78.fc25.x86_64

How reproducible:
Every boot.

Steps to Reproduce:
1. Use encrypted disks.
2. Use console=ttyUSB0

Actual results:
No password prompt on serial console.

Expected results:
Working password prompt.

Additional info:

Comment 1 Harald Hoyer 2017-01-12 13:08:43 UTC
Hmm, this needs a quirk on the kernel command line like 
"rd.modules-load=<usbdriver>" (for systemd-modules-load)
or "rd.driver.pre=<usbdriver>" (for dracut)

Comment 2 Harald Hoyer 2017-01-12 13:09:51 UTC
What is the name of the kernel module needed, btw?

Comment 3 Jonas Jonsson 2017-01-16 19:19:32 UTC
(In reply to Harald Hoyer from comment #1)
> Hmm, this needs a quirk on the kernel command line like 
> "rd.modules-load=<usbdriver>" (for systemd-modules-load)
> or "rd.driver.pre=<usbdriver>" (for dracut)

Shouldn't it be enough with this in the dracut conf?

$ cat /etc/dracut.conf.d/50-add_pl2303.conf 
add_drivers+="pl2303"

Comment 4 Harald Hoyer 2017-01-18 10:38:26 UTC
(In reply to Jonas Jonsson from comment #3)
> (In reply to Harald Hoyer from comment #1)
> > Hmm, this needs a quirk on the kernel command line like 
> > "rd.modules-load=<usbdriver>" (for systemd-modules-load)
> > or "rd.driver.pre=<usbdriver>" (for dracut)
> 
> Shouldn't it be enough with this in the dracut conf?
> 
> $ cat /etc/dracut.conf.d/50-add_pl2303.conf 
> add_drivers+="pl2303"

1. add spaces before and after the driver:
add_drivers+=" pl2303 "

2. in /usr/lib/dracut/modules.d/50plymouth/plymouth-pretrigger.sh
a udev trigger of various subsystems is called, which does not seem to trigger loading of your module, so you have to add the quirk with "rd.driver.pre".

What is the output of:

# udevadm info -a /dev/ttyUSB0

??

Comment 5 Jonas Jonsson 2017-01-26 21:24:45 UTC
(In reply to Harald Hoyer from comment #4)
> (In reply to Jonas Jonsson from comment #3)
> > (In reply to Harald Hoyer from comment #1)
> > > Hmm, this needs a quirk on the kernel command line like 
> > > "rd.modules-load=<usbdriver>" (for systemd-modules-load)
> > > or "rd.driver.pre=<usbdriver>" (for dracut)
> > 
> > Shouldn't it be enough with this in the dracut conf?
> > 
> > $ cat /etc/dracut.conf.d/50-add_pl2303.conf 
> > add_drivers+="pl2303"
> 
> 1. add spaces before and after the driver:
> add_drivers+=" pl2303 "
I guess it worked because this was the only "add_drivers". I've fixed that.

> 
> 2. in /usr/lib/dracut/modules.d/50plymouth/plymouth-pretrigger.sh
> a udev trigger of various subsystems is called, which does not seem to
> trigger loading of your module, so you have to add the quirk with
> "rd.driver.pre".
> 
> What is the output of:
> 
> # udevadm info -a /dev/ttyUSB0
I've created an attachment.

Comment 6 Jonas Jonsson 2017-01-26 21:25:14 UTC
Created attachment 1244852 [details]
udevadm info -a /dev/ttyUSB0

Comment 7 Jonas Jonsson 2017-01-26 21:27:25 UTC
I guess adding
--subsystem-match=usb-serial
in /usr/lib/dracut/modules.d/50plymouth/plymouth-pretrigger.sh would be a solution.

Comment 8 Harald Hoyer 2017-01-30 09:47:13 UTC
(In reply to Jonas Jonsson from comment #7)
> I guess adding
> --subsystem-match=usb-serial
> in /usr/lib/dracut/modules.d/50plymouth/plymouth-pretrigger.sh would be a
> solution.

yes, and in the case of systemd in the initramfs, it additionally needs some fixing. Especially a udevadm settle.

Comment 9 Harald Hoyer 2017-01-30 09:55:00 UTC
added https://github.com/systemd/systemd/issues/5183

Comment 10 Fedora End Of Life 2017-11-16 19:20:08 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 Jonas Jonsson 2017-11-17 09:11:04 UTC
The github linked bug is still open.

Comment 12 Ben Cotton 2018-11-27 18:11:48 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Ben Cotton 2018-11-30 18:17:25 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.