From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 20 13:06:17 2020 Received: (at submit) by debbugs.gnu.org; 20 Oct 2020 17:06:17 +0000 Received: from localhost ([127.0.0.1]:46620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUv5U-00039N-V2 for submit@debbugs.gnu.org; Tue, 20 Oct 2020 13:06:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:40062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUv5U-00039H-4j for submit@debbugs.gnu.org; Tue, 20 Oct 2020 13:06:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUv5U-0003ov-0G for bug-guix@gnu.org; Tue, 20 Oct 2020 13:06:16 -0400 Received: from cascadia.aikidev.net ([2600:3c01:e000:267:0:a171:de7:c]:38640) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUv5R-0005Yq-V0; Tue, 20 Oct 2020 13:06:15 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 94E2C1AA41; Tue, 20 Oct 2020 10:06:09 -0700 (PDT) From: Vagrant Cascadian To: bug-guix@gnu.org Subject: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure Date: Tue, 20 Oct 2020 10:06:02 -0700 Message-ID: <87a6wgrfnp.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=2600:3c01:e000:267:0:a171:de7:c; envelope-from=vagrant@debian.org; helo=cascadia.aikidev.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/20 13:06:10 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Mathieu Othacehe 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: -3.3 (---) --=-=-= Content-Type: text/plain It appears that: b97b423e3f61c80d5877dadc95b3f316cd61788f bootloader: Fix u-boot installation. Breaks using a /dev/disk/by-id/ symlink in the bootloader target field on systems using u-boot with "guix system reconfigure". Frustratingly, It claims to succeed with bootloader installation, but does not actually install u-boot to the device... when updating to the new version of u-boot, I had to manually install the new version. Using a raw device (e.g. /dev/mmcblk1) still works, but those devices are not necessarily enumerated in a consistent order and so cannot be used in a config.scm with guix system reliably. Reverting that patch fixes using the /dev/disk symlink, though probably breaks other use-cases. I'm writing this from memory now, but I can also boot the machines at a later point and get the exact configurations, if needed. live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX48Y+wAKCRDcUY/If5cW qtNLAQCYaVNki1OZtsAZDo0WOronbeuMOVjnxz9rwR/tCQJ1+QEAjkikEqx8jo4Y s+eCyk2mrF0SQuDbhPn2meYnVlSG6wY= =4VkK -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 21 09:04:47 2020 Received: (at control) by debbugs.gnu.org; 21 Oct 2020 13:04:47 +0000 Received: from localhost ([127.0.0.1]:48219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVDnL-0004rz-2A for submit@debbugs.gnu.org; Wed, 21 Oct 2020 09:04:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVDnJ-0004rk-15 for control@debbugs.gnu.org; Wed, 21 Oct 2020 09:04:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48450) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVDnD-00017N-R2 for control@debbugs.gnu.org; Wed, 21 Oct 2020 09:04:39 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43414 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVDnD-0003Pa-2i for control@debbugs.gnu.org; Wed, 21 Oct 2020 09:04:39 -0400 Date: Wed, 21 Oct 2020 15:04:38 +0200 Message-Id: <87ft674tnd.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #44101 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control 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: -3.3 (---) severity 44101 important quit From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 03:58:45 2020 Received: (at submit) by debbugs.gnu.org; 22 Oct 2020 07:58:45 +0000 Received: from localhost ([127.0.0.1]:51349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVVUj-0005Vr-BP for submit@debbugs.gnu.org; Thu, 22 Oct 2020 03:58:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:39480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVVUh-0005Vk-NW for submit@debbugs.gnu.org; Thu, 22 Oct 2020 03:58:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVVUh-0006ap-Du for bug-guix@gnu.org; Thu, 22 Oct 2020 03:58:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39197) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVVUg-0004oT-Nc; Thu, 22 Oct 2020 03:58:42 -0400 Received: from [2a01:e0a:19b:d9a0:50c1:4a69:300e:4531] (port=40658 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVVUe-0005GH-GG; Thu, 22 Oct 2020 03:58:41 -0400 From: Mathieu Othacehe To: Vagrant Cascadian Subject: Re: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure References: <87a6wgrfnp.fsf@ponder> Date: Thu, 22 Oct 2020 09:58:39 +0200 Message-ID: <87zh4ezo7k.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: bug-guix@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: -3.3 (---) --=-=-= Content-Type: text/plain Hey Vagrant, > I'm writing this from memory now, but I can also boot the machines at a > later point and get the exact configurations, if needed. Sorry for breaking your use-case. Recently I have split up the bootloader installation in two distinct parts: - Installing a bootloader directly on a mounted directory. - Installing a bootloader on a raw-image or device. Depending on the bootloader type, one or both of the methods are supported. u-boot does not really support the first method, so the patch you are mentioning is disabling this method. The problem is while reconfiguring, the first method only is used. The attached patch tries to fallback to the second method if the first one is not defined. WDYT? Thanks, Mathieu --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-system-reconfigure-Use-the-disk-installer-if-provide.patch >From 7fd5fb804317df5af5e14a6a95179acb3c8ac598 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 21 Oct 2020 10:42:50 +0200 Subject: [PATCH] system: reconfigure: Use the disk-installer if provided. --- gnu/tests/reconfigure.scm | 4 +++- guix/scripts/system/reconfigure.scm | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index 928a210a94..52beeef447 100644 --- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -260,7 +260,9 @@ bootloader's configuration file." ;; test suite, the bootloader installer script is omitted. 'grub-install' ;; would attempt to write directly to the virtual disk if the ;; installation script were run. - (test (install-bootloader-program #f #f bootcfg bootcfg-file #f "/"))))) + (test + (install-bootloader-program #f #f #f bootcfg bootcfg-file #f "/"))))) + (define %test-switch-to-system (system-test diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/reconfigure.scm index d89caf80fc..b1982b20d2 100644 --- a/guix/scripts/system/reconfigure.scm +++ b/guix/scripts/system/reconfigure.scm @@ -204,7 +204,8 @@ services as defined by OS." ;;; Bootloader configuration. ;;; -(define (install-bootloader-program installer bootloader-package bootcfg +(define (install-bootloader-program installer disk-installer + bootloader-package bootcfg bootcfg-file device target) "Return an executable store item that, upon being evaluated, will install BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system device, @@ -246,10 +247,12 @@ BOOTLOADER-PACKAGE." ;; a broken installation. (switch-symlinks new-gc-root #$bootcfg) (install-boot-config #$bootcfg #$bootcfg-file #$target) - (when #$installer + (when (or #$installer #$disk-installer) (catch #t (lambda () - (#$installer #$bootloader-package #$device #$target)) + (if #$installer + (#$installer #$bootloader-package #$device #$target) + (#$disk-installer #$bootloader-package 0 #$device))) (lambda args (delete-file new-gc-root) (match args @@ -272,11 +275,14 @@ additional configurations specified by MENU-ENTRIES can be selected." (let* ((bootloader (bootloader-configuration-bootloader configuration)) (installer (and run-installer? (bootloader-installer bootloader))) + (disk-installer (and run-installer? + (bootloader-disk-image-installer bootloader))) (package (bootloader-package bootloader)) (device (bootloader-configuration-target configuration)) (bootcfg-file (bootloader-configuration-file bootloader))) (eval #~(parameterize ((current-warning-port (%make-void-port "w"))) (primitive-load #$(install-bootloader-program installer + disk-installer package bootcfg bootcfg-file -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 16:09:01 2020 Received: (at 44101) by debbugs.gnu.org; 22 Oct 2020 20:09:01 +0000 Received: from localhost ([127.0.0.1]:53995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVgtQ-0008SW-Ol for submit@debbugs.gnu.org; Thu, 22 Oct 2020 16:09:01 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:36524) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVgtO-0008SJ-Ur for 44101@debbugs.gnu.org; Thu, 22 Oct 2020 16:08:59 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 0C05C1AA41; Thu, 22 Oct 2020 13:08:53 -0700 (PDT) From: Vagrant Cascadian To: Mathieu Othacehe Subject: Re: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure In-Reply-To: <87zh4ezo7k.fsf@gnu.org> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> Date: Thu, 22 Oct 2020 13:08:45 -0700 Message-ID: <87k0vi9g6q.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44101 Cc: 44101@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.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2020-10-22, Mathieu Othacehe wrote: > Hey Vagrant, > >> I'm writing this from memory now, but I can also boot the machines at a >> later point and get the exact configurations, if needed. > > Sorry for breaking your use-case. Recently I have split up the > bootloader installation in two distinct parts: Thanks for your work on it, even if it resulted in a regression. :) > - Installing a bootloader directly on a mounted directory. > - Installing a bootloader on a raw-image or device. > > Depending on the bootloader type, one or both of the methods are > supported. u-boot does not really support the first method, so the > patch you are mentioning is disabling this method. > > The problem is while reconfiguring, the first method only is used. The > attached patch tries to fallback to the second method if the first one > is not defined. I don't quite understand why that would be the issue here; guix system reconfigure works fine when /dev/mmcblkN is specified target in the system config.scm, just not when the target is /dev/disk/by-id/... My wild guess was something was checking for a literal block device, and failing with a symlink pointing to a block device. Trying your patch gets me a backtrace, unfortunately... With the bootloader section... (bootloader (bootloader-configuration (target "/dev/disk/by-id/mmc-SDU64_0xbaf3002e") (bootloader u-boot-pinebook-bootloader) )) And your patch applied on top of 3e09453884efa82ef97b8ec6e34470c67a1206a7... $ sudo -E ./pre-inst-env guix system reconfigure --keep-going ~/pinebook-10= 80p-desktop.scm ... waiting for locks or build slots... building /gnu/store/n17lkvs6vhq0x16mk0rxnv4j5ifvrlyr-switch-to-system.scm.d= rv... making '/gnu/store/vc3bzajlv0yxrdjmqph4sikzqkywvfq1-system' the current sys= tem... setting up setuid programs in '/run/setuid-programs'... populating /etc from /gnu/store/gssnxbhwa9dygn1i6i46j81ww5gczzav-etc... The following derivation will be built: /gnu/store/s19y61jrdys760zccxm2qiiqjpcv1fcx-install-bootloader.scm.drv building /gnu/store/s19y61jrdys760zccxm2qiiqjpcv1fcx-install-bootloader.scm= .drv... Backtrace: In guix/scripts/system.scm: 1339:8 19 (_) In guix/status.scm: 776:4 18 (call-with-status-report _ _) In guix/scripts/system.scm: 1172:4 17 (_) In ice-9/boot-9.scm: 1736:10 16 (with-exception-handler _ _ #:unwind? _ # _) In guix/store.scm: 631:37 15 (thunk) 1300:8 14 (call-with-build-handler _ _) 1300:8 13 (call-with-build-handler _ _) 1300:8 12 (call-with-build-handler _ _) 1300:8 11 (call-with-build-handler _ _) 1300:8 10 (call-with-build-handler _ _) 1300:8 9 (call-with-build-handler # =E2=80=A6) 2042:24 8 (run-with-store # =E2=80= =A6) In guix/scripts/system.scm: 842:13 7 (_ _) 844:15 6 (_ _) 750:13 5 (_ _) In ice-9/boot-9.scm: 152:2 4 (with-fluid* _ _ _) In unknown file: 3 (primitive-load "/gnu/store/81w2h9zd6b5q0ddchc0wr6vph22=E2=80= =A6") In ice-9/eval.scm: 619:8 2 (_ #(#(# "//v=E2=80=A6") = #)) In ice-9/boot-9.scm: 1669:16 1 (raise-exception _ #:continuable? _) 1669:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1669:16: In procedure raise-exception: ERROR: 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" It also fails when target is /dev/mmcblk1. So, clearly this is some other issue... live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX5HmzwAKCRDcUY/If5cW qiOzAQDdEVhHzTBXIfAZz+SZ2SbSxwaBuLWwX+LygW6xGZQQugEAu0YT5nNddiq+ yG75SXiFsm6GsBHjreSmX8NHnOK9AAE= =72AU -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 19:12:16 2020 Received: (at 44101) by debbugs.gnu.org; 22 Oct 2020 23:12:17 +0000 Received: from localhost ([127.0.0.1]:54159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVjkm-0006iO-Iv for submit@debbugs.gnu.org; Thu, 22 Oct 2020 19:12:16 -0400 Received: from imta-37.everyone.net ([216.200.145.37]:41482 helo=imta-38.everyone.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVjkl-0006iH-8X for 44101@debbugs.gnu.org; Thu, 22 Oct 2020 19:12:15 -0400 Received: from pps.filterd (omta004.sj2.proofpoint.com [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 09MN3hqY005435; Thu, 22 Oct 2020 16:12:13 -0700 X-Eon-Originating-Account: p9bW_9ed6neyzMmS9PqsQCN34BAg0FVrIcurdWUw9lM X-Eon-Dm: m0116953.ppops.net Received: by m0116953.mta.everyone.net (EON-AUTHRELAY2 - 5a81c0f1) id m0116953.5f8a0276.754e2; Thu, 22 Oct 2020 16:12:11 -0700 X-Eon-Sig: AQMHrIJfkhHLQE5PbAIAAAAD,8027ff25f855c3d875c548972ab9fac4 X-Eip: eRMfM0oiXW1CXIOm29xFmURVtrlH3AAp_JV03jZKuuQ Date: Fri, 23 Oct 2020 01:12:02 +0200 From: Bengt Richter To: Vagrant Cascadian Subject: Re: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure Message-ID: <20201022231202.GA2497@LionPure> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87k0vi9g6q.fsf@ponder> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.737 definitions=2020-10-22_17:2020-10-20, 2020-10-22 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1034 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 malwarescore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2010220148 X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 44101 Cc: Mathieu Othacehe , 44101@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: , Reply-To: Bengt Richter Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Hi, On +2020-10-22 13:08:45 -0700, Vagrant Cascadian wrote: > On 2020-10-22, Mathieu Othacehe wrote: > > Hey Vagrant, > > > >> I'm writing this from memory now, but I can also boot the machines at a > >> later point and get the exact configurations, if needed. > > > > Sorry for breaking your use-case. Recently I have split up the > > bootloader installation in two distinct parts: > > Thanks for your work on it, even if it resulted in a regression. :) > > > > - Installing a bootloader directly on a mounted directory. > > - Installing a bootloader on a raw-image or device. > > > > Depending on the bootloader type, one or both of the methods are > > supported. u-boot does not really support the first method, so the > > patch you are mentioning is disabling this method. > > > > The problem is while reconfiguring, the first method only is used. The > > attached patch tries to fallback to the second method if the first one > > is not defined. > > I don't quite understand why that would be the issue here; guix system > reconfigure works fine when /dev/mmcblkN is specified target in the > system config.scm, just not when the target is /dev/disk/by-id/... > > My wild guess was something was checking for a literal block device, and > failing with a symlink pointing to a block device. > IIUC [1] implies the contents of /dev/disk/by-id is populated on udev events, so IIRC the values can be stale. Maybe that's an eliminated race by now, or a clue about old systems? [1] https://unix.stackexchange.com/questions/86764/understanding-dev-disk-by-folders > > Trying your patch gets me a backtrace, unfortunately... > > With the bootloader section... > > (bootloader (bootloader-configuration > (target "/dev/disk/by-id/mmc-SDU64_0xbaf3002e") > (bootloader u-boot-pinebook-bootloader) > )) > > And your patch applied on top of 3e09453884efa82ef97b8ec6e34470c67a1206a7... > > $ sudo -E ./pre-inst-env guix system reconfigure --keep-going ~/pinebook-1080p-desktop.scm > ... > waiting for locks or build slots... > building /gnu/store/n17lkvs6vhq0x16mk0rxnv4j5ifvrlyr-switch-to-system.scm.drv... > making '/gnu/store/vc3bzajlv0yxrdjmqph4sikzqkywvfq1-system' the current system... > setting up setuid programs in '/run/setuid-programs'... > populating /etc from /gnu/store/gssnxbhwa9dygn1i6i46j81ww5gczzav-etc... > The following derivation will be built: > /gnu/store/s19y61jrdys760zccxm2qiiqjpcv1fcx-install-bootloader.scm.drv > > building /gnu/store/s19y61jrdys760zccxm2qiiqjpcv1fcx-install-bootloader.scm.drv... > Backtrace: > In guix/scripts/system.scm: > 1339:8 19 (_) > In guix/status.scm: > 776:4 18 (call-with-status-report _ _) > In guix/scripts/system.scm: > 1172:4 17 (_) > In ice-9/boot-9.scm: > 1736:10 16 (with-exception-handler _ _ #:unwind? _ # _) > In guix/store.scm: > 631:37 15 (thunk) > 1300:8 14 (call-with-build-handler _ _) > 1300:8 13 (call-with-build-handler _ _) > 1300:8 12 (call-with-build-handler _ _) > 1300:8 11 (call-with-build-handler _ _) > 1300:8 10 (call-with-build-handler _ _) > 1300:8 9 (call-with-build-handler # …) > 2042:24 8 (run-with-store # …) > In guix/scripts/system.scm: > 842:13 7 (_ _) > 844:15 6 (_ _) > 750:13 5 (_ _) > In ice-9/boot-9.scm: > 152:2 4 (with-fluid* _ _ _) > In unknown file: > 3 (primitive-load "/gnu/store/81w2h9zd6b5q0ddchc0wr6vph22…") > In ice-9/eval.scm: > 619:8 2 (_ #(#(# "//v…") #)) > In ice-9/boot-9.scm: > 1669:16 1 (raise-exception _ #:continuable? _) > 1669:16 0 (raise-exception _ #:continuable? _) > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > ERROR: > 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" > > > It also fails when target is /dev/mmcblk1. > > So, clearly this is some other issue... > > > live well, > vagrant HTH, otherwise sorry for the noise :) -- Regards, Bengt Richter From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 04:14:08 2020 Received: (at 44101) by debbugs.gnu.org; 23 Oct 2020 08:14:08 +0000 Received: from localhost ([127.0.0.1]:54749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVsD9-00084k-QV for submit@debbugs.gnu.org; Fri, 23 Oct 2020 04:14:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVsD8-00084M-GO for 44101@debbugs.gnu.org; Fri, 23 Oct 2020 04:14:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33084) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVsD3-0000Om-1l; Fri, 23 Oct 2020 04:14:01 -0400 Received: from [2a01:e0a:19b:d9a0:50c1:4a69:300e:4531] (port=55016 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVsCm-0004hG-2n; Fri, 23 Oct 2020 04:14:00 -0400 From: Mathieu Othacehe To: Vagrant Cascadian Subject: Re: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> Date: Fri, 23 Oct 2020 10:13:42 +0200 In-Reply-To: <87k0vi9g6q.fsf@ponder> (Vagrant Cascadian's message of "Thu, 22 Oct 2020 13:08:45 -0700") Message-ID: <875z71jr61.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44101 Cc: 44101@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: -3.3 (---) Hello, > I don't quite understand why that would be the issue here; guix system > reconfigure works fine when /dev/mmcblkN is specified target in the > system config.scm, just not when the target is /dev/disk/by-id/... I don't think it works fine with /dev/mmcblkN. I think the bootloader configuration file is installed in /boot/extlinux/extlinux.conf when using /dev/mmcblkN or /dev/disk/, but the bootloader itself is actually never installed. > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > ERROR: > 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" Thanks for testing. This is probably a regression in "write-file-on-device" that fails to open this kind of files. I'll try to reproduce it locally. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 04:44:26 2020 Received: (at 44101) by debbugs.gnu.org; 23 Oct 2020 08:44:27 +0000 Received: from localhost ([127.0.0.1]:54760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVsgU-0000P9-Ek for submit@debbugs.gnu.org; Fri, 23 Oct 2020 04:44:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVsgS-0000Ot-Kg for 44101@debbugs.gnu.org; Fri, 23 Oct 2020 04:44:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33374) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVsgM-0002nP-Ol; Fri, 23 Oct 2020 04:44:19 -0400 Received: from [2a01:e0a:19b:d9a0:50c1:4a69:300e:4531] (port=55512 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kVsgM-0001Kl-18; Fri, 23 Oct 2020 04:44:18 -0400 From: Mathieu Othacehe To: Vagrant Cascadian Subject: Re: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> Date: Fri, 23 Oct 2020 10:44:16 +0200 In-Reply-To: <875z71jr61.fsf@gnu.org> (Mathieu Othacehe's message of "Fri, 23 Oct 2020 10:13:42 +0200") Message-ID: <87y2jxib6n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44101 Cc: 44101@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: -3.3 (---) --=-=-= Content-Type: text/plain Hello, >> ice-9/boot-9.scm:1669:16: In procedure raise-exception: >> ERROR: >> 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" > > Thanks for testing. This is probably a regression in > "write-file-on-device" that fails to open this kind of files. I'll try > to reproduce it locally. This is because the O_EXCL flag was passed, which causes open to fail if the block device is mounted. The revised patch attached should fix it. Thanks, Mathieu --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-system-reconfigure-Use-the-disk-installer-if-provide.patch >From 780327ebb0db74ca4cc43d26ba7cf945d64c7d30 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 21 Oct 2020 10:42:50 +0200 Subject: [PATCH] system: reconfigure: Use the disk-installer if provided. --- gnu/build/bootloader.scm | 4 ++-- gnu/tests/reconfigure.scm | 4 +++- guix/scripts/system/reconfigure.scm | 12 +++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gnu/build/bootloader.scm b/gnu/build/bootloader.scm index 5ec839f902..06a2c3ab76 100644 --- a/gnu/build/bootloader.scm +++ b/gnu/build/bootloader.scm @@ -39,9 +39,9 @@ (let ((bv (get-bytevector-n input size))) (call-with-port (open-file-output-port device - (file-options no-truncate no-create) + (file-options no-truncate no-fail) (buffer-mode block) - (native-transcoder)) + (make-transcoder (latin-1-codec))) (lambda (output) (seek output offset SEEK_SET) (put-bytevector output bv))))))) diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index 928a210a94..52beeef447 100644 --- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -260,7 +260,9 @@ bootloader's configuration file." ;; test suite, the bootloader installer script is omitted. 'grub-install' ;; would attempt to write directly to the virtual disk if the ;; installation script were run. - (test (install-bootloader-program #f #f bootcfg bootcfg-file #f "/"))))) + (test + (install-bootloader-program #f #f #f bootcfg bootcfg-file #f "/"))))) + (define %test-switch-to-system (system-test diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/reconfigure.scm index d89caf80fc..b1982b20d2 100644 --- a/guix/scripts/system/reconfigure.scm +++ b/guix/scripts/system/reconfigure.scm @@ -204,7 +204,8 @@ services as defined by OS." ;;; Bootloader configuration. ;;; -(define (install-bootloader-program installer bootloader-package bootcfg +(define (install-bootloader-program installer disk-installer + bootloader-package bootcfg bootcfg-file device target) "Return an executable store item that, upon being evaluated, will install BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system device, @@ -246,10 +247,12 @@ BOOTLOADER-PACKAGE." ;; a broken installation. (switch-symlinks new-gc-root #$bootcfg) (install-boot-config #$bootcfg #$bootcfg-file #$target) - (when #$installer + (when (or #$installer #$disk-installer) (catch #t (lambda () - (#$installer #$bootloader-package #$device #$target)) + (if #$installer + (#$installer #$bootloader-package #$device #$target) + (#$disk-installer #$bootloader-package 0 #$device))) (lambda args (delete-file new-gc-root) (match args @@ -272,11 +275,14 @@ additional configurations specified by MENU-ENTRIES can be selected." (let* ((bootloader (bootloader-configuration-bootloader configuration)) (installer (and run-installer? (bootloader-installer bootloader))) + (disk-installer (and run-installer? + (bootloader-disk-image-installer bootloader))) (package (bootloader-package bootloader)) (device (bootloader-configuration-target configuration)) (bootcfg-file (bootloader-configuration-file bootloader))) (eval #~(parameterize ((current-warning-port (%make-void-port "w"))) (primitive-load #$(install-bootloader-program installer + disk-installer package bootcfg bootcfg-file -- 2.28.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 11:15:08 2020 Received: (at 44101) by debbugs.gnu.org; 23 Oct 2020 15:15:08 +0000 Received: from localhost ([127.0.0.1]:58025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVyma-0003Fd-Ie for submit@debbugs.gnu.org; Fri, 23 Oct 2020 11:15:08 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:37646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVymY-00036k-FE for 44101@debbugs.gnu.org; Fri, 23 Oct 2020 11:15:07 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 33B921AA41; Fri, 23 Oct 2020 08:15:00 -0700 (PDT) From: Vagrant Cascadian To: Mathieu Othacehe Subject: Re: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure In-Reply-To: <875z71jr61.fsf@gnu.org> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> Date: Fri, 23 Oct 2020 08:14:53 -0700 Message-ID: <87ft65t1n6.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44101 Cc: 44101@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.0 (-) --=-=-= Content-Type: text/plain On 2020-10-23, Mathieu Othacehe wrote: >> I don't quite understand why that would be the issue here; guix system >> reconfigure works fine when /dev/mmcblkN is specified target in the >> system config.scm, just not when the target is /dev/disk/by-id/... > > I don't think it works fine with /dev/mmcblkN. I think the bootloader > configuration file is installed in /boot/extlinux/extlinux.conf when > using /dev/mmcblkN or /dev/disk/, but the bootloader itself is actually > never installed. That does not match the behavior I observed; it definitely successfully installs the bootloader when passing the raw device rather than a symlink. Which I can only think of a small number of conditions that would trigger that sort of behavior... I'm fairly confident in this because I've been experimenting with two incompatible u-boot bootloaders on the same boot media (one for pinebook, and one for pinebook pro) and a successful installation overwrites the bootloader, resulting in the expected machine booting, and the other machine not booting. With a symlink it doesn't install to the raw device at all... That said, I'll move on to testing your next patch. :) live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX5LzbwAKCRDcUY/If5cW qhFzAP9584ajRl0cA8xYDHOB8Z+2b9c2curDnEfnGNcP2O07qQEA+70HFDHKN3qm KOIb9reADaeFkIIRxYGdoV3jMhUlGwA= =6hT6 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 23 21:41:43 2020 Received: (at 44101) by debbugs.gnu.org; 24 Oct 2020 01:41:43 +0000 Received: from localhost ([127.0.0.1]:58773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW8Yx-0006Ve-CS for submit@debbugs.gnu.org; Fri, 23 Oct 2020 21:41:43 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:37978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW8Ys-0006VN-T9 for 44101@debbugs.gnu.org; Fri, 23 Oct 2020 21:41:42 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id BCAE61AA41; Fri, 23 Oct 2020 18:41:32 -0700 (PDT) From: Vagrant Cascadian To: Mathieu Othacehe Subject: Re: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure In-Reply-To: <87y2jxib6n.fsf@gnu.org> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> <87y2jxib6n.fsf@gnu.org> Date: Fri, 23 Oct 2020 18:40:58 -0700 Message-ID: <875z70mmdx.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44101 Cc: 44101@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.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2020-10-23, Mathieu Othacehe wrote: >>> ice-9/boot-9.scm:1669:16: In procedure raise-exception: >>> ERROR: >>> 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" >> >> Thanks for testing. This is probably a regression in >> "write-file-on-device" that fails to open this kind of files. I'll try >> to reproduce it locally. > > This is because the O_EXCL flag was passed, which causes open to fail if > the block device is mounted. > > The revised patch attached should fix it. Yes, this patch fixes the issue for me. Thanks! live well, vagrant > From 780327ebb0db74ca4cc43d26ba7cf945d64c7d30 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Wed, 21 Oct 2020 10:42:50 +0200 > Subject: [PATCH] system: reconfigure: Use the disk-installer if provided. > > --- > gnu/build/bootloader.scm | 4 ++-- > gnu/tests/reconfigure.scm | 4 +++- > guix/scripts/system/reconfigure.scm | 12 +++++++++--- > 3 files changed, 14 insertions(+), 6 deletions(-) > > diff --git a/gnu/build/bootloader.scm b/gnu/build/bootloader.scm > index 5ec839f902..06a2c3ab76 100644 > --- a/gnu/build/bootloader.scm > +++ b/gnu/build/bootloader.scm > @@ -39,9 +39,9 @@ > (let ((bv (get-bytevector-n input size))) > (call-with-port > (open-file-output-port device > - (file-options no-truncate no-create) > + (file-options no-truncate no-fail) > (buffer-mode block) > - (native-transcoder)) > + (make-transcoder (latin-1-codec))) > (lambda (output) > (seek output offset SEEK_SET) > (put-bytevector output bv))))))) > diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm > index 928a210a94..52beeef447 100644 > --- a/gnu/tests/reconfigure.scm > +++ b/gnu/tests/reconfigure.scm > @@ -260,7 +260,9 @@ bootloader's configuration file." > ;; test suite, the bootloader installer script is omitted. 'grub-in= stall' > ;; would attempt to write directly to the virtual disk if the > ;; installation script were run. > - (test (install-bootloader-program #f #f bootcfg bootcfg-file #f "/"= ))))) > + (test > + (install-bootloader-program #f #f #f bootcfg bootcfg-file #f "/"))= ))) > + >=20=20 > (define %test-switch-to-system > (system-test > diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/re= configure.scm > index d89caf80fc..b1982b20d2 100644 > --- a/guix/scripts/system/reconfigure.scm > +++ b/guix/scripts/system/reconfigure.scm > @@ -204,7 +204,8 @@ services as defined by OS." > ;;; Bootloader configuration. > ;;; >=20=20 > -(define (install-bootloader-program installer bootloader-package bootcfg > +(define (install-bootloader-program installer disk-installer > + bootloader-package bootcfg > bootcfg-file device target) > "Return an executable store item that, upon being evaluated, will inst= all > BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system de= vice, > @@ -246,10 +247,12 @@ BOOTLOADER-PACKAGE." > ;; a broken installation. > (switch-symlinks new-gc-root #$bootcfg) > (install-boot-config #$bootcfg #$bootcfg-file #$target) > - (when #$installer > + (when (or #$installer #$disk-installer) > (catch #t > (lambda () > - (#$installer #$bootloader-package #$device #$target)) > + (if #$installer > + (#$installer #$bootloader-package #$device #$targ= et) > + (#$disk-installer #$bootloader-package 0 #$device= ))) > (lambda args > (delete-file new-gc-root) > (match args > @@ -272,11 +275,14 @@ additional configurations specified by MENU-ENTRIES= can be selected." > (let* ((bootloader (bootloader-configuration-bootloader configuration)) > (installer (and run-installer? > (bootloader-installer bootloader))) > + (disk-installer (and run-installer? > + (bootloader-disk-image-installer bootloade= r))) > (package (bootloader-package bootloader)) > (device (bootloader-configuration-target configuration)) > (bootcfg-file (bootloader-configuration-file bootloader))) > (eval #~(parameterize ((current-warning-port (%make-void-port "w"))) > (primitive-load #$(install-bootloader-program installer > + disk-install= er > package > bootcfg > bootcfg-file > --=20 > 2.28.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHQEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX5OGLAAKCRDcUY/If5cW qi+TAPUV4Hhkw1C7YurjPEb1ah6pagSugmaY+3UpynfPtVDFAQC5BqcIcH/FZEQr UwL3qXK8OFNBQ4WRGKE2OiKRR4ZqAA== =0w9F -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 02 14:15:10 2020 Received: (at 44101) by debbugs.gnu.org; 2 Nov 2020 19:15:10 +0000 Received: from localhost ([127.0.0.1]:42664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZfIM-0006pX-5S for submit@debbugs.gnu.org; Mon, 02 Nov 2020 14:15:10 -0500 Received: from cascadia.aikidev.net ([173.255.214.101]:49844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZfIK-0006pC-HU for 44101@debbugs.gnu.org; Mon, 02 Nov 2020 14:15:08 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 6F3971AA41; Mon, 2 Nov 2020 11:15:02 -0800 (PST) From: Vagrant Cascadian To: Mathieu Othacehe Subject: Re: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure In-Reply-To: <875z70mmdx.fsf@ponder> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> <87y2jxib6n.fsf@gnu.org> <875z70mmdx.fsf@ponder> Date: Mon, 02 Nov 2020 11:14:58 -0800 Message-ID: <87pn4vo9jh.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44101 Cc: 44101@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.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2020-10-23, Vagrant Cascadian wrote: > On 2020-10-23, Mathieu Othacehe wrote: >>>> ice-9/boot-9.scm:1669:16: In procedure raise-exception: >>>> ERROR: >>>> 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" >>> >>> Thanks for testing. This is probably a regression in >>> "write-file-on-device" that fails to open this kind of files. I'll try >>> to reproduce it locally. >> >> This is because the O_EXCL flag was passed, which causes open to fail if >> the block device is mounted. >> >> The revised patch attached should fix it. > > Yes, this patch fixes the issue for me. > > Thanks! Any reason not to apply this patch yet? Hope it can land in the next guix release, at least. live well, vagrant >> From 780327ebb0db74ca4cc43d26ba7cf945d64c7d30 Mon Sep 17 00:00:00 2001 >> From: Mathieu Othacehe >> Date: Wed, 21 Oct 2020 10:42:50 +0200 >> Subject: [PATCH] system: reconfigure: Use the disk-installer if provided. >> >> --- >> gnu/build/bootloader.scm | 4 ++-- >> gnu/tests/reconfigure.scm | 4 +++- >> guix/scripts/system/reconfigure.scm | 12 +++++++++--- >> 3 files changed, 14 insertions(+), 6 deletions(-) >> >> diff --git a/gnu/build/bootloader.scm b/gnu/build/bootloader.scm >> index 5ec839f902..06a2c3ab76 100644 >> --- a/gnu/build/bootloader.scm >> +++ b/gnu/build/bootloader.scm >> @@ -39,9 +39,9 @@ >> (let ((bv (get-bytevector-n input size))) >> (call-with-port >> (open-file-output-port device >> - (file-options no-truncate no-create) >> + (file-options no-truncate no-fail) >> (buffer-mode block) >> - (native-transcoder)) >> + (make-transcoder (latin-1-codec))) >> (lambda (output) >> (seek output offset SEEK_SET) >> (put-bytevector output bv))))))) >> diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm >> index 928a210a94..52beeef447 100644 >> --- a/gnu/tests/reconfigure.scm >> +++ b/gnu/tests/reconfigure.scm >> @@ -260,7 +260,9 @@ bootloader's configuration file." >> ;; test suite, the bootloader installer script is omitted. 'grub-i= nstall' >> ;; would attempt to write directly to the virtual disk if the >> ;; installation script were run. >> - (test (install-bootloader-program #f #f bootcfg bootcfg-file #f "/= "))))) >> + (test >> + (install-bootloader-program #f #f #f bootcfg bootcfg-file #f "/")= )))) >> + >>=20=20 >> (define %test-switch-to-system >> (system-test >> diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/r= econfigure.scm >> index d89caf80fc..b1982b20d2 100644 >> --- a/guix/scripts/system/reconfigure.scm >> +++ b/guix/scripts/system/reconfigure.scm >> @@ -204,7 +204,8 @@ services as defined by OS." >> ;;; Bootloader configuration. >> ;;; >>=20=20 >> -(define (install-bootloader-program installer bootloader-package bootcfg >> +(define (install-bootloader-program installer disk-installer >> + bootloader-package bootcfg >> bootcfg-file device target) >> "Return an executable store item that, upon being evaluated, will ins= tall >> BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system d= evice, >> @@ -246,10 +247,12 @@ BOOTLOADER-PACKAGE." >> ;; a broken installation. >> (switch-symlinks new-gc-root #$bootcfg) >> (install-boot-config #$bootcfg #$bootcfg-file #$target) >> - (when #$installer >> + (when (or #$installer #$disk-installer) >> (catch #t >> (lambda () >> - (#$installer #$bootloader-package #$device #$target)) >> + (if #$installer >> + (#$installer #$bootloader-package #$device #$tar= get) >> + (#$disk-installer #$bootloader-package 0 #$devic= e))) >> (lambda args >> (delete-file new-gc-root) >> (match args >> @@ -272,11 +275,14 @@ additional configurations specified by MENU-ENTRIE= S can be selected." >> (let* ((bootloader (bootloader-configuration-bootloader configuration= )) >> (installer (and run-installer? >> (bootloader-installer bootloader))) >> + (disk-installer (and run-installer? >> + (bootloader-disk-image-installer bootload= er))) >> (package (bootloader-package bootloader)) >> (device (bootloader-configuration-target configuration)) >> (bootcfg-file (bootloader-configuration-file bootloader))) >> (eval #~(parameterize ((current-warning-port (%make-void-port "w"))) >> (primitive-load #$(install-bootloader-program installer >> + disk-instal= ler >> package >> bootcfg >> bootcfg-file >> --=20 >> 2.28.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX6BasgAKCRDcUY/If5cW qukMAQCnItRLdg7hEFRcsaVtvje/h1wWZeNC02jYfu5/K8qY2wEAoX0pLCkMaxai 6up9hl9Yt4U+unyUdfWgjmIqTayzVA0= =PXI3 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 03 02:02:22 2020 Received: (at 44101-done) by debbugs.gnu.org; 3 Nov 2020 07:02:22 +0000 Received: from localhost ([127.0.0.1]:43186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZqKk-0004p2-Eo for submit@debbugs.gnu.org; Tue, 03 Nov 2020 02:02:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZqKi-0004oo-Ed for 44101-done@debbugs.gnu.org; Tue, 03 Nov 2020 02:02:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38677) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZqKc-0001td-Fx; Tue, 03 Nov 2020 02:02:14 -0500 Received: from [2a01:e0a:19b:d9a0:18fc:abbb:ba3a:b87e] (port=39560 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZqKb-0007r1-KU; Tue, 03 Nov 2020 02:02:14 -0500 From: Mathieu Othacehe To: Vagrant Cascadian Subject: Re: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> <87y2jxib6n.fsf@gnu.org> <875z70mmdx.fsf@ponder> <87pn4vo9jh.fsf@yucca> Date: Tue, 03 Nov 2020 08:02:11 +0100 In-Reply-To: <87pn4vo9jh.fsf@yucca> (Vagrant Cascadian's message of "Mon, 02 Nov 2020 11:14:58 -0800") Message-ID: <875z6mj53g.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44101-done Cc: 44101-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: -3.3 (---) Hello, > Any reason not to apply this patch yet? Hope it can land in the next > guix release, at least. Nothing besides lack of time. Pushed as a38d861e571c952f78ca588b50bdcc4adcb0c88c. Thanks for reporting and testing, Mathieu From unknown Mon Jun 23 02:25:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Dec 2020 12:24:04 +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