summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/vm.scm36
1 files changed, 25 insertions, 11 deletions
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 080014cde4..2ee5c2b1e7 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -46,6 +46,7 @@
                 #:select (%guile-static-stripped))
   #:use-module (gnu packages admin)
 
+  #:use-module (gnu bootloader)
   #:use-module (gnu system shadow)
   #:use-module (gnu system pam)
   #:use-module (gnu system linux-initrd)
@@ -176,8 +177,9 @@ made available under the /xchg CIFS share."
                      (disk-image-format "qcow2")
                      (file-system-type "ext4")
                      file-system-label
-                     os-derivation
-                     grub-configuration
+                     os-drv
+                     bootcfg-drv
+                     bootloader
                      (register-closures? #t)
                      (inputs '())
                      copy-inputs?)
@@ -201,7 +203,7 @@ the image."
                       (guix build utils))
 
          (let ((inputs
-                '#$(append (list qemu parted grub e2fsprogs)
+                '#$(append (list qemu parted e2fsprogs)
                            (map canonical-package
                                 (list sed grep coreutils findutils gawk))
                            (if register-closures? (list guix) '())))
@@ -223,7 +225,7 @@ the image."
                                #:closures graphs
                                #:copy-closures? #$copy-inputs?
                                #:register-closures? #$register-closures?
-                               #:system-directory #$os-derivation))
+                               #:system-directory #$os-drv))
                   (partitions (list (partition
                                      (size #$(- disk-image-size
                                                 (* 10 (expt 2 20))))
@@ -233,7 +235,13 @@ the image."
                                      (initializer initialize)))))
              (initialize-hard-disk "/dev/vda"
                                    #:partitions partitions
-                                   #:grub.cfg #$grub-configuration)
+                                   #:bootloader-package
+                                   #$(bootloader-package bootloader)
+                                   #:bootcfg #$bootcfg-drv
+                                   #:bootcfg-location
+                                   #$(bootloader-configuration-file bootloader)
+                                   #:bootloader-installer
+                                   #$(bootloader-installer bootloader))
              (reboot)))))
    #:system system
    #:make-disk-image? #t
@@ -287,8 +295,10 @@ to USB sticks meant to be read-only."
     (mlet* %store-monad ((os-drv   (operating-system-derivation os))
                          (bootcfg  (operating-system-bootcfg os)))
       (qemu-image #:name name
-                  #:os-derivation os-drv
-                  #:grub-configuration bootcfg
+                  #:os-drv os-drv
+                  #:bootcfg-drv bootcfg
+                  #:bootloader (bootloader-configuration-bootloader
+                                (operating-system-bootloader os))
                   #:disk-image-size disk-image-size
                   #:disk-image-format "raw"
                   #:file-system-type file-system-type
@@ -330,8 +340,10 @@ of the GNU system as described by OS."
     (mlet* %store-monad
         ((os-drv      (operating-system-derivation os))
          (bootcfg     (operating-system-bootcfg os)))
-      (qemu-image  #:os-derivation os-drv
-                   #:grub-configuration bootcfg
+      (qemu-image  #:os-drv os-drv
+                   #:bootcfg-drv bootcfg
+                   #:bootloader (bootloader-configuration-bootloader
+                                 (operating-system-bootloader os))
                    #:disk-image-size disk-image-size
                    #:file-system-type file-system-type
                    #:inputs `(("system" ,os-drv)
@@ -429,8 +441,10 @@ bootloader refers to: OS kernel, initrd, bootloader data, etc."
     ;; BOOTCFG and all its dependencies, including the output of OS-DRV.
     ;; This is more than needed (we only need the kernel, initrd, GRUB for its
     ;; font, and the background image), but it's hard to filter that.
-    (qemu-image #:os-derivation os-drv
-                #:grub-configuration bootcfg
+    (qemu-image #:os-drv os-drv
+                #:bootcfg-drv bootcfg
+                #:bootloader (bootloader-configuration-bootloader
+                              (operating-system-bootloader os))
                 #:disk-image-size disk-image-size
                 #:inputs (if full-boot?
                              `(("bootcfg" ,bootcfg))