mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
system: Add store-directory-prefix to boot-parameters.
Fixes <http://issues.guix.gnu.org/44196> * 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. (<boot-parameters>)[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.
This commit is contained in:
parent
96d0f0b138
commit
582cf9257c
4 changed files with 48 additions and 4 deletions
|
@ -385,6 +385,8 @@ STORE is an open connection to the store."
|
|||
(params (first (profile-boot-parameters %system-profile
|
||||
(list number))))
|
||||
(locale (boot-parameters-locale params))
|
||||
(store-directory-prefix
|
||||
(boot-parameters-store-directory-prefix params))
|
||||
(old-generations
|
||||
(delv number (reverse (generation-numbers %system-profile))))
|
||||
(old-params (profile-boot-parameters
|
||||
|
@ -398,6 +400,7 @@ STORE is an open connection to the store."
|
|||
((bootloader-configuration-file-generator bootloader)
|
||||
bootloader-config entries
|
||||
#:locale locale
|
||||
#:store-directory-prefix store-directory-prefix
|
||||
#:old-entries old-entries)))
|
||||
(drvs -> (list bootcfg)))
|
||||
(mbegin %store-monad
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue