Skip to content

cryptsetup: Don't try to tear down LUKS devices with rd.luks during shutdown #38803

@cgwalters

Description

@cgwalters

systemd version the issue has been seen with

257

Used distribution

CentOS Stream 10

Linux kernel version used

6.12.0-124.el10.x86_64

CPU architectures issue was seen on

x86_64

Component

systemd-cryptsetup

Expected behaviour you didn't see

See ostreedev/ostree#3503

Basically right now systemd-cryptsetup-generator has support for x-initrd.attach in /etc/crypttab to say not to unmount the LUKS device backing / during shutdown.

But installation tools need to know to add that. Instead since we already need to have rd.luks.uuid= or so on the kernel cmdline, the generator should automatically imply the same effect for the mount units it generates, around here

if (!attach_in_initrd(name, options))
(basically if there's a karg present too).

Unexpected behaviour you saw

This is especially important for soft reboots, where today having this Conflicts=umount.target causes transaction conflicts and a total failure to soft reboot.

Steps to reproduce the problem

Install CentOS Stream 10 with Anaconda + LUKS. (Or Fedora, or...)

Additional program output to the terminal or log subsystem illustrating the issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions