From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#21224: guix system init --no-grub doesn't work Date: Mon, 02 Nov 2015 23:54:23 +0100 Message-ID: <87611kui5c.fsf@gnu.org> References: <87egjcqt3p.fsf@netris.org> <871tetx2pi.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtO0J-00011w-TN for bug-guix@gnu.org; Mon, 02 Nov 2015 17:55:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtO0I-000609-F6 for bug-guix@gnu.org; Mon, 02 Nov 2015 17:55:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtO0I-000601-Cp for bug-guix@gnu.org; Mon, 02 Nov 2015 17:55:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZtO0I-0005px-4C for bug-guix@gnu.org; Mon, 02 Nov 2015 17:55:06 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871tetx2pi.fsf@netris.org> (Mark H. Weaver's message of "Sun, 23 Aug 2015 14:46:33 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 21068-done@debbugs.gnu.org, 21224-done@debbugs.gnu.org Mark H Weaver 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=E2=80=99.