From patchwork Mon Nov 15 20:53:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 34515 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 4D4B727BBE5; Mon, 15 Nov 2021 20:54:10 +0000 (GMT) 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 0E36C27BBE1 for ; Mon, 15 Nov 2021 20:54:10 +0000 (GMT) Received: from localhost ([::1]:36138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmizR-0004td-4r for patchwork@mira.cbaines.net; Mon, 15 Nov 2021 15:54:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmizK-0004so-Je for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmizK-0006QM-Be 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-0000pb-9d for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51514] [PATCH v2 1/3] gnu: system: Add LUKS2 support for the root file system. 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.16370096363164 (code B ref 51514); Mon, 15 Nov 2021 20:54:02 +0000 Received: (at 51514) by debbugs.gnu.org; 15 Nov 2021 20:53:56 +0000 Received: from localhost ([127.0.0.1]:56311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmizA-0000ol-3o for submit@debbugs.gnu.org; Mon, 15 Nov 2021 15:53:56 -0500 Received: from jpoiret.xyz ([206.189.101.64]:36636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmiz7-0000oZ-Fp for 51514@debbugs.gnu.org; Mon, 15 Nov 2021 15:53:50 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 79BE5184F5F; Mon, 15 Nov 2021 20:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1637009628; 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=DgRXqcT8Ad8glOqczTOLb8TMfpdfYL55jruUiZdNPXk=; b=IqUbWupvBCKlC33SH71OQY0oQhP4DUgM4mgmh9ix2QkvILQqAVa7jNPAopF7Cr7gAy+Kcz gBNTWrDCfs2PBMzSfJ4iotXyqt9UUPl0vw3uJBhzcu7EDodW9+q9iKL/5A9zTTc+G5ACFy CvlJYBjgPiBjxVOg7J4gAWhDbCL09hc6fdoktipMLk3WqE6T1qkDDpZn39GzL08Ik84jm+ G2Wo1cQVVZqrmS1iV6Kq/ifYPHWycUxMnvRpuBLxMG5TBKIA7GxS+xf7KfdjLeS6lcwAce Gesq6bXEoN90o3pnn+vHWKQxlRbL+C/DIh564zMKypYS3QvrTTjkzzhtfQybPA== Date: Mon, 15 Nov 2021 20:53:39 +0000 Message-Id: <20211115205341.9724-2-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 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 * gnu/bootloader/grub.scm (grub-configuration-file): Add 'insmod luks2'. * gnu/system/mapped-devices.scm (open-luks-device): Create '/run/cryptsetup/' directory. --- gnu/bootloader/grub.scm | 3 +-- gnu/system/mapped-devices.scm | 10 ++++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index d8e888ff40..42f71aa4db 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -415,8 +415,7 @@ (define (crypto-device->cryptomount dev) ;; Other type of devices aren't implemented. #~())) (let ((devices (map crypto-device->cryptomount store-crypto-devices)) - ;; XXX: Add luks2 when grub 2.06 is packaged. - (modules #~(format port "insmod luks~%"))) + (modules #~(format port "insmod luks~%insmod luks2~%"))) (if (null? devices) devices (cons modules devices)))) diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index 518dbc4fe8..96a381d5fe 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -192,7 +192,8 @@ (define (open-luks-device source targets) "Return a gexp that maps SOURCE to TARGET as a LUKS device, using 'cryptsetup'." (with-imported-modules (source-module-closure - '((gnu build file-systems))) + '((gnu build file-systems) + (guix build utils))) ;; For mkdir-p (match targets ((target) #~(let ((source #$(if (uuid? source) @@ -201,7 +202,12 @@ (define (open-luks-device source targets) ;; XXX: 'use-modules' should be at the top level. (use-modules (rnrs bytevectors) ;bytevector? ((gnu build file-systems) - #:select (find-partition-by-luks-uuid))) + #:select (find-partition-by-luks-uuid)) + ((guix build utils) #:select (mkdir-p))) + + ;; Create '/run/cryptsetup/' if it does not exist, as device locking + ;; is mandatory for LUKS2. + (mkdir-p "/run/cryptsetup/") ;; Use 'cryptsetup-static', not 'cryptsetup', to avoid pulling the ;; whole world inside the initrd (for when we're in an initrd). From patchwork Mon Nov 15 20:53:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 34516 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 B321B27BBE1; Mon, 15 Nov 2021 20:54:10 +0000 (GMT) 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=ham 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 207A827BBE4 for ; Mon, 15 Nov 2021 20:54:10 +0000 (GMT) Received: from localhost ([::1]:36144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmizR-0004u3-Ab for patchwork@mira.cbaines.net; Mon, 15 Nov 2021 15:54:09 -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 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 | 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 From patchwork Mon Nov 15 20:53:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 34517 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 7604B27BBE3; Mon, 15 Nov 2021 20:54:17 +0000 (GMT) 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 4639927BBE1 for ; Mon, 15 Nov 2021 20:54:17 +0000 (GMT) Received: from localhost ([::1]:36560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmizY-0005B1-Ew for patchwork@mira.cbaines.net; Mon, 15 Nov 2021 15:54:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmizL-0004t5-Kr for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmizL-0006Qb-Bh for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmizL-0000q3-Aa for guix-patches@gnu.org; Mon, 15 Nov 2021 15:54:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51514] [PATCH v2 3/3] installer: Make LUKS2 the default format for encrypted devices Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Nov 2021 20:54:03 +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.16370096423210 (code B ref 51514); Mon, 15 Nov 2021 20:54:03 +0000 Received: (at 51514) by debbugs.gnu.org; 15 Nov 2021 20:54:02 +0000 Received: from localhost ([127.0.0.1]:56317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmizK-0000pZ-1z for submit@debbugs.gnu.org; Mon, 15 Nov 2021 15:54:02 -0500 Received: from jpoiret.xyz ([206.189.101.64]:36818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmizA-0000ok-AL 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 691D1184F66; Mon, 15 Nov 2021 20:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1637009631; 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=o/YhAdswtSrepNNN/Zym+E/dEk7sid/PoZhCYlPPL/E=; b=q+PJwxnLzNwX5oE9auhJY1OtcIRvL6ZjZYgnpPO7jFZOvFMEN+bu5yngaNhuCMtl/Aok58 9PMKNBoHitFpd5MWmWNhXcsC2BtS42bEtS82Xl9qkV0DU4IMQoBkenmauUElKt29Q6c+1N fJIi/H0QBw7PcL3OTI/BY2s58nBbx0Bh1uQ8FJRN5Z60Zog09mn57mAJcMxoyvgxfqdvQT qHelpaUsOkRxuQnV6t5lvB5MjkC7IcZBPKt7FPGc2w5OKzHwRfqqWqEdDHb07o0FDkfiP1 LoBbUsLS5UR4A7lMewF8A09PjiZeJ1a7IiMTi/EgOKxOc2EX/6pT3ePL4/GNrA== Date: Mon, 15 Nov 2021 20:53:41 +0000 Message-Id: <20211115205341.9724-4-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 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 * gnu/installer/parted.scm (luks-format-and-open): Change it. --- gnu/installer/parted.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index cbe676017b..00de0a30fa 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -1165,8 +1165,9 @@ (define (luks-format-and-open user-partition) (lambda (key-file) (syslog "formatting and opening LUKS entry ~s at ~s~%" label file-name) - (system* "cryptsetup" "-q" "luksFormat" file-name key-file) - (system* "cryptsetup" "open" "--type" "luks" + (system* "cryptsetup" "-q" "luksFormat" "--type" "luks2" + "--pbkdf" "pbkdf2" file-name key-file) + (system* "cryptsetup" "open" "--key-file" key-file file-name label))))) (define (luks-close user-partition)