From 1975c754f487eb4933724ca3b116442d21ef8dd9 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 29 Jun 2017 12:42:59 +0200 Subject: bootloader: Use for the bootloader side. * gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it. (: New field "device". * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle entries. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle 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 . * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage. (perform-action): Fix bootcfg usage. --- guix/scripts/system.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'guix/scripts') 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)) -- cgit v1.2.3