From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OEMV8-00083c-Db for garchives@archives.gentoo.org; Tue, 18 May 2010 13:06:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF93DE0656; Tue, 18 May 2010 13:05:26 +0000 (UTC) Received: from borg.medozas.de (unknown [188.40.89.202]) by pigeon.gentoo.org (Postfix) with ESMTP id 80F9AE0656 for ; Tue, 18 May 2010 13:05:26 +0000 (UTC) Received: by borg.medozas.de (Postfix, from userid 25121) id 202B9F0A2D1A6; Tue, 18 May 2010 15:05:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by borg.medozas.de (Postfix) with ESMTP id 183003776; Tue, 18 May 2010 15:05:24 +0200 (CEST) Date: Tue, 18 May 2010 15:05:24 +0200 (CEST) From: Jan Engelhardt To: "Stefan G. Weichinger" cc: gentoo-user@lists.gentoo.org, Daniel Troeder , walt , Florian Philipp , Jason Dusek , Till Maas , hanno@gentoo.org Subject: [gentoo-user] Re: Kernel upgrade and now LUKS failure In-Reply-To: <4BF108F3.1080304@xunil.at> Message-ID: References: <4BF108F3.1080304@xunil.at> User-Agent: Alpine 2.01 (LSU 1266 2009-07-14) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archives-Salt: 0216dbbd-7447-459f-ba23-fa31508c8a17 X-Archives-Hash: 1a53a90dccdace1799a9b925eb6e6349 On Monday 2010-05-17 11:14, Stefan G. Weichinger wrote: >Am 16.05.2010 14:36, schrieb Jan Engelhardt: >> [Replying to >> http://thread.gmane.org/gmane.linux.gentoo.user/229533/focus=229542 >> ] >> >> Second, it's using echo without the -n parameter, thus implicitly >> inserting a newline into the key -- which is the cause for yoru >> observed mounting problems. >> >> Third, because you are passing the key via stdin into cryptsetup, it >> only uses the first line of whatever you pipe into it; whereas >> pam_mount uses the entire keyfile as it is supposed to be. >>[...] >Jan, thanks for your suggestions. > >I created a new LUKS-volume and tried to avoid all the mentioned >pitfalls (I used "echo -n", avoided stdin etc.), but this didn't help here. To be sure, use openssl -d ... | hexdump -C to detect newlines in the key. The shell has far too many occasions where \n gets stripped or added.