Subject: bug#21224: closed (Re: bug#21224: guix system init --no-grub doesn't work)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 02 Nov 2015 22:55:05 +0000

Your bug report

#21068: guix system init --no-grub doesn't work

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
21068: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21068
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#21224: guix system init --no-grub doesn't work
From: [email-masked] (Ludovic Courtès)
To: Mark H Weaver <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Mon, 02 Nov 2015 23:54:23 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Mark H Weaver <[email-masked]> skribis:

> 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:
>
> 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?)))

Applied in a704361, thanks!

Ludo’.

Subject: guix system init --no-grub doesn't work
From: Mark H Weaver <[email-masked]>
To: [email-masked]
Date: Sun, 09 Aug 2015 13:17:30 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

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

In the 'install' procedure in (guix scripts system), I tried changing:

  (maybe-copy grub.cfg)

to:

  (mwhen grub?
    (maybe-copy grub.cfg))

and then the command works, but almost nothing gets copied to /target.
In retrospect, this makes sense: as the comment says, the installer
works by copying the *closure* of grub.cfg.  However, it fails when
--no-grub is passed, apparently because grub.cfg was not built.

      Mark