Bug 1306640 - Some values for root= in the cmdline cause "Cannot add dependency" errors during boot
Summary: Some values for root= in the cmdline cause "Cannot add dependency" errors dur...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut
Version: 7.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Release Test Team
Depends On:
Blocks: ovirt-node-ng ovirt-node-ng-platform ovirt-node-ng-43-el76-platform
TreeView+ depends on / blocked
Reported: 2016-02-11 14:01 UTC by Fabian Deutsch
Modified: 2018-04-10 18:10 UTC (History)
13 users (show)

Fixed In Version: dracut-033-534.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-04-10 18:07:53 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0964 0 None None None 2018-04-10 18:10:22 UTC

Description Fabian Deutsch 2016-02-11 14:01:32 UTC
Description of problem:
The following kernel commandline:

Kernel command line: BOOT_IMAGE=/ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1/vmlinuz-3.10.0-327.4.5.el7.x86_64 root=/dev/onn/ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1 ro crashkernel=auto rd.lvm.lv=onn/ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1 rd.lvm.lv=onn/swap rhgb quiet LANG=en_US.UTF-8 img.bootid=ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1 

Causes the following error message:
Feb 11 14:47:46 localhost systemd[1]: Cannot add dependency dev-onn-ovirt\x2dnode\x2dng\x2d4.0.0\x2d0.0.master.20160211.0.el7+1.device to initrd.target, ignoring: Invalid argument

By swithcing to the following root= argument the error goes away:

Version-Release number of selected component (if applicable):
RHEl 7.2
# rpm -q systemd kernel dracut

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 1 Lukáš Nykrýn 2016-02-11 15:07:19 UTC
If you still have a reproducer, could you add rd.break to command line and post here content of /etc/systemd/system/initrd.target.wants?

Comment 2 Fabian Deutsch 2016-02-11 15:16:09 UTC
It only has dev-centos_installed-swap.device

Comment 3 Fabian Deutsch 2016-02-22 07:18:01 UTC
Anything else I can help with?

Comment 5 Fabian Deutsch 2016-02-23 14:11:48 UTC
I installed the scratch build and tried the following:

1. Installed the new build
2. Reboot
3. dracut -f …
4. Reboot

After 2: Error msg is still shown
After 4: Error msg is still shown.

I can not observer any change in behavior

Comment 6 Harald Hoyer 2016-03-08 15:29:06 UTC
might be a dracut bug creating the device unit name.

Comment 8 Fabian Deutsch 2016-05-17 11:08:51 UTC

Comment 9 Harald Hoyer 2016-07-22 10:04:48 UTC
please also search in /run and /usr

# grep -R . /{run,etc,usr/lib}/systemd/system/initrd.target.wants/*.device

Comment 10 Fabian Deutsch 2016-07-22 12:01:38 UTC
# grep -R . /{run,etc,usr/lib}/systemd/system/initrd.target.want 
grep: /run/systemd/system/initrd.target.wants/*.device: No such file or directory
grep: /etc/systemd/system/initrd.target.wants/*.device: No such file or directory
grep: /usr/lib/systemd/system/initrd.target.wants/*.device: No such file or directory

# find /{run,etc,usr/lib}/systemd/system/ | grep initrd

Comment 11 Fabian Deutsch 2016-07-22 12:04:17 UTC
# journalctl -b | egrep "Cannot|witch Ro"
Jul 22 13:45:09 localhost systemd[1]: Cannot add dependency dev-r4b_slot\x2d6c-rhvh\x2d4.0\x2d0.20160714.3+1.device to initrd.target, ignoring: Invalid argument
Jul 22 13:45:09 localhost systemd[1]: Cannot add dependency job for unit multipathd.service, ignoring: Unit blk-availability.service failed to load: No such file or directory.
Jul 22 13:45:11 localhost systemd[1]: Reached target Switch Root.
Jul 22 13:45:11 localhost systemd[1]: Starting Switch Root.
Jul 22 13:45:11 localhost systemd[1]: Starting Switch Root...

To give an idea where/when it is happening

Comment 12 Fabian Deutsch 2016-08-31 08:42:08 UTC
We are still seeing this, in production now - any news?

Comment 13 Sandro Bonazzola 2017-06-07 07:53:04 UTC
Still around in 7.3

Comment 15 Lukáš Nykrýn 2017-06-08 10:46:53 UTC
I am really sory for late answer. I have backported couple of patch that should improve how dracut mangle device names

Comment 17 Lukáš Nykrýn 2017-06-08 10:48:03 UTC

Comment 20 Lukáš Nykrýn 2018-01-05 08:54:05 UTC
devel-ack for merging patches from https://github.com/lnykryn/dracut/commits/bz1306640

Comment 21 Jan Stodola 2018-01-05 09:04:29 UTC
what patches exactly would be merged?

Comment 23 Jan Stodola 2018-01-10 11:54:45 UTC
Hi Fabian,
I'm not able to reproduce this problem, tested on RHEL-7.2 and RHEL-7.4, system booted correctly in both cases. The kernel command line was:

[root@localhost ~]# dmesg | grep "Kernel command line"
[    0.000000] Kernel command line: BOOT_IMAGE=/ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1/vmlinuz-3.10.0-327.el7.x86_64 root=/dev/rhel/ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1 ro crashkernel=auto rd.lvm.lv=rhel/ovirt-node-ng-4.0.0-0.0.master.20160211.0.el7+1 rd.lvm.lv=rhel/swap console=ttyS0 LANG=en_US.UTF-8
[root@localhost ~]#

Would you help with verification of this bug once there is a fix, please?

Comment 24 Fabian Deutsch 2018-01-13 19:51:03 UTC
Let me redirect this to Ryan - as this was seen on RHVH

Comment 25 Ryan Barry 2018-01-29 12:13:49 UTC
This is definitely still reproducible, and it looks like a UTF8 encoding bug, Jan.

[    0.964269] systemd[1]: Cannot add dependency dev-rhvh-rhvh\x2d4.2.1.2\x2d0.20180126.0+1.device to initrd.target, ignoring: Invalid argument

The actual LV is rhvh- The hyphens in the LV name should be `-`, not \x2d

Comment 34 errata-xmlrpc 2018-04-10 18:07:53 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, and where to find the updated
files, follow the link below.

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


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