From 582cf9257cd1f9c969fbba5eb1c336ac8b975cde Mon Sep 17 00:00:00 2001 From: Miguel Ángel Arruga Vivas Date: Sat, 24 Oct 2020 18:15:53 +0200 Subject: system: Add store-directory-prefix to boot-parameters. Fixes * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-directory-prefix. * gnu/system.scm (define-module): Export boot-parameters-store-directory-prefix. ()[store-directory-prefix]: New field. It is used to generate the correct paths when /gnu/store is installed on a btrfs subvolume whose name doesn't match the final runtime path, as the bootloader doesn't have knowledge about the final mounting points. [boot-parameters-store-directory-prefix]: New accessor. (read-boot-parameters): Read directory-prefix from store field. (operating-system-boot-parameters-file): Add directory-prefix to store field. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-directory-prefix. * test/boot-parameters.scm (%default-btrfs-subvolume, %default-store-directory-prefix): New variables. (%grub-boot-parameters): Use %default-store-directory-prefix. (%default-operating-system): Use %default-btrfs-subvolume. (test-boot-parameters): Add directory-prefix. (test optional fields): Add test for directory-prefix. (test os store-directory-prefix): New test. --- gnu/machine/ssh.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/machine') diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 5020bd362f..a3a12fb54b 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -482,6 +482,8 @@ an environment type of 'managed-host." (list (second boot-parameters)))) (locale -> (boot-parameters-locale (second boot-parameters))) + (store-dir -> (boot-parameters-store-directory-prefix + (second boot-parameters))) (old-entries -> (map boot-parameters->menu-entry (drop boot-parameters 2))) (bootloader -> (operating-system-bootloader @@ -492,6 +494,7 @@ an environment type of 'managed-host." bootloader)) bootloader entries #:locale locale + #:store-directory-prefix store-dir #:old-entries old-entries))) (remote-result (machine-remote-eval machine remote-exp))) (when (eqv? 'error remote-result) -- cgit 1.4.1