GNU bug report logs - #21224
guix system init --no-grub doesn't work

Previous Next

Package: guix;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Sun, 9 Aug 2015 17:19:02 UTC

Severity: normal

Merged with 21068

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #11 received at 21224 <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: 21224 <at> debbugs.gnu.org
Subject: Re: bug#21224: guix system init --no-grub doesn't work
Date: Sun, 23 Aug 2015 14:46:33 -0400
Mark H Weaver <mhw <at> netris.org> writes:

> I'm in the early stages of adding GuixSD for the Lemote Yeeloong, and so
> for now would like to avoid getting grub working on the Yeeloong.  So,
> I tried running "guix system init config.scm /target --no-grub", and
> this is what happens:
>
>   /gnu/store/...-system
>
>   initializing operating system under '/target'...
>   guix system: error: build failed: path `/gnu/store/...-grub.cfg' is not valid

I ran into the same problem while porting GuixSD to MIPS, before I had
GRUB working.

The problem here is that the method for copying the necessary store
items to the target directory is to copy grub.cfg and its transitive
closure, using (maybe-copy grub.cfg).

However, if --no-grub is specified, then grub.cfg is not built.

The preliminary approach I used successfully was to build and install
grub.cfg even if --no-grub is specified, although 'grub-install' is not
run in that case.  Here's the patch I used:

--8<---------------cut here---------------start------------->8---
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 45f5982..6ec1f29 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -331,8 +331,10 @@ boot directly to the kernel or to the bootloader."
                                              (if (eq? 'init action)
                                                  '()
                                                  (previous-grub-entries))))
-       (drvs   -> (if (and grub? (memq action '(init reconfigure)))
-                      (list sys grub grub.cfg)
+       (drvs   -> (if (memq action '(init reconfigure))
+                      (if grub?
+                          (list sys grub.cfg grub)
+                          (list sys grub.cfg))
                       (list sys)))
        (%         (maybe-build drvs #:dry-run? dry-run?
                                #:use-substitutes? use-substitutes?)))
--8<---------------cut here---------------end--------------->8---

      Mark




This bug report was last modified 9 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.