I have a LUKS-formatted volume and crypttab that contains the following:

cryptdata    UUID=3e26bc03-...    /etc/cryptdata.key

When the system boots, systemd asks me the password for this volume twice and after me just pressing the Enter key it successfully mounts the volume using the given key. How to deal with this behaviour?

  • 1
    What do you mean by "deal with this behaviour"? It seems like everything is doing what it's supposed to. What do you expect to happen compared to what does happen? – etskinner May 7 '17 at 15:34
  • @etskinner, I want it to stop asking for passwords (for there's none, I've initially formatted it with key file instead of password) and just use the file. – user230253 May 7 '17 at 16:04
  • Keyfile contains random data, like dd if=/dev/urandom of=/etc/keyfile.key bs=1024 count=4. – user230253 May 7 '17 at 16:04

Try adding the noearly option as the fourth field for that device in your /etc/crypttab; it could be that the version of /etc being used during early boot doesn't have the key.

Failing that, you can always mark it noauto and have a systemd unit or script mount it significantly later in the bootup process.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.