Jookia <[email protected]> skribis:

> When running 'guix system init', GRUB requires a GC root to be placed in
> /var/guix. When building a VM, this GC root is placed in 
> <disk>/var/guix/gcroots
> however while building a system on another drive, the GC root is placed on the
> host's /var/guix/gcroots

Indeed, good catch!

I believe this is fixed with the patch below.  Can you confirm?

Thanks,
Ludo’.

diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 9f56a96..8ebeb4d 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -128,7 +128,8 @@ TARGET, and register them."
 (define (install-grub* grub.cfg device target)
   "This is a variant of 'install-grub' with error handling, lifted in
 %STORE-MONAD"
-  (let* ((gc-root      (string-append %gc-roots-directory "/grub.cfg"))
+  (let* ((gc-root      (string-append target %gc-roots-directory
+                                      "/grub.cfg"))
          (temp-gc-root (string-append gc-root ".new"))
          (delete-file  (lift1 delete-file %store-monad))
          (make-symlink (lift2 switch-symlinks %store-monad))

Reply via email to