Crypttab - wait for encrypted volume before mounting VeraCrypt container

Dear community,

I’m using Manjaro KDE with an encrypted /home drive (unlocked by password). Additionally to that I’ve got an encrypted VeraCrypt partition for shared use with my Windows 11 installation. The VeraCrypt drive is getting unlocked with a key file that’s located on my /home drive.
To unlock the VeraCrypt partition at boot, I’ve configured the /etc/crypttab:

veracrypt-data /dev/nvme0n1p8 /dev/null tcrypt-veracrypt,tcrypt-keyfile=/home/user/veracrypt-keyfile

And in the /etc/fstab:

/dev/mapper/veracrypt-data /home/user/veracrypt_data auto uid=1000,gid=1000,nodev,nofail 0 0

The problem that I now have is that the crypttab is executed at boot before my /home drive is mounted via password. I get this while the boot process:

[FAILED] Failed to start Cryptography Setup for veracrypt-data
[DEPEND] Dependency failed for Lucal Encrypted Volumes.
[DEPEND] Dependency failed for /dev/mapper/veracrypt-data

Is there a way to let crypttab wait until the encrypted /home is mounted?

Kind regards
Tobias

I guess you should not even put it in crypttab, then
because it can’t be accessed until the filesystem containing it is mounted

perhaps have your $HOME mounted via crypttab instead - or use systemd-mount unit to have it wait for $HOME to be mounted

these where just some thoughts, nothin concrete

others have more insight and experience than I have

:point_up:

1 Like

The perhaps most obvious thing to do just would not occur to me (and to you) the first time around :man_facepalming:

Why not just move the key file to somewhere else - where it can be accessed?

… work smarter, not harder :grin:

You might as well have said: “Why not just remove the encryption?”
(The OP obviously has a desire to protect that key also :wink:)

true
It seems I can’t think straight anymore - not today at least.

Hello.
I have a similar problem. Have you found a solution?

Unfortunately - no, not yet :pensive:

No necro-bumping, please. If you have “a similar problem”, start a new thread. Thank you. :wink: