Bug 1531507 - dracut-initqueue fails to properly deal with \ escapes
Summary: dracut-initqueue fails to properly deal with \ escapes
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-05 11:30 UTC by Valdis Kletnieks
Modified: 2018-01-18 09:09 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-01-18 09:09:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Valdis Kletnieks 2018-01-05 11:30:35 UTC
Description of problem:

Am seeing this at system boot:

journalctl -xb | grep cryptsetu

Jan 05 05:45:17 turing-police.cc.vt.edu systemd[1]: Created slice system-systemd\x2dcryptsetup.slice.
-- Subject: Unit systemd-cryptsetup@luks\x2d665bb147\x2d9e39\x2d4003\x2db3ae\x2d7be925f51a97.service has begun start-up
-- Unit systemd-cryptsetup@luks\x2d665bb147\x2d9e39\x2d4003\x2db3ae\x2d7be925f51a97.service has begun starting up.
Jan 05 05:45:18 turing-police.cc.vt.edu dracut-initqueue[340]: Failed to start systemd-cryptsetup: Unit systemd-cryptsetup not found.

systemd-cryptsetup-generator does its job, and builds a .service file which gets launched so I can enter the LUKS password and continue on with the boot.  Unfortunately, it feeds a copy to dracut-initqueue, which takes all the \x2 escapes and loses the backslash, resulting in trying to find a non-existent unit.

Version-Release number of selected component (if applicable):
dracut-046-36.git20171201.fc28.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Harald Hoyer 2018-01-10 10:34:48 UTC
what is your kernel command line?

Comment 2 Valdis Kletnieks 2018-01-10 16:27:43 UTC
linuxefi /vmlinuz-4.15.0-rc6-next-20180104-dirty root=/dev/mapper/turing--police-root ro rd.md=0 rd.dm=0 rd.lvm.lv=turing-police/00 console.keymap="" rd
.luks.uuid=luks-665bb147-9e39-4003-b3ae-7be925f51a97 rd.lvm.lv=turing-police/swap rd.lvm.lv=turing-police/root quiet LANG=en_US.UTF-8 nouveau.modeset=0 rd.drive
r.blacklist=nouveau video=vesa:off

So the command line has uuid= luks-665b...

This gets expanded for reasons I don't understand to luks\x2d665b by systemd-cryptluks-generator when it generates the service name. So the '-' is now \x2d.

A copy of that name gets handed to dracut-initqueue,but along the way something botches the de-escape and ends up with luksx2d665b  If it had left the \ alone it would be OK.

Comment 4 Valdis Kletnieks 2018-01-13 10:02:02 UTC
(In reply to Harald Hoyer from comment #3)
> https://github.com/dracutdevs/dracut/commit/
> 0f6d93eb9d63695a64002ec8b0421fbc9fc8a7a3

Hand-patched that one onto my system, confirming all works correctly now.

Comment 5 Harald Hoyer 2018-01-18 09:09:12 UTC
dracut-046-92.git20180118.fc28


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