#2 e2fsck: need terminal for interactive repairs using -w 0


This is using --version "cryptmount-4.0" from the Ubuntu package 4.0-1.

I have a LUKS partition and would like to unlock it using a keyfile. The way to do this apparently is:

michael@sweetwater:/mnt$ cat /path/to/keyfile | cryptmount -w 0 encrypted
sh: /sbin/udevsettle: not found
sh: /sbin/udevsettle: not found
e2fsck 1.41.9 (22-Aug-2009)
e2fsck: need terminal for interactive repairs

As per the messages above, this doesn't work with the default flags. I need to specify nofsck in cmtab.


  • RW Penney
    RW Penney

    Hello Michael,
    I think there are two aspects to your enquiry: firstly, the use of the '-w' or '--passwd-fd' flag, and secondly the 'udevsettle' messages.

    If you want to use a keyfile containing your (unencrypted) password, while keeping fd=0 connected to the terminal so that fsck can run interactively, you could try something like 'cryptmount -w 5 encrypted 5< /path/to/keyfile'. If this works then there should be no need for the 'nofsck' flag in /etc/cryptmount/cmtab.

    The 'udevsettle' error message is a legacy from the LUKS utilities within cryptsetup-1.0.x. Future releases of cryptmount-4.1 should avoid that warning. I don't think the warning message will (generally) prevent cryptmount from completing the requested operation.

  • RW Penney
    RW Penney

    • priority: 5 --> 4
    • status: open --> open-later
    • status: open-later --> closed
  • Hey, thanks, using -w 5 and < works great. I'm closing this then.

  • Just FWIW, since I am using cryptmount as part of a script and I am trying to capture it's output for use in error messages, I'm still running into the problem (simply using cryptmount > file) causes fsck to complain, so I am back to using nofsck.

    Probably nothing that can be done about it, just wanted to add it for completeness sake.

  • a_brandl


    If you'd like to enter the password with some external program (e.g. zenity), the
    following fragment might work:

    exec 5< <(zenity --entry --text "Enter password" --hide-text)
    cryptmount --passwd-fd 5 encrypted

    It took me some time to get the syntax right :-)