Skip to content

systemd-cryptsetup: Booting with encrypted root partition fails instantly #6381

@averyvigolo

Description

@averyvigolo

Submission type

Bug report

systemd version the issue has been seen with

systemd 234
+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN default-hierarchy=hybrid

Used distribution

Arch Linux (testing repos)
uname -a:

Linux hostname 4.12.2-1-ARCH #1 SMP PREEMPT Sat Jul 15 20:18:04 UTC 2017 x86_64 GNU/Linux

Downstream issue

In case of bug report: Expected behaviour you didn't see

I should be prompted to enter a passphrase for the root partition, then boot should proceed as normal.

In case of bug report: Unexpected behaviour you saw

  • Failed to start Cryptography Setup for root...
  • Dependency failed for Encrypted Volumes, dev-mapper-root.device, Initrd Boot Device, FS check, /sysroot, Initrd Root Device, Reload Configuration from the Real Boot
  • Drops to emergency mode, but no recovery shell starts

Image

In case of bug report: Steps to reproduce the problem

  1. Have sysroot be a LUKS partition

  2. In bootloader use kernel options rw luks.name=<UUID of LUKS partition>=root root=/dev/mapper/root

  3. Build initramfs with hooks base systemd autodetect modconf block keyboard sd-vconsole sd-encrypt filesystems

  4. Reboot

Issue disappears after downgrading to last cached package - v233.

Workarounds:

  1. Fill in /etc/crypttab.initramfs with name, UUID, and none, rebuild initramfs, only specify root=/dev/mapper/name in kernel options

  2. Use luks.options=timeout=30s in kernel options. Values of 30s and 0s work as normal, but 0 causes the same behaviour.

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