From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 2F/hBOezUWbGaQEAA41jLg (envelope-from ) for ; Sat, 25 May 2024 11:48:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cH/aOuazUWbMZwEA62LTzQ (envelope-from ) for ; Sat, 25 May 2024 11:48:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YHMQnbD7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716630502; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=K/wqconLzqnZFTR0OCqJeFxpOKcmyQLxdz0obdPMikw=; b=sbBet71nOnbmrnDtcCvH26tmMuU1JlnGkFvEDuYUpjDXES9w1vLlqFemvhOnCyIZfkQLGa 4RbsUWQXFI6via6weDU7o8VH257M8zroB9PrlKBWh0em9Lzv9ySFcgxFijG/en4V+RN4F9 /mAA8XCkTiGj1MvO01W7oAsegu9USSUvCItHreL0VOuNnWwL/3gOAKz0L1kA9luEtj94st cYZam2ywbvlT4wEibpxpt/LAk2uIpBtid3pfHP0GChOhS2XbPGXPQ8B3zv/sXHZFfQjhmq jBa935Dw4i/UHs/Aebr5u3wUEqz/TZfRCKcJusKymsZ7GdMeV8TSi0oUhxQ/8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716630502; a=rsa-sha256; cv=none; b=MJOq0bIRmE4hmO7VK3pi+zchKDNoGXWU+9AUyHDxZgBnBDYTIvZidIVXlwCz2zf6oaxB7B MXdh8YAc3NvqU0nhLGfx5n8BeyaZwnlbK4z6+GxIf+1hKK7uln9Kr/6ZIvXQ2KtqNqP7bq Nso4yfqNmKyTDiozqHw0OXevOeR0SXGI2j1r1TRbJPq6A68Rd7lh4yAXKcjue2zAR7n4Pc 1DNM1FEI3stXyyhOmKYyy+2TSIU2tDs4zHd9w3QVQD2aKekROQfFCUZ+Bs5vkZCpjG9lxl XIn/SGCxgVOBpaM6vcdKcMI2PCV8uiRANYcsGi4NlHMgfqBy3zBS5478bGeohw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=YHMQnbD7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" 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 CDB8C7472A for ; Sat, 25 May 2024 11:48:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAo0M-0004E5-QS; Sat, 25 May 2024 05:47:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAo0L-0004Bb-Gu for bug-guix@gnu.org; Sat, 25 May 2024 05:47:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAo0I-00073y-Nx for bug-guix@gnu.org; Sat, 25 May 2024 05:47:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAo0Q-00083U-2G for bug-guix@gnu.org; Sat, 25 May 2024 05:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#70826: luks-device-mapping-with-options breaks bootloader Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 25 May 2024 09:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70826 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Tadhg McDonald-Jensen Cc: 70826@debbugs.gnu.org Received: via spool by 70826-submit@debbugs.gnu.org id=B70826.171663044230896 (code B ref 70826); Sat, 25 May 2024 09:48:02 +0000 Received: (at 70826) by debbugs.gnu.org; 25 May 2024 09:47:22 +0000 Received: from localhost ([127.0.0.1]:42442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAnzl-00082G-MY for submit@debbugs.gnu.org; Sat, 25 May 2024 05:47:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAnzk-00082A-2x for 70826@debbugs.gnu.org; Sat, 25 May 2024 05:47:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAnzX-0006xe-9g; Sat, 25 May 2024 05:47:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=K/wqconLzqnZFTR0OCqJeFxpOKcmyQLxdz0obdPMikw=; b=YHMQnbD77YWahZWUd9Q5 X2Ak13H20U2/y4NEf2rw7br5HlLTD+BAg8vNgVD+K8G3ktBQ9G3UPQWjfOGqMaH7nohZ+oFRneD80 XhloAMEeMNPXrKHkk0gMzI3irEkncchB2jJ1SPgDRY70t/x14wr/TIXCYkeUYyp0nsGkefsB8I/Dr B71poQoSkvmqlVFodzB5rWcjVgiD/oqk2sCVEvulh10tVsuelDT4U2EtqYp4S5Mip+qNegL1eyQmx e0z4PD55R23DXI5RGDZtc2zrq9vI1Zzda8PZqof3k98pucI+ZFIR99AxwEWaX7lNZyPYHS2+yfdNC Uhk3ygpsUTlW6A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Tadhg McDonald-Jensen's message of "Tue, 7 May 2024 14:54:12 -0400") References: Date: Sat, 25 May 2024 11:47:03 +0200 Message-ID: <87ikz22pgo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.25 X-Spam-Score: -4.25 X-Migadu-Queue-Id: CDB8C7472A X-Migadu-Scanner: mx11.migadu.com X-TUID: Tdp7tfjhCqH3 --=-=-= Content-Type: text/plain Hi, Tadhg McDonald-Jensen skribis: > using the `luks-device-mapping-with-options` mapped device type defined in > (gnu system mapped-devices) causes grub or other bootloaders to not > properly attempt to mount the encrypted drive. This is caused by the > commit 39a9404 which identifies luks mapped devices by checking if the type > is equal to `luks-device-mapping`, so by using a different routine that is > a proxy to that one it doesn't forward it to grub in the > store-crypto-devices list. Ouch, indeed. The immediate fix is: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/system.scm b/gnu/system.scm index c76f4d7c502..bb851b1b75f 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -667,10 +667,13 @@ (define (operating-system-boot-mapped-devices os) (define operating-system-bootloader-crypto-devices (mlambdaq (os) ;to avoid duplicated output "Return the sources of the LUKS mapped devices specified by UUID." + (define (luks-device? m) + (memq (mapped-device-type m) + (list luks-device-mapping-with-options + luks-device-mapping))) + ;; XXX: Device ordering is important, we trust the returned one. - (let* ((luks-devices (filter (lambda (m) - (eq? luks-device-mapping - (mapped-device-type m))) + (let* ((luks-devices (filter luks-device? (operating-system-boot-mapped-devices os))) (uuid-crypto-devices non-uuid-crypto-devices (partition (compose uuid? mapped-device-source) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Not ideal, but it fixes the problem. I=E2=80=99ll go ahead with this patch if there are no objections. Thanks! Ludo=E2=80=99. --=-=-=--