From unknown Sun Jun 22 11:48:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27242: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready. Resent-From: Adam Van Ymeren Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 04 Jun 2017 22:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27242 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 27242@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.149661425216025 (code B ref -1); Sun, 04 Jun 2017 22:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jun 2017 22:10:52 +0000 Received: from localhost ([127.0.0.1]:56230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHdjY-0004AO-Fg for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:10:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHdfK-00043e-Fk for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHdfE-0001Lf-JV for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:06:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,UNPARSEABLE_RELAY autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHdfE-0001LS-GJ for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:06:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHdfD-0007tZ-GE for bug-guix@gnu.org; Sun, 04 Jun 2017 18:06:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHdfA-0001Fp-CJ for bug-guix@gnu.org; Sun, 04 Jun 2017 18:06:23 -0400 Received: from mail2.vany.ca ([142.54.190.254]:58159) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHdfA-0001Ce-7h for bug-guix@gnu.org; Sun, 04 Jun 2017 18:06:20 -0400 Received: from adam-laptop.vany.ca (ktnron060mw-lp130-03-184-145-60-107.dsl.bell.ca [184.145.60.107]) by mail2.vany.ca (Postfix) with ESMTPSA id B6633AC04E1 for ; Sun, 4 Jun 2017 17:06:16 -0500 (CDT) Received: from localhost (adam-laptop.vany.ca [local]) by adam-laptop.vany.ca (OpenSMTPD) with ESMTPA id 87dbbd1b for ; Sun, 4 Jun 2017 22:06:15 +0000 (UTC) From: Adam Van Ymeren Date: Sun, 04 Jun 2017 18:06:15 -0400 Message-ID: <87r2yzl86g.fsf@vany.ca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Mailman-Approved-At: Sun, 04 Jun 2017 18:10:51 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) On my machine when booting GuixSD, it fails to find the rootfs from the initramfs. It errors out attempting to find the luks device node. Shortly after it errors is when I see the kernel dmesg output of the nvme0 device becomining ready. It looks like we need to wait for the device node to become ready, or poll/sleep a few times if we fail to locate the device. Thanks! -Adam From unknown Sun Jun 22 11:48:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27242: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready. Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 05 Jun 2017 10:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27242 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Adam Van Ymeren Cc: 27242@debbugs.gnu.org Received: via spool by 27242-submit@debbugs.gnu.org id=B27242.149665729322036 (code B ref 27242); Mon, 05 Jun 2017 10:09:02 +0000 Received: (at 27242) by debbugs.gnu.org; 5 Jun 2017 10:08:13 +0000 Received: from localhost ([127.0.0.1]:56496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHovl-0005jM-0d for submit@debbugs.gnu.org; Mon, 05 Jun 2017 06:08:13 -0400 Received: from world.peace.net ([50.252.239.5]:43055) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHovk-0005j8-3a for 27242@debbugs.gnu.org; Mon, 05 Jun 2017 06:08:12 -0400 Received: from pool-72-93-32-114.bstnma.east.verizon.net ([72.93.32.114] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHovc-00085O-GI; Mon, 05 Jun 2017 06:08:04 -0400 From: Mark H Weaver References: <87r2yzl86g.fsf@vany.ca> Date: Mon, 05 Jun 2017 06:07:52 -0400 In-Reply-To: <87r2yzl86g.fsf@vany.ca> (Adam Van Ymeren's message of "Sun, 04 Jun 2017 18:06:15 -0400") Message-ID: <87y3t6693b.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Adam Van Ymeren writes: > On my machine when booting GuixSD, it fails to find the rootfs from the > initramfs. It errors out attempting to find the luks device node. > Shortly after it errors is when I see the kernel dmesg output of the > nvme0 device becomining ready. > > It looks like we need to wait for the device node to become ready, or > poll/sleep a few times if we fail to locate the device. I ran into the same problem at one point, and have applied the following patch to my private branch of Guix. Perhaps it should be applied to master. Mark >From b7c1947d050a944937b983532d940491821fa75f Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Tue, 28 Mar 2017 05:52:28 -0400 Subject: [PATCH] DRAFT: Cope with delayed appearance of LUKS source. --- gnu/system/mapped-devices.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index 2959802c9..3659ac2d6 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm @@ -101,6 +101,7 @@ #~(let ((source #$source)) ;; XXX: 'use-modules' should be at the top level. (use-modules (rnrs bytevectors) ;bytevector? + (srfi srfi-1) ((gnu build file-systems) #:select (find-partition-by-luks-uuid))) @@ -114,7 +115,11 @@ ;; udev-populated /dev/disk/by-id directory but udev may ;; be unavailable at the time we run this. (if (bytevector? source) - (or (find-partition-by-luks-uuid source) + (or (let loop ((tries-left 10)) + (and (positive? tries-left) + (or (find-partition-by-luks-uuid source) + (begin (sleep 1) + (loop (- tries-left 1)))))) (error "LUKS partition not found" source)) source) -- 2.13.0 From unknown Sun Jun 22 11:48:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27242: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready. Resent-From: Adam Van Ymeren Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 05 Jun 2017 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27242 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mark H Weaver Cc: 27242@debbugs.gnu.org Received: via spool by 27242-submit@debbugs.gnu.org id=B27242.149668045413761 (code B ref 27242); Mon, 05 Jun 2017 16:35:02 +0000 Received: (at 27242) by debbugs.gnu.org; 5 Jun 2017 16:34:14 +0000 Received: from localhost ([127.0.0.1]:57966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHuxK-0003Zt-GZ for submit@debbugs.gnu.org; Mon, 05 Jun 2017 12:34:14 -0400 Received: from mail2.vany.ca ([142.54.190.254]:38304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHubE-00031m-Md for 27242@debbugs.gnu.org; Mon, 05 Jun 2017 12:11:25 -0400 Received: from adam-laptop.vany.ca (dsl2035.rba1.pppoe.execulink.com [209.213.253.253]) by mail2.vany.ca (Postfix) with ESMTPSA id 4B7DDAC013E; Mon, 5 Jun 2017 11:11:12 -0500 (CDT) Received: from localhost (adam-laptop.vany.ca [local]) by adam-laptop.vany.ca (OpenSMTPD) with ESMTPA id ac8b1a8b; Mon, 5 Jun 2017 16:10:58 +0000 (UTC) From: Adam Van Ymeren References: <87r2yzl86g.fsf@vany.ca> <87y3t6693b.fsf@netris.org> Date: Mon, 05 Jun 2017 12:10:58 -0400 In-Reply-To: <87y3t6693b.fsf@netris.org> (Mark H. Weaver's message of "Mon, 05 Jun 2017 06:07:52 -0400") Message-ID: <8737beife5.fsf@vany.ca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Mark H Weaver writes: > > I ran into the same problem at one point, and have applied the following > patch to my private branch of Guix. Perhaps it should be applied to > master. Thanks, this patch works for me. Something like this upstream would be nice :) [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.6 RCVD_IN_BRBL_LASTEXT RBL: No description available. [142.54.190.254 listed in bb.barracudacentral.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Mailman-Approved-At: Mon, 05 Jun 2017 12:34:12 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Mark H Weaver writes: > > I ran into the same problem at one point, and have applied the following > patch to my private branch of Guix. Perhaps it should be applied to > master. Thanks, this patch works for me. Something like this upstream would be nice :) [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 1.6 RCVD_IN_BRBL_LASTEXT RBL: No description available. [142.54.190.254 listed in bb.barracudacentral.org] 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines Mark H Weaver writes: > > I ran into the same problem at one point, and have applied the following > patch to my private branch of Guix. Perhaps it should be applied to > master. Thanks, this patch works for me. Something like this upstream would be nice :) This can probably be unified with the resolve function defined in build/file-systems.scm From unknown Sun Jun 22 11:48:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Adam Van Ymeren Subject: bug#27242: closed (Re: bug#27242: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready.) Message-ID: References: <87tw3rqtr0.fsf@netris.org> <87r2yzl86g.fsf@vany.ca> X-Gnu-PR-Message: they-closed 27242 X-Gnu-PR-Package: guix Reply-To: 27242@debbugs.gnu.org Date: Wed, 07 Jun 2017 23:11:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1496877062-22761-1" This is a multi-part message in MIME format... ------------=_1496877062-22761-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27242: Fail to load LUKS encrypted rootfs, attempts to open luks device be= fore it's ready. which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 27242@debbugs.gnu.org. --=20 27242: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27242 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1496877062-22761-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27242-done) by debbugs.gnu.org; 7 Jun 2017 23:10:46 +0000 Received: from localhost ([127.0.0.1]:33761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIk6A-0005uc-1G for submit@debbugs.gnu.org; Wed, 07 Jun 2017 19:10:46 -0400 Received: from world.peace.net ([50.252.239.5]:51950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIk69-0005uQ-7T for 27242-done@debbugs.gnu.org; Wed, 07 Jun 2017 19:10:45 -0400 Received: from pool-72-93-32-114.bstnma.east.verizon.net ([72.93.32.114] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dIk63-0002P0-DK; Wed, 07 Jun 2017 19:10:39 -0400 From: Mark H Weaver To: Adam Van Ymeren Subject: Re: bug#27242: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready. References: <87r2yzl86g.fsf@vany.ca> <87y3t6693b.fsf@netris.org> <8737beife5.fsf@vany.ca> Date: Wed, 07 Jun 2017 19:10:27 -0400 In-Reply-To: <8737beife5.fsf@vany.ca> (Adam Van Ymeren's message of "Mon, 05 Jun 2017 12:10:58 -0400") Message-ID: <87tw3rqtr0.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 27242-done Cc: 27242-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Adam Van Ymeren writes: > Mark H Weaver writes: >> >> I ran into the same problem at one point, and have applied the following >> patch to my private branch of Guix. Perhaps it should be applied to >> master. > > Thanks, this patch works for me. Something like this upstream would be > nice :) I pushed a similar patch to master as commit f45878a80d412dd79c95e9274c3ee5dd24e1cec9. > This can probably be unified with the resolve function defined in > build/file-systems.scm Thanks for pointing this out. I don't currently have the spare time to think about it, but feel free to propose a patch to rework this in a nicer way :) I'm closing this bug for now. Thanks! Mark ------------=_1496877062-22761-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Jun 2017 22:10:52 +0000 Received: from localhost ([127.0.0.1]:56230 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHdjY-0004AO-Fg for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:10:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHdfK-00043e-Fk for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHdfE-0001Lf-JV for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:06:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,UNPARSEABLE_RELAY autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47488) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHdfE-0001LS-GJ for submit@debbugs.gnu.org; Sun, 04 Jun 2017 18:06:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHdfD-0007tZ-GE for bug-guix@gnu.org; Sun, 04 Jun 2017 18:06:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHdfA-0001Fp-CJ for bug-guix@gnu.org; Sun, 04 Jun 2017 18:06:23 -0400 Received: from mail2.vany.ca ([142.54.190.254]:58159) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHdfA-0001Ce-7h for bug-guix@gnu.org; Sun, 04 Jun 2017 18:06:20 -0400 Received: from adam-laptop.vany.ca (ktnron060mw-lp130-03-184-145-60-107.dsl.bell.ca [184.145.60.107]) by mail2.vany.ca (Postfix) with ESMTPSA id B6633AC04E1 for ; Sun, 4 Jun 2017 17:06:16 -0500 (CDT) Received: from localhost (adam-laptop.vany.ca [local]) by adam-laptop.vany.ca (OpenSMTPD) with ESMTPA id 87dbbd1b for ; Sun, 4 Jun 2017 22:06:15 +0000 (UTC) From: Adam Van Ymeren To: bug-guix@gnu.org Subject: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready. Date: Sun, 04 Jun 2017 18:06:15 -0400 Message-ID: <87r2yzl86g.fsf@vany.ca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 04 Jun 2017 18:10:51 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) On my machine when booting GuixSD, it fails to find the rootfs from the initramfs. It errors out attempting to find the luks device node. Shortly after it errors is when I see the kernel dmesg output of the nvme0 device becomining ready. It looks like we need to wait for the device node to become ready, or poll/sleep a few times if we fail to locate the device. Thanks! -Adam ------------=_1496877062-22761-1--