From unknown Wed Jun 18 00:26:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#27242 <27242@debbugs.gnu.org> To: bug#27242 <27242@debbugs.gnu.org> Subject: Status: Fail to load LUKS encrypted rootfs, attempts to open luks device before it's ready. Reply-To: bug#27242 <27242@debbugs.gnu.org> Date: Wed, 18 Jun 2025 07:26:57 +0000 retitle 27242 Fail to load LUKS encrypted rootfs, attempts to open luks dev= ice before it's ready. reassign 27242 guix submitter 27242 Adam Van Ymeren severity 27242 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 04 18:10:52 2017 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 05 06:08:13 2017 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 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> 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-Debbugs-Envelope-To: 27242 Cc: 27242@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: > 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 debbugs-submit-bounces@debbugs.gnu.org Mon Jun 05 12:34:14 2017 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 To: Mark H Weaver 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> 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-Debbugs-Envelope-To: 27242 X-Mailman-Approved-At: Mon, 05 Jun 2017 12:34:12 -0400 Cc: 27242@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: 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 debbugs-submit-bounces@debbugs.gnu.org Wed Jun 07 19:10:46 2017 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 From unknown Wed Jun 18 00:26:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 06 Jul 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator