From patchwork Sat Oct 30 16:12:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 34173 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 94E2827BBE3; Sat, 30 Oct 2021 17:16:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6188127BBE1 for ; Sat, 30 Oct 2021 17:16:44 +0100 (BST) Received: from localhost ([::1]:44552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgr2B-000662-GO for patchwork@mira.cbaines.net; Sat, 30 Oct 2021 12:16:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgqzb-00048h-A0 for guix-patches@gnu.org; Sat, 30 Oct 2021 12:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgqzZ-0000FW-Ud for guix-patches@gnu.org; Sat, 30 Oct 2021 12:14:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mgqzZ-0002Vm-QW for guix-patches@gnu.org; Sat, 30 Oct 2021 12:14:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51514] [PATCH 2/2] doc: Document LUKS2 Grub support and shortcomings Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 30 Oct 2021 16:14:01 +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: 51514@debbugs.gnu.org Cc: Josselin Poiret Received: via spool by 51514-submit@debbugs.gnu.org id=B51514.16356103899562 (code B ref 51514); Sat, 30 Oct 2021 16:14:01 +0000 Received: (at 51514) by debbugs.gnu.org; 30 Oct 2021 16:13:09 +0000 Received: from localhost ([127.0.0.1]:58280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgqyi-0002UA-NU for submit@debbugs.gnu.org; Sat, 30 Oct 2021 12:13:08 -0400 Received: from jpoiret.xyz ([206.189.101.64]:38114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mgqyh-0002U2-9H for 51514@debbugs.gnu.org; Sat, 30 Oct 2021 12:13:07 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 30EB1184F41; Sat, 30 Oct 2021 16:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1635610386; 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=LljGzYt5EwyfozO9dceE8ggdtl+7SmE0+PlAT1T3Eoo=; b=Nwsjwurl6JN3fuZXyxRhzb7acO98UqoYvsFvyykpdEKXKQQ+UCLTqoqfbDrVwjCg9vSPpE 4WEsHjxjdC2r2rNCLleJtS9+9D8FWxRVOZtTp8fx1F0+rlqS8nROZYTJBpkgdCZAadhBTM ylpZcmwGXxxktYsbm6zN0+kGtNDrN5fByVRSMFfNMPHMtLiwYAcr6Lf5lz0CgF6L9OC6+U ixaw/CKbkb43k/nBqRp4DLq5aeF3K9IF/BOQnV/lhZ6YrG1fVikyT/dwnO+9Tt7cTCIsIf L+Zqirx00EGQXAql56nBIjouE1ZuCGQ2/+X4aMFYYQrkyD3vm6FScjTbMuTK8g== Date: Sat, 30 Oct 2021 16:12:37 +0000 Message-Id: <20211030161237.28298-2-dev@jpoiret.xyz> In-Reply-To: <20211030161237.28298-1-dev@jpoiret.xyz> References: <87tugypkum.fsf@jpoiret.xyz> <20211030161237.28298-1-dev@jpoiret.xyz> MIME-Version: 1.0 X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Keyboard Layout, Networking, and Partitioning)[Disk Partitioning]: Document it. --- doc/guix.texi | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 22215214e0..4420f67050 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2492,13 +2492,22 @@ 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 Cryptsetup on Guix. You can check which key derivation function is +being used by a device by running @command{cryptsetup luksDump }, +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 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