Setting up Cryptsetup on a separate /home partition goes into emergency mode

Hi,

I recently made a fresh installation of Tumbleweed (snapshot 20241109). While setting up the system, I created 4 partitions:

  • /boot/eft, FAT, 0.50 GiB
  • swap, swap, 32 GiB
  • /, btrfs, snapshots enabled, 150GiB
  • /home, ext4, rest of the space.

Now I face a bizarre issue. When I turn on my system, it sometimes boots up just fine, and sometimes it fails to boot, and goes inside emergency mode (which probably meant something failed in fstab). Both issues happen after asking the cryptsetup password. Going inside the emergency mode by entering the root password, I ran the following command to see what failed:

systemctl --failed -l

  UNIT                               LOAD   ACTIVE SUB    DESCRIPTION
● systemd-cryptsetup@cr_home.service loaded failed failed Cryptography Setup for cr_home

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

1 loaded units listed.

I have setup other openSUSE instances (both Leap and Tumbleweed) with a similar setup before (infact there is Leap 15.6 in my laptop which is setup exactly this way), and this has never occurred.

Here is an output of the cryptsetup logs:

journalctl -xu systemd-cryptsetup@cr_home.service

Nov 11 14:40:13 BarunesPC systemd[1]: Starting Cryptography Setup for cr_home...
░░ Subject: A start job for unit systemd-cryptsetup@cr_home.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit systemd-cryptsetup@cr_home.service has begun execution.
░░ 
░░ The job identifier is 179.
Nov 11 14:40:17 BarunesPC systemd-cryptsetup[878]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/disk/by-uuid/16a2cccc-5e55-4319-9a6d-439f50db7dea.
Nov 11 14:40:19 BarunesPC systemd-cryptsetup[878]: Cannot use device /dev/disk/by-uuid/16a2cccc-5e55-4319-9a6d-439f50db7dea which is in use (already mapped or mounted).
Nov 11 14:40:19 BarunesPC systemd-cryptsetup[878]: Failed to activate with specified passphrase: Device or resource busy
Nov 11 14:40:19 BarunesPC systemd[1]: systemd-cryptsetup@cr_home.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit systemd-cryptsetup@cr_home.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Nov 11 14:40:19 BarunesPC systemd[1]: systemd-cryptsetup@cr_home.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit systemd-cryptsetup@cr_home.service has entered the 'failed' state with result 'exit-code'.
Nov 11 14:40:19 BarunesPC systemd[1]: Failed to start Cryptography Setup for cr_home.
░░ Subject: A start job for unit systemd-cryptsetup@cr_home.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit systemd-cryptsetup@cr_home.service has finished with a failure.
░░ 
░░ The job identifier is 179 and the job result is failed.
Nov 11 14:40:19 BarunesPC systemd[1]: systemd-cryptsetup@cr_home.service: Consumed 2.123s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit systemd-cryptsetup@cr_home.service completed and consumed the indicated resources.

And here is my fstab file if it helps:

cat /etc/fstab

UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /                       btrfs  defaults                      0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /var                    btrfs  subvol=/@/var                 0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /root                   btrfs  subvol=/@/root                0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /opt                    btrfs  subvol=/@/opt                 0  0
/dev/mapper/cr_home                        /home                   ext4   data=ordered                  0  2
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=10a56f4c-2628-4b9e-b935-ebbcacbaa7ef  swap                    swap   defaults                      0  0
UUID=4c36332c-30a9-454e-ba57-9ca1e8b2417c  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=02CB-89B4                             /boot/efi               vfat   utf8                          0  2

Thanks in advance!

When it happens next time, provide full output of journalctl -b, not just an arbitrary filtered content. Upload to the https://paste.opensuse.org/

This is rather useless without /etc/crypttab. It does not fail during mount, it fails setting up the device.

I basically just re-installed again without crypt, since it was a fresh install.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.