# SELF-SOLVED: Cannot luksFormat a partition

## mrspam

Hi, I tried to encrypt an empty partition on my harddisk, but it seems, that I'm stuck just before finishing the process. The error only shows up when I try to use a key file during the loksFormat:

Works:

```
tvbox ~ # cryptsetup -c aes-lrw-benbi:sha384 -y -s 384 luksFormat /dev/sda4

WARNING!

========

This will overwrite data on /dev/sda4 irrevocably.

Are you sure? (Type uppercase yes): YES

Enter LUKS passphrase:

Verify passphrase: 

Command successful.

tvbox ~ # 
```

Doesn't work:

```
tvbox ~ # cryptsetup -c aes-lrw-benbi:sha384 -y -s 384 luksFormat /dev/sda4 /root/key.sda4 

WARNING!

========

This will overwrite data on /dev/sda4 irrevocably.

Are you sure? (Type uppercase yes): YES

Command failed: Can't do passphrase verification on non-tty inputs

tvbox ~ #
```

Unfortunately, I didn't find any help / explanation for this error message.

I'm using:

```
tvbox ~ # uname -a

Linux tvbox 2.6.26-gentoo-r1 #4 SMP PREEMPT Mon Oct 20 22:35:02 CEST 2008 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GenuineIntel GNU/Linux

tvbox ~ # 
```

```
tvbox ~ # emerge -pv cryptsetup

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] sys-fs/cryptsetup-1.0.6-r2  USE="nls -build -dynamic (-selinux)" 0 kB 

Total: 1 package (1 reinstall), Size of downloads: 0 kB

tvbox ~ # 
```

Any ideas??Last edited by mrspam on Tue Oct 21, 2008 9:20 am; edited 1 time in total

----------

## mrspam

Sorry, guys, I just found (after trying for hours) the cause of the problem. I may not use the switch "-y" when adding a key file parameter...

So, this is solved...  :Wink: 

----------

