Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1kCRkp-0002OM-TC for mharc-grub-devel@gnu.org; Sun, 30 Aug 2020 14:08:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCRkn-0002OB-O6 for grub-devel@gnu.org; Sun, 30 Aug 2020 14:08:33 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCRkl-0005Uo-BI for grub-devel@gnu.org; Sun, 30 Aug 2020 14:08:33 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 09C175C011B for ; Sun, 30 Aug 2020 14:08:29 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 30 Aug 2020 14:08:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=fm1; bh=eBIzqyTGxNg6RVIVzm9r9FOrKWEbGJ7k3JRJowTm nkA=; b=cBW25gYmSTaoGefWMReFhfpSHPNImet5GlkTipAqsLRCXA6tR2BZFtxf rH5IG9f7L6F4VxZVlyIaFf1REEvkqiwRu6PSNx2xFYirPrZOVCes74mbHT44g4NW yjps6UGkgX1Ggfp8lnPBWsNwihcupmbyJ7INC4g67QZFoGFvU7mVVeLuREOkwlXM Oj8rz82fxCYSd/XJuCvLjRC5x9wt4qoaPrgXgzMKT6WWtC/U/1xMwEC4KqzEWvqX 3coWkIgDmA8iF3F4VQw4YBPsfROhD6hz+yI+e/v3KRoAqpNd8lan3Gw2uuJSF6pQ qKJAOH4AgVqB5A7dG/+1AXwWoS35fA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=eBIzqy TGxNg6RVIVzm9r9FOrKWEbGJ7k3JRJowTmnkA=; b=md4QqpH7popQo/2QpoDehe uvP5elowKMJS8bLCv8+lAG9JdqU8DPuD66A0kkad7814PoTCkhTqZop+POGecjua 8iG9vXpuT6G101xRYOmV0diE6/aDzWN2zEjSGR11jC/x0GI0GY2EOIDvutW6qNgE LC8lEzJ4HsFYwdIfFge8J8k6B4SiJbhlKXa90qNTGCxQRF4mHSLYi6moNq7ib4wJ zfwcMRMNJfVZfI8SCldOef5dQJqXdxKLGC6UFAgzgFSKjMQ5P7hwR2QBlOW7r0bE uu8sHgfiB/HIAs5WlKeVutfUGzHC20ml9Gmic5/p924F27SaI17gzbMVFBaotbGg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeffedguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepheeghfdtfeeuffehkefgffduleffjedthfdvjeektdfhhedvlefgtefgvdettdfh necukfhppeejjedrudeluddriedvrddukedunecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Received: from vm-mail.pks.im (x4dbf3eb5.dyn.telefonica.de [77.191.62.181]) by mail.messagingengine.com (Postfix) with ESMTPA id 4A5F3306005F for ; Sun, 30 Aug 2020 14:08:28 -0400 (EDT) Received: from localhost (tanuki [10.192.0.23]) by vm-mail.pks.im (OpenSMTPD) with ESMTPSA id cf81e1b5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sun, 30 Aug 2020 18:08:24 +0000 (UTC) Date: Sun, 30 Aug 2020 20:08:23 +0200 From: Patrick Steinhardt To: The development of GNU GRUB Subject: Re: Can grub-git be used to decrypt a LUKS2 encrypted partition? Testing Results Message-ID: <20200830180823.GA62141@tanuki.pks.im> References: <20200828165258.GA2097@tanuki.pks.im> <20200829111924.GA863@ncase.pks.intern> <20200829174741.GA1010@tanuki.pks.im> <0d7df8e8-ceff-2ef7-9924-b2968180f7df@archlinux.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <0d7df8e8-ceff-2ef7-9924-b2968180f7df@archlinux.org> Received-SPF: pass client-ip=66.111.4.28; envelope-from=ps@pks.im; helo=out4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/30 14:08:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2020 18:08:34 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 29, 2020 at 09:38:53PM -0400, Eli Schwartz wrote: > On 8/29/20 1:47 PM, Patrick Steinhardt wrote: > > This is usually done automatically by GRUB when starting. But as it'll > > not know to first decrypt the volume, it fails executing both of those > > commands just to show you the rescue prompt afterwards. So they are left > > to you now after manually decrypting. I could've added a note up-front > > to spare you the hours-long research, but it got so natural to me that I > > completely forgot. > >=20 > > You should be able to manually create a bootable image with GRUB with > > `grub-mkimage`. The upside of this is that you can add your own early > > configuration to automatically decrypt and do the `normal` dance. I > > didn't care enought to do that myself yet, though, so I can't provide a > > working invocation of that. >=20 > Is grub-install failing to add the relevant cryptomount invocation in > the embedded stub, due to not realizing luks2 can be decrypted like that? Yup. As I said in a previous mail, work to enable this is currently still under review. We first landed LUKS2 decryption support on its own, with tooling improvements and Argon2 support being the next step. > I wonder if you could hack this to work by relying on autodetection with > grub-install --modules=3D"..." to force luks2 modules to be included, but > with a luks1 "/" root partition. Then *after*, convert the partition > from luks1 to luks2. The grubx64.efi image should both support luks2 due > to manually added modules, AND automatically Do The Right Thing with the > generic cryptomount command. That does sound like quite a hack :) Even if it worked, it'd work only a single time as you cannot re-convert the partition again. My take is it'd probably be easier to just use grub-mkimage(1) instead with a custom config , at least if there is a place where it's properly documented. In the end, all these are just stop-gap measures anyway until support for auto-detection lands. Patrick --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF9hrgiFbCdvenl/rVbJhu7ckPpQFAl9L6xYACgkQVbJhu7ck PpSIPw/8DoPnTr5Rs5xcLf5i7prN2oxd0XD5kapTL9cp47Kw5vNn4XO3yb5H9/8T HzBrusisPgdM2D7aywGYZD78meC0HvODpQN+Zg3loA0Vb/MhoUVdwvZpdF1Ae63/ /b3rcMEqhnStXG8nCUfqayP2JngFf9e0wbGDIhqIMVSOuGXg7UQQplZ2p8t5bYWi xVeZdCndNNbwQlrJ29NKz6JYbhzKvDKrJXZaciSuL0fz5C6dUaDqkkUUdJ0hy/Il 1eXPdMllvV0Zc2sIuD7rtQOYETvsCg9R8eW6NtWMQlF2p16X7yInOj486FdzMjL1 rgM9JI/fzaSZAn69wfm+eEgozhQtejqyTMmTIxIpmp/6GsNd8sr6DdVy2nh+pXFP OZY0HyyphZikPRhpcr9H6iwYUqxNaAtO7saZjCC2AYBKj2vtRVjpKvfASV1C3Dnf XZMohsZ8DgMRVebm++PldIrRy5kY9LO5Em1mCNNSBt3pWkr2nURDxULpDAOIF12h NmtZ0Ysgx8AMQ6nDSkBPXEyisJVkNUcKDHzIMaV6UbfOrqEak+wn2i+PQ3fnc7a4 yUEewAuowPS2bDiBez7Q57VOoWhMBK5p+lQA241HtcZMiK027+I6l3FyBzdI2Jxq +uyks0Tn5BjfYWaZ492Vx97qgbo5y+/T68K4P/ZpMlY/O7pW0GA= =J+b7 -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--