From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oCAQKvLIkmFUbgEAgWs5BA (envelope-from ) for ; Mon, 15 Nov 2021 21:54:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 1Kq4JfLIkmGWDgAA1q6Kng (envelope-from ) for ; Mon, 15 Nov 2021 20:54:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 014BB34E50 for ; Mon, 15 Nov 2021 21:54:08 +0100 (CET) Received: from localhost ([::1]:36144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmizP-0004u3-5K for larch@yhetil.org; Mon, 15 Nov 2021 15:54:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmizL-0004sw-66 for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmizK-0006QU-SA for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmizK-0000pp-QE for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51514] [PATCH v2 2/3] doc: Document LUKS2 GRUB support and shortcomings Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Nov 2021 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51514 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , 51514@debbugs.gnu.org Received: via spool by 51514-submit@debbugs.gnu.org id=B51514.16370096383177 (code B ref 51514); Mon, 15 Nov 2021 20:54:02 +0000 Received: (at 51514) by debbugs.gnu.org; 15 Nov 2021 20:53:58 +0000 Received: from localhost ([127.0.0.1]:56315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmizF-0000pB-PH for submit@debbugs.gnu.org; Mon, 15 Nov 2021 15:53:58 -0500 Received: from jpoiret.xyz ([206.189.101.64]:36730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmiz9-0000oh-Gk for 51514@debbugs.gnu.org; Mon, 15 Nov 2021 15:53:56 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 5A7D2184F65; Mon, 15 Nov 2021 20:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1637009629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tbi600uwA/U+LtZntKaOHdoVnBzaTYWRW3r7/FkuAm0=; b=f1sZs4W2kg3GdmI0rQdMzqEHypM7KIxQilndT90n+mev3u223ndcS/Dkd1JdmdnAJwbMSg kXiLseyrxcJlaN0+PwRtwBNoDNGfmOlxQy+66cRavrckkP3H5WsY5HeYxErPnQizZTmnMT ViIViR6DQes7v0+D+Z1r9uObZBnfQLYAxf/T41yNJnSrFIAOqOqZVXQc911zBoR1vX5cdb to1TMJbQAuqXM5QqZOBrutDKz6Ln+vgxeFNu/s6IPJ/iDKfMSKWJwty0WPJ+Ujj9TfewWE 5SuFErOAOBjf7hRL8tJP8FmXJnmheVE5H+3QIlvp7JKbt/FuuT8fNgLTSdb5Xw== Date: Mon, 15 Nov 2021 20:53:40 +0000 Message-Id: <20211115205341.9724-3-dev@jpoiret.xyz> In-Reply-To: <20211115205341.9724-1-dev@jpoiret.xyz> References: <87h7chdmzh.fsf_-_@gnu.org> <20211115205341.9724-1-dev@jpoiret.xyz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637009650; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tbi600uwA/U+LtZntKaOHdoVnBzaTYWRW3r7/FkuAm0=; b=lsc3K6SV1pwCuB0/Bfez1tJdGBDh9zjhFUkCNPGlZ2ffs5kfbIRyDm3njAAhOrlSixMB+r cLV9Aqn8PSmzfWZkq3ZeXXLeg4MQ6VkSfFKqhExOVVUwdLbchbFHkA5omyVbSnqAyKgBHy NDOQ/+chZmhSnypPSUmMyTIdZ8tn6wGje+bwGsQ4cGJeiFD2Wz2i7J1ZeVZIwKXESKiCKA W35raxzcjBD1duTCGc89x3NMSpR2zyjmQWml04TKUPp3JV0YcykVCqNEV+sOuypDZcG/F9 wYcJfxoAykM+VczfwZGqZuTNDVWZXaCwdoNYlj3/hv24iixs4OFcBsJlECClOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637009650; a=rsa-sha256; cv=none; b=TzT9MCekVBaGFadm7VN8LhKthuB1mgqJun1337M+5Ngjgwu6f6mQ1tL61Ws92MZIA1JOZN senqE9++g1i/bwGeaEPXa7oSH9e/mNWVd6tqoS13uBz+yGSSsy3RmiC84JE7BaOm2c9PJr pV3oMVEqTljTsc7FpS2p1Nx3cjt7kaMjmlct25TW4tWByokS8OszcVHT/TOOtyRmBT1SkE Xq/YX/oMwan0J64zxbKB5NYCQm3C81nIMKeiB8fZi21d/qg11ArVxid1OeEVIqEa8QdXE5 +pmZpo2/23y8xYH4nYgNl1z8G2Pf7UzDXc1yaoBJukOKASdRs++Oh5IF654BBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=f1sZs4W2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.66 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=f1sZs4W2; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 014BB34E50 X-Spam-Score: 0.66 X-Migadu-Scanner: scn1.migadu.com X-TUID: XRzkogFDZvI+ * doc/guix.texi (Keyboard Layout, Networking, and Partitioning)[Disk Partitioning]: Document it. --- doc/guix.texi | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1b10e2d626..95d286a836 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -98,6 +98,7 @@ Copyright @copyright{} 2021 pukkamustard@* Copyright @copyright{} 2021 Alice Brenon@* Copyright @copyright{} 2021 Andrew Tropin@* Copyright @copyright{} 2021 Sarah Morgensen@* +Copyright @copyright{} 2021 Josselin Poiret@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -2492,13 +2493,24 @@ mkfs.ext4 -L my-root /dev/sda2 If you are instead planning to encrypt the root partition, you can use the Cryptsetup/LUKS utilities to do that (see @inlinefmtifelse{html, @uref{https://linux.die.net/man/8/cryptsetup, @code{man cryptsetup}}, -@code{man cryptsetup}} for more information). Assuming you want to -store the root partition on @file{/dev/sda2}, the command sequence would -be along these lines: +@code{man cryptsetup}} for more information). + +@quotation Warning +Note that GRUB can unlock LUKS2 devices since version 2.06, but only +supports the PBKDF2 key derivation function, which is not the default +for @command{cryptsetup luksFormat}. You can check which key derivation +function is being used by a device by running @command{cryptsetup +luksDump @var{device}}, and looking for the PBKDF field of your +keyslots. +@end quotation + +Assuming you want to store the root partition on @file{/dev/sda2}, the +command sequence to format it as a LUKS2 partition would be along these +lines: @example -cryptsetup luksFormat /dev/sda2 -cryptsetup open --type luks /dev/sda2 my-partition +cryptsetup luksFormat --type luks2 --pbkdf pbkdf2 /dev/sda2 +cryptsetup open /dev/sda2 my-partition mkfs.ext4 -L my-root /dev/mapper/my-partition @end example -- 2.33.1