From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UBQxFfs7kV+/FAAA0tVLHw (envelope-from ) for ; Thu, 22 Oct 2020 07:59:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2PqaD/s7kV+THgAA1q6Kng (envelope-from ) for ; Thu, 22 Oct 2020 07:59:55 +0000 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 9BDD7940224 for ; Thu, 22 Oct 2020 07:59:54 +0000 (UTC) Received: from localhost ([::1]:52356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVVVp-0007In-LA for larch@yhetil.org; Thu, 22 Oct 2020 03:59:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVVV0-0006vi-1B for bug-guix@gnu.org; Thu, 22 Oct 2020 03:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVVUz-0004uW-OE for bug-guix@gnu.org; Thu, 22 Oct 2020 03:59:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kVVUz-0005WR-Mi for bug-guix@gnu.org; Thu, 22 Oct 2020 03:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure In-Reply-To: <87a6wgrfnp.fsf@ponder> Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 22 Oct 2020 07:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44101 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Vagrant Cascadian X-Debbugs-Original-Cc: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160335352521199 (code B ref -1); Thu, 22 Oct 2020 07:59:01 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44101@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: 5q+3d5ctUbqw --=-=-= 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 --=-=-=--