From: Mathieu Othacehe <othacehe@gnu.org>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: 44101@debbugs.gnu.org
Subject: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure
Date: Thu, 22 Oct 2020 09:58:39 +0200 [thread overview]
Message-ID: <87zh4ezo7k.fsf@gnu.org> (raw)
In-Reply-To: <87a6wgrfnp.fsf@ponder>
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-system-reconfigure-Use-the-disk-installer-if-provide.patch --]
[-- Type: text/x-diff, Size: 3474 bytes --]
From 7fd5fb804317df5af5e14a6a95179acb3c8ac598 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
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
next prev parent reply other threads:[~2020-10-22 7:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 17:06 bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure Vagrant Cascadian
2020-10-22 7:58 ` Mathieu Othacehe [this message]
2020-10-22 20:08 ` Vagrant Cascadian
2020-10-22 23:12 ` Bengt Richter
2020-10-23 8:13 ` Mathieu Othacehe
2020-10-23 8:44 ` Mathieu Othacehe
2020-10-24 1:40 ` Vagrant Cascadian
2020-11-02 19:14 ` Vagrant Cascadian
2020-11-03 7:02 ` Mathieu Othacehe
2020-10-23 15:14 ` Vagrant Cascadian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zh4ezo7k.fsf@gnu.org \
--to=othacehe@gnu.org \
--cc=44101@debbugs.gnu.org \
--cc=vagrant@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).