I'm sorry; I misunderstood the -n switch of echo. As it turns out -n suppresses the output of the newline character. Interestingly, here is the diff of a file made in vim with the first line "passwords" (without the quotes, only the first line) and the output of echo -n "password diff keyvim2 keyecho 1c1 < password --- > password \ No newline at end of file One works with cryptsetup luksOpen /dev/sdb1 lvm --key-file keyfile.key The other does not. Naturally these instructions assume your encrypted volume is sdb1 and is luks encrypted with a key of "password". Of course the problem pops up without luks encrypted volumes as well used through cryptsetup. Just thought I'd note that. In any event, this should still be noted on the wiki (though correctly this time :) On Jan 22, 2009, at 2:20 PM, Manuel Wolfshant wrote: > On 01/23/2009 12:08 AM, jedcred wrote: >> [...] >> This is because cryptsetup needs a newline at the end of the keyfile. >> Just using a text editor like vim does not create a valid keyfile >> that >> cryptsetup can equate with a key for an encrypted volume. > yes, it does. if you ask it to. > >> This >> addition is (at least) worth six hours of my time, > I am so much in love with undocumented limitations... I share your > pain > here, I know the feelings > >> so hence may be >> worth about that much to anyone who may read this valuable addition. >> This limitation on cryptsetup and crypttab is not mentioned in the >> crypttab nor cryptsetup manuals at all. >> >> > any editor can add a newline. and simply adding to the current > instructions "make sure each line ends with a newline character (which > can be created by pressing <enter> at the end of the line" should be > enough > > my .02 euros > _______________________________________________ > CentOS-docs mailing list > CentOS-docs at centos.org > http://lists.centos.org/mailman/listinfo/centos-docs