RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1977446 - fresh install of 8.4 with luks volume fails to boot if /var is dedicated mount point
Summary: fresh install of 8.4 with luks volume fails to boot if /var is dedicated moun...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: plymouth
Version: 8.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 8.5
Assignee: Ray Strode [halfline]
QA Contact: Tomas Pelka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-29 18:39 UTC by John Pittman
Modified: 2021-11-10 01:51 UTC (History)
8 users (show)

Fixed In Version: plymouth-0.9.4-10.20200615git1e36e30.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 18:52:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6153452 0 None None None 2021-06-30 13:33:31 UTC
Red Hat Product Errata RHBA-2021:4334 0 None None None 2021-11-09 18:52:28 UTC

Description John Pittman 2021-06-29 18:39:38 UTC
Description of problem:

A fresh install of 8.4 with luks volume fails to boot.  Adding _netdev to the volume in /etc/fstab works around the failure.  Issue persists through yum update.

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

cryptsetup-2.3.3-4.el8.x86_64
crypto-policies-scripts-20210209-1.gitbfb6bed.el8_3.noarch
libblockdev-crypto-2.24-5.el8.x86_64
libxcrypt-4.1.1-4.el8.x86_64
crypto-policies-20210209-1.gitbfb6bed.el8_3.noarch
cryptsetup-libs-2.3.3-4.el8.x86_64
systemd-239-45.el8_4.1.x86_64
systemd-udev-239-45.el8_4.1.x86_64
systemd-libs-239-45.el8_4.1.x86_64
systemd-pam-239-45.el8_4.1.x86_64
systemd-container-239-45.el8_4.1.x86_64

How reproducible:

Every time

Steps to Reproduce:

Install via 8.4 GUI binary DVD with luks volume on standard partitition

Actual results:

System fails to boot after install

Expected results:

System should boot

Comment 7 Renaud Métrich 2021-06-30 12:35:06 UTC
I can reproduce at will, it's enough to have /var be on a dedicated partition and /home (or any other non-essential mount point) as a LUKS device.
Booting with debug rd.debug systemd.debug-shell=1 on the kernel command line, I could collect the journal after switching to tty9 and I found this:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# grep "systemd-ask-password-plymouth" journal.txt.fail | cut -d' ' -f3,5-
11:28:15.795525 systemd[1]: systemd-ask-password-plymouth.path: ConditionVirtualization=!container succeeded.
11:28:15.795532 systemd[1]: systemd-ask-password-plymouth.path: ConditionPathExists=/run/plymouth/pid succeeded.
11:28:15.795546 systemd[1]: systemd-ask-password-plymouth.path: ConditionKernelCommandLine=!plymouth.enable=0 succeeded.
11:28:15.795575 systemd[1]: systemd-ask-password-plymouth.path: Changed dead -> waiting
11:28:15.795578 systemd[1]: systemd-ask-password-plymouth.path: Job systemd-ask-password-plymouth.path/start finished, result=done
11:28:16.183735 systemd[1]: systemd-ask-password-plymouth.path: Changed dead -> waiting
11:28:17.002991 systemd[1]: systemd-ask-password-plymouth.path: Got triggered.
11:28:17.002996 systemd[1]: systemd-ask-password-plymouth.service: Trying to enqueue job systemd-ask-password-plymouth.service/start/replace
11:28:17.003021 systemd[1]: systemd-ask-password-plymouth.service: Installed new job systemd-ask-password-plymouth.service/start as 271
11:28:17.003026 systemd[1]: systemd-ask-password-plymouth.service: Enqueued job systemd-ask-password-plymouth.service/start as 271
11:28:17.003031 systemd[1]: systemd-ask-password-plymouth.path: Changed waiting -> running
11:28:17.015320 systemd[1]: systemd-ask-password-plymouth.service: ConditionPathExists=/var/run/plymouth/pid failed.
11:28:17.015322 systemd[1]: systemd-ask-password-plymouth.service: Starting requested but condition failed. Not starting unit.
11:28:17.015326 systemd[1]: systemd-ask-password-plymouth.service: Job systemd-ask-password-plymouth.service/start finished, result=done
11:28:17.015330 systemd[1]: systemd-ask-password-plymouth.path: Got notified about unit deactivation.
11:28:17.015356 systemd[1]: systemd-ask-password-plymouth.path: Changed running -> waiting
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

From above, we can see that systemd-ask-password-plymouth.path starts watching the path used to request a passphrase.
This ends up triggering systemd-ask-password-plymouth.service but the later fails, due to no having /var/run/plymouth/pid file.

This happens because /var is a dedicated mount point, hence at the time switchroot happens, it's not mounted, hence /var/run which is a symlink to /run doesn't exist yet:
it's created by systemd-tmpfiles-create.service which didn't execute yet since it will execute only once file systems are mounted.

The solution here is to amend systemd-ask-password-plymouth.service unit to rely on /run/plymouth/pid instead, which can be done by creating a unit override:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
# sed "s#^ConditionPathExists=/var/run/plymouth/pid#ConditionPathExists=/run/plymouth/pid#" /usr/lib/systemd/system/systemd-ask-password-plymouth.service > /etc/systemd/system/systemd-ask-password-plymouth.service
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

For users installing manually and not through a kickstart, they can use the following workaround to boot, then apply the sed command above:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
plymouth.enable=0
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Comment 8 Renaud Métrich 2021-06-30 12:42:18 UTC
Minimal reproducer:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
ignoredisk --only-use=vda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part swap --fstype="swap" --ondisk=vda --size=2048
part /home --fstype="xfs" --ondisk=vda --size=1026 --encrypted --luks-version=luks2
part / --fstype="xfs" --ondisk=vda --size=8192
part /boot --fstype="xfs" --ondisk=vda --size=1024
part /var --fstype="xfs" --ondisk=vda --size=2048
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Note above:
- /var is NOT encrypted and directly on disk (NO LVM).
- /home is encrypted and directly on disk.

Comment 9 David Tardon 2021-07-01 11:29:01 UTC
Early boot services really shouldn't depend on any mounts with the exception of /, /run, and /tmp. Also, use of /var/run has been discouraged for about a decade now.

Comment 17 errata-xmlrpc 2021-11-09 18:52:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (plymouth bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4334


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