aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/system.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2017-06-29 12:42:59 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2017-07-28 21:56:18 +0200
commit1975c754f487eb4933724ca3b116442d21ef8dd9 (patch)
tree6b6ffb984416b197135118ff0222c3ec85e53434 /guix/scripts/system.scm
parent9ca8aa38ecce0b0651a0ff394ee4ce32bdd0bb41 (diff)
downloadgnu-guix-1975c754f487eb4933724ca3b116442d21ef8dd9.tar
gnu-guix-1975c754f487eb4933724ca3b116442d21ef8dd9.tar.gz
bootloader: Use <menu-entry> for the bootloader side.
* gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it. (<menu-entry>: New field "device". * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry> entries. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle <menu-entry> entries. * gnu/system.scm (menu->entry->boot-parameters): Delete variable. (boot-parameters->menu-entry): New variable. Export it. (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>. * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage. (perform-action): Fix bootcfg usage.
Diffstat (limited to 'guix/scripts/system.scm')
-rw-r--r--guix/scripts/system.scm13
1 files changed, 7 insertions, 6 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 0fcb6a9b0f..5a2811e75b 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -431,8 +431,6 @@ generation as its default entry. STORE is an open connection to the store."
"Re-install bootloader for existing system profile generation NUMBER.
STORE is an open connection to the store."
(let* ((generation (generation-file-name %system-profile number))
- (params (unless-file-not-found
- (read-boot-parameters-file generation)))
;; Detect the bootloader used in %system-profile.
(bootloader (lookup-bootloader-by-name (system-bootloader-name)))
@@ -442,10 +440,12 @@ STORE is an open connection to the store."
(bootloader bootloader)))
;; Make the specified system generation the default entry.
- (entries (profile-boot-parameters %system-profile (list number)))
+ (params (profile-boot-parameters %system-profile (list number)))
(old-generations (delv number (generation-numbers %system-profile)))
- (old-entries (profile-boot-parameters
- %system-profile old-generations)))
+ (old-params (profile-boot-parameters
+ %system-profile old-generations))
+ (entries (map boot-parameters->menu-entry params))
+ (old-entries (map boot-parameters->menu-entry old-params)))
(run-with-store store
(mlet* %store-monad
((bootcfg ((bootloader-configuration-file-generator bootloader)
@@ -657,7 +657,8 @@ output when building a system derivation, such as a disk image."
os
(if (eq? 'init action)
'()
- (profile-boot-parameters)))))
+ (map boot-parameters->menu-entry
+ (profile-boot-parameters))))))
(bootcfg-file -> (bootloader-configuration-file bootloader))
(bootloader-installer
(let ((installer (bootloader-installer bootloader))