aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/vm.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build/vm.scm')
-rw-r--r--gnu/build/vm.scm18
1 files changed, 12 insertions, 6 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 7147ce1993..57619764ce 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -310,11 +310,11 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
(unless register-closures?
(reset-timestamps target))))
-(define (register-grub.cfg-root target bootcfg)
+(define (register-bootcfg-root target bootcfg)
"On file system TARGET, register BOOTCFG as a GC root."
(let ((directory (string-append target "/var/guix/gcroots")))
(mkdir-p directory)
- (symlink bootcfg (string-append directory "/grub.cfg"))))
+ (symlink bootcfg (string-append directory "/bootcfg"))))
(define (install-efi grub esp config-file)
"Write a self-contained GRUB EFI loader to the mounted ESP using CONFIG-FILE."
@@ -346,7 +346,10 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
(define* (initialize-hard-disk device
#:key
- grub.cfg
+ bootloader-package
+ bootcfg
+ bootcfg-location
+ bootloader-installer
(grub-efi #f)
(partitions '()))
"Initialize DEVICE as a disk containing all the <partition> objects listed
@@ -375,7 +378,10 @@ passing it a directory name where it is mounted."
(display "mounting root partition...\n")
(mkdir-p target)
(mount (partition-device root) target (partition-file-system root))
- (install-grub grub.cfg device target)
+ (install-boot-config bootcfg bootcfg-location target)
+ (when bootloader-installer
+ (display "installing bootloader...\n")
+ (bootloader-installer bootloader-package device target))
(when esp
;; Mount the ESP somewhere and install GRUB UEFI image.
@@ -402,8 +408,8 @@ passing it a directory name where it is mounted."
(delete-file grub-config)
(umount mount-point)))
- ;; Register GRUB.CFG as a GC root.
- (register-grub.cfg-root target grub.cfg)
+ ;; Register BOOTCFG as a GC root.
+ (register-bootcfg-root target bootcfg)
(umount target)))