diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-05-09 10:52:02 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-05-16 14:41:01 +0200 |
commit | 9121ce553d267e9fdd4c6b9a268ce9d8677dd234 (patch) | |
tree | 4d8b16f6d7c7b01104c62900c46500dc661514b3 /gnu/build/vm.scm | |
parent | b09a8da4a2e50845a297e041762f3ff9e649c047 (diff) | |
download | gnu-guix-9121ce553d267e9fdd4c6b9a268ce9d8677dd234.tar gnu-guix-9121ce553d267e9fdd4c6b9a268ce9d8677dd234.tar.gz |
bootloader: Adapt vm to new bootloader API.
* gnu/build/install.scm (install-boot-config): New procedure.
(install-grub): Move to (gnu bootloader grub).
* gnu/build/vm.scm (register-bootcfg-root): Rename register-grub.cfg-root and
adjust accordingly.
(initialize-hard-disk): Takes a bootloader-package, bootcfg, bootcfg-location and
bootloader-installer procedure. Adjust accordingly.
* gnu/system/vm.scm (qemu-image): Adjust to initialize-hard-disk.
(system-disk-image, system-qemu-image, system-qemu-image/shared-store):
Adjust to qemu-image.
Diffstat (limited to 'gnu/build/vm.scm')
-rw-r--r-- | gnu/build/vm.scm | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index 1eb9a4c45e..9a77bee72d 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -285,15 +285,18 @@ 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* (initialize-hard-disk device #:key - grub.cfg + bootloader-package + bootcfg + bootcfg-location + bootloader-installer (partitions '())) "Initialize DEVICE as a disk containing all the <partition> objects listed in PARTITIONS, and using BOOTCFG as its bootloader configuration file. @@ -311,10 +314,12 @@ 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 + (bootloader-installer bootloader-package device target)) - ;; 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))) |