GNU bug report logs - #30311
efi-less grub install fails

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: Ricardo Wurmus <ricardo.wurmus@HIDDEN>; dated Wed, 31 Jan 2018 18:57:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 21:43:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 20 16:43:25 2018
Received: from localhost ([127.0.0.1]:53345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eoFh7-0003Kb-N7
	for submit <at> debbugs.gnu.org; Tue, 20 Feb 2018 16:43:25 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:60922)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1eoFh5-0003KQ-NG
 for 30311 <at> debbugs.gnu.org; Tue, 20 Feb 2018 16:43:24 -0500
Received: from localhost (77.118.162.106.wireless.dyn.drei.com
 [77.118.162.106])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 86797336024E;
 Tue, 20 Feb 2018 22:43:21 +0100 (CET)
Date: Tue, 20 Feb 2018 22:43:17 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
Message-ID: <20180220224317.36920bcb@HIDDEN>
In-Reply-To: <87o9kjqqzw.fsf@HIDDEN>
References: <87tvuel15z.fsf@HIDDEN>
 <20180218174922.47f656a7@HIDDEN>
 <87o9kjqqzw.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: Mark H Weaver <mhw@HIDDEN>,
 Ricardo Wurmus <ricardo.wurmus@HIDDEN>, 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> I don=E2=80=99t understand this patch.  How does it work?
>=20
> What is the effect of replacing /sys/firmware/efi with
> /sys/firmware/non-efi?

It won't find EFI since it's looking in the wrong place.

That's what we want :)




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 21:41:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 20 16:41:19 2018
Received: from localhost ([127.0.0.1]:53341 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eoFf5-0003Ha-9R
	for submit <at> debbugs.gnu.org; Tue, 20 Feb 2018 16:41:19 -0500
Received: from sender-of-o51.zoho.com ([135.84.80.216]:21002)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1eoFf3-0003HT-Nm
 for 30311 <at> debbugs.gnu.org; Tue, 20 Feb 2018 16:41:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1519162838; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID;
 l=613; bh=Jc739xCtXy14eHXrYlE+3wvbhcdPe0lr1vVMAQJjl0w=;
 b=LDUGX/2h6/hoG6TUXz/3TuJf1UlS5deiN7i3QnVAd1Wj1X3sngJx41zeN9TECtUM
 pUNlQJWMpDq3aWIpOKMgCEAhYe1U81qZBEi1ECuwfLdu9WZ4Ii64aZ5f0J5OfIf6BUg
 /60Q+k50AgOdn2AJAqrKcte5nxZgiQY3bElZYKgE=
Received: from localhost (port-92-200-79-227.dynamic.qsc.de [92.200.79.227])
 by mx.zohomail.com with SMTPS id 1519162838637959.2155728417194;
 Tue, 20 Feb 2018 13:40:38 -0800 (PST)
References: <87tvuel15z.fsf@HIDDEN>
 <20180218174922.47f656a7@HIDDEN>
User-agent: mu4e 1.0; emacs 25.3.1
From: Ricardo Wurmus <rekado@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
In-reply-to: <20180218174922.47f656a7@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Tue, 20 Feb 2018 22:40:35 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Message-ID: <87o9kjqqzw.fsf@HIDDEN>
X-ZohoMailClient: External
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 30311
Cc: Mark H Weaver <mhw@HIDDEN>,
 Ricardo Wurmus <ricardo.wurmus@HIDDEN>, 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


Hi Danny,

>> This change breaks my mips64el-linux GuixSD system, which is supported
>> by GRUB, but where "--target=3Di386-pc" is obviously not appropriate.  O=
n
>> my system I need a different 'target' setting.
>
> A pretty safe workaround is to substitute /sys/firmware/efi by /sys/firmw=
are/non-efi
> in ./grub-core/osdep/linux/platform.c for non-efi grub.

I don=E2=80=99t understand this patch.  How does it work?

What is the effect of replacing /sys/firmware/efi with
/sys/firmware/non-efi?

--=20
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net






Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 21:00:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 20 16:00:18 2018
Received: from localhost ([127.0.0.1]:53283 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eoF1O-0002H5-Hs
	for submit <at> debbugs.gnu.org; Tue, 20 Feb 2018 16:00:18 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:57790)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1eoF1N-0002Gy-2I
 for 30311 <at> debbugs.gnu.org; Tue, 20 Feb 2018 16:00:17 -0500
Received: from localhost (77.118.162.106.wireless.dyn.drei.com
 [77.118.162.106])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 8AF67336024E;
 Tue, 20 Feb 2018 22:00:15 +0100 (CET)
Date: Tue, 20 Feb 2018 22:00:11 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: Marius Bakke <mbakke@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
Message-ID: <20180220220011.737ee227@HIDDEN>
In-Reply-To: <87606scohd.fsf@HIDDEN>
References: <idjmv0t503l.fsf@HIDDEN>
 <87tvuel15z.fsf@HIDDEN> <878tbocpm2.fsf@HIDDEN>
 <87606scohd.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: Mark H Weaver <mhw@HIDDEN>,
 Ricardo Wurmus <ricardo.wurmus@HIDDEN>, 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Also, grub-hybrid is supposed to use efi so the workaround shouldn't be used with it...

What do you think about my direct grub patch?




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 20:54:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 20 15:54:31 2018
Received: from localhost ([127.0.0.1]:53275 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eoEvm-00027S-7B
	for submit <at> debbugs.gnu.org; Tue, 20 Feb 2018 15:54:31 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:57292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1eoEvk-00027L-Ro
 for 30311 <at> debbugs.gnu.org; Tue, 20 Feb 2018 15:54:29 -0500
Received: from localhost (77.118.162.106.wireless.dyn.drei.com
 [77.118.162.106])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 3A5B23360302;
 Tue, 20 Feb 2018 21:54:27 +0100 (CET)
Date: Tue, 20 Feb 2018 21:54:20 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: Marius Bakke <mbakke@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
Message-ID: <20180220215420.072269e6@HIDDEN>
In-Reply-To: <87606scohd.fsf@HIDDEN>
References: <idjmv0t503l.fsf@HIDDEN>
 <87tvuel15z.fsf@HIDDEN> <878tbocpm2.fsf@HIDDEN>
 <87606scohd.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: Mark H Weaver <mhw@HIDDEN>,
 Ricardo Wurmus <ricardo.wurmus@HIDDEN>, 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi Marius,

hmm, if the conditional doesn't have an alternative case, doesn't that mean that the
value is unspecified?  The list constructor doesn't like that...

You probably meant '()

Other than that, I agree that something like this patch is the low-risk workaround
to do.




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 03:46:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 19 22:46:27 2018
Received: from localhost ([127.0.0.1]:51977 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1enyst-0007Vk-27
	for submit <at> debbugs.gnu.org; Mon, 19 Feb 2018 22:46:27 -0500
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43599)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbakke@HIDDEN>) id 1enysr-0007Vc-6A
 for 30311 <at> debbugs.gnu.org; Mon, 19 Feb 2018 22:46:25 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id CD98C20FE3;
 Mon, 19 Feb 2018 22:46:24 -0500 (EST)
Received: from frontend1 ([10.202.2.160])
 by compute5.internal (MEProxy); Mon, 19 Feb 2018 22:46:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
 cc:content-type:date:from:in-reply-to:message-id:mime-version
 :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=K7H+X35IabDv5g6Tgo1hHbCB4Qvx4Bhw5ODbNn1uG7g=; b=uRFOaElU
 Erth1Ti6v/955za+ATaImWPyFIX0+EbXLEquNzAYmAEAFJGduj/LCUrQxqyCkqyz
 Zeu954eoqfVXvq1pJqwEJqGXbs3Zrm8Z5/Wer9PqYcVqSlX1S3bWi7w3qB7HE97y
 HRpVGySfdNVsuBzDiFHlVjGpxQvnzD4F+aAjmf80gZde4Rj1fhb8JtmoUCYKvQIW
 WGJ7GjrmA575aCLV6s3WqFX7+nctqsinpEYxIfaXA9NiqX2fQFHyVuJ2K6U1RUrg
 DUWpixZpuGdfnQlwt2OBp7giyl1QXOu66BOcsKC2VxDC+XzeQAMJjCHEe80UWyjU
 M4PYY0rRmadUQQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=K7H+X35IabDv5g6Tgo1hHbCB4Qvx4
 Bhw5ODbNn1uG7g=; b=YRkt8zfCyeDRXaZXVvYx+uuE6/7iPJ5Vhr5ZAdIhuuCEU
 uxZ488DBL4/KmugMVlKBOLqfdIrBj0dNEd0nUTGd2BgXhV0zBym0uxKaM2njfYuW
 MynmweVAFkhy8+is4EupO6gT5N+dejKbALMNhX61dnj7n1o/ZP6oHLxN9m/QpJJQ
 jd6ARgFcMBx/I3hi/XhNH/76T5z12aa0qcHpkisoOrHzYgMwH7Bpymbh80/u64IB
 ym0MtYrr5IVRxrJcuUk9C1tvYWELG+WryDYfPBDUmeIcOjXPeUfacaN7GxpKOfY2
 xDoRngquUp13g9KCFu0BfjISHjKv67A7U0QIBMdtw==
X-ME-Sender: <xms:EJqLWtd-EdTkbnhPSvef83nzU3a19RC3nYG5NwHQvLXCM_fZg9ZMQw>
Received: from localhost (cm-84.211.227.176.getinternet.no [84.211.227.176])
 by mail.messagingengine.com (Postfix) with ESMTPA id 5B24A7E1D0;
 Mon, 19 Feb 2018 22:46:24 -0500 (EST)
From: Marius Bakke <mbakke@HIDDEN>
To: Mark H Weaver <mhw@HIDDEN>, 30311 <at> debbugs.gnu.org
Subject: Re: bug#30311: efi-less grub install fails
In-Reply-To: <878tbocpm2.fsf@HIDDEN>
References: <idjmv0t503l.fsf@HIDDEN>
 <87tvuel15z.fsf@HIDDEN> <878tbocpm2.fsf@HIDDEN>
User-Agent: Notmuch/0.26 (https://notmuchmail.org) Emacs/25.3.1
 (x86_64-pc-linux-gnu)
Date: Tue, 20 Feb 2018 04:46:22 +0100
Message-ID: <87606scohd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: Ricardo Wurmus <ricardo.wurmus@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Marius Bakke <mbakke@HIDDEN> writes:

> Mark H Weaver <mhw@HIDDEN> writes:
>
>> Hi Ricardo,
>>
>> Ricardo Wurmus <ricardo.wurmus@HIDDEN> writes:
>>> Okay, I=E2=80=99ve added =E2=80=9C--target=3Di386-pc=E2=80=9D to the li=
st of arguments.
>>
>> This change breaks my mips64el-linux GuixSD system, which is supported
>> by GRUB, but where "--target=3Di386-pc" is obviously not appropriate.  On
>> my system I need a different 'target' setting.
>
> Maybe we can make it conditional on EFI for now.  Ricardo, are you able
> to test the attached patch?  I suspect we might get problems on POWER
> and some ARM systems down the road, but it should at least fix this
> immediate issue.
>
> Note: I haven't tested this patch myself.

Bah, here is a fixed version that actually works (for the normal case).


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-gnu-Pass-target-to-EFI-less-GRUB-only-when-EFI-varia.patch
Content-Transfer-Encoding: quoted-printable

From=20968ccb27e40ce683ec469f3ac7973827a7e8ddf5 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@HIDDEN>
Date: Tue, 20 Feb 2018 04:02:23 +0100
Subject: [PATCH] gnu: Pass "--target" to EFI-less GRUB only when EFI variab=
les
 are present.

Fixes <https://bugs.gnu.org/30311>.

* gnu/bootloader/grub.scm (install-grub): Make "--target" argument
conditional on the presence of "/sys/firmware/efi".
=2D--
 gnu/bootloader/grub.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 3b01125c7..17ded5f6d 100644
=2D-- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -386,9 +386,15 @@ submenu \"GNU system, old configurations...\" {~%")
         ;; root partition.
         (setenv "GRUB_ENABLE_CRYPTODISK" "y")
=20
=2D        (unless (zero? (system* grub "--no-floppy" "--target=3Di386-pc"
=2D                                "--boot-directory" install-dir
=2D                                device))
+        (unless (zero? (apply system* grub
+                              (list "--no-floppy"
+                                    "--boot-directory" install-dir
+                                    ;; Explicitly pass target if the non-E=
FI
+                                    ;; GRUB is requested on an EFI system.
+                                    ;; See <https://bugs.gnu.org/30311>.
+                                    #$@(if (file-exists? "/sys/firmware/ef=
i")
+                                           '("--target=3Di386-pc"))
+                                    device)))
           (error "failed to install GRUB (BIOS)")))))
=20
 (define install-grub-efi
=2D-=20
2.16.2


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlqLmg4ACgkQoqBt8qM6
VPorfwf+I0dEVp0xpxREgpi5NA6BGVafqm35tu4lMfRuACa+GiNo/JkY7YsRSrfJ
V0KONQlRHnq2ts9kjnA4EukAvtUvXdixNX0anHbNTRHXvCYIJzbjHM54VIe/Ws3O
lI2YsshsZFcMZnNDOIYXCixLfA+1f315kwqjeOW+NG7PzIhDUeTG/CvOobVVTv+h
n92gk0Ru3c7c4asL0gAKw8LZ3BWKNObOJuTqdFE5Xl186AC5pPakiXqgDpZHTExw
F6OhgHQPX/3O5/qBqqUOrqBgwKQKXVS+qlMDj9l4tLNuMdCrywuFmWp+PVg9AGE/
nCeOjHXuPOQ3bLmcd4LE9cj9G47wfg==
=yG6e
-----END PGP SIGNATURE-----
--==-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 03:22:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 19 22:22:02 2018
Received: from localhost ([127.0.0.1]:51965 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1enyVG-0006vQ-Jm
	for submit <at> debbugs.gnu.org; Mon, 19 Feb 2018 22:22:02 -0500
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:37007)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbakke@HIDDEN>) id 1enyVE-0006v1-3a
 for 30311 <at> debbugs.gnu.org; Mon, 19 Feb 2018 22:22:00 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id 8AC5120FAC;
 Mon, 19 Feb 2018 22:21:59 -0500 (EST)
Received: from frontend1 ([10.202.2.160])
 by compute5.internal (MEProxy); Mon, 19 Feb 2018 22:21:59 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
 cc:content-type:date:from:in-reply-to:message-id:mime-version
 :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=rt5ZSrM1dTFgcgIdourNCcmPZxM/+zzSsYhgowvmD3o=; b=MSYgfuM6
 B8cY4k6SKgfWe2dGPGdNJi4N1L8O8Lo5GiC3oiD9vAl0Wyt7LGWwTrqSkQ2vfQR1
 NAtcQdWBoDtw2rZCOHy6M1345Y/YKPJg6fd9GwbiEgxEV4/BO8Nk3mJnuqU+UsDT
 vMMbol3v1Lj8vGVkY0eJhAsWwdNfN0K/v/Tu5oWPF0uWMYgJU38omJ9aG4Nh6CXL
 R93ITBVsC2Q4cs3mwGj66JyQ5YLniYjk5Tu0yf4qI1X71Vborm5luBQPycx2sz++
 KYnJ+Q7Fr+qXjh7iqquMjiZgausRs3qC9r6lemVu+Fe/ijbyo69I6sxTXJWBuU+/
 lBrqpyccv/G0Vw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=rt5ZSrM1dTFgcgIdourNCcmPZxM/+
 zzSsYhgowvmD3o=; b=UI2LC3fGLt3RwXnPjLFTOMSaeDOEOysLX0/43zgsENkxH
 uTaha8G7fu+boqCtsf8eaNZLTAValm4nNUHL40Rc0MvHmcorqAZ/yiqHhJYfrvnB
 eZ/1F6W6BSDBCIkoW9/3y6jwDWorS84QGZ4GE8VZCP0biolrJ83BQEP1rPuAqinH
 RXuKZZ6bYZS6ROFi9+wCRttzblnw/wSEpRvVm4f4qsTj6brDwZN1DUDqv72T2+EP
 GA3I29EAivQ3T4I9wIvx8F+FazMoF9ES3XIcHgr30hqX2dOB2PQCXM47LMliUY6f
 LH9XbSmJOmG03oPgDsSgHd/uj6kEwsB0Ly4tIVfNA==
X-ME-Sender: <xms:V5SLWrH50gZihqJG8fJ8TTbYhzkUDTKE1lVgT4qZz_2xphH5qerRSQ>
Received: from localhost (cm-84.211.227.176.getinternet.no [84.211.227.176])
 by mail.messagingengine.com (Postfix) with ESMTPA id 158F77E1A4;
 Mon, 19 Feb 2018 22:21:58 -0500 (EST)
From: Marius Bakke <mbakke@HIDDEN>
To: Mark H Weaver <mhw@HIDDEN>, 30311 <at> debbugs.gnu.org
Subject: Re: bug#30311: efi-less grub install fails
In-Reply-To: <87tvuel15z.fsf@HIDDEN>
References: <idjmv0t503l.fsf@HIDDEN>
 <87tvuel15z.fsf@HIDDEN>
User-Agent: Notmuch/0.26 (https://notmuchmail.org) Emacs/25.3.1
 (x86_64-pc-linux-gnu)
Date: Tue, 20 Feb 2018 04:21:57 +0100
Message-ID: <878tbocpm2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: Ricardo Wurmus <ricardo.wurmus@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Mark H Weaver <mhw@HIDDEN> writes:

> Hi Ricardo,
>
> Ricardo Wurmus <ricardo.wurmus@HIDDEN> writes:
>> Okay, I=E2=80=99ve added =E2=80=9C--target=3Di386-pc=E2=80=9D to the lis=
t of arguments.
>
> This change breaks my mips64el-linux GuixSD system, which is supported
> by GRUB, but where "--target=3Di386-pc" is obviously not appropriate.  On
> my system I need a different 'target' setting.

Maybe we can make it conditional on EFI for now.  Ricardo, are you able
to test the attached patch?  I suspect we might get problems on POWER
and some ARM systems down the road, but it should at least fix this
immediate issue.

Note: I haven't tested this patch myself.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-gnu-Pass-target-to-EFI-less-GRUB-only-when-EFI-varia.patch
Content-Transfer-Encoding: quoted-printable

From=20ce5d6089aff0cf6c31260ac2bbe0aeb2803eb8a0 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@HIDDEN>
Date: Tue, 20 Feb 2018 04:02:23 +0100
Subject: [PATCH] gnu: Pass "--target" to EFI-less GRUB only when EFI variab=
les
 are present.

Fixes <https://bugs.gnu.org/30311>.

* gnu/bootloader/grub.scm (install-grub): Make "--target" argument
conditional on the presence of "/sys/firmware/efi".
=2D--
 gnu/bootloader/grub.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 3b01125c7..2b8458161 100644
=2D-- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -386,8 +386,13 @@ submenu \"GNU system, old configurations...\" {~%")
         ;; root partition.
         (setenv "GRUB_ENABLE_CRYPTODISK" "y")
=20
=2D        (unless (zero? (system* grub "--no-floppy" "--target=3Di386-pc"
+        (unless (zero? (system* grub "--no-floppy"
                                 "--boot-directory" install-dir
+                                ;; Explicitly pass target if the non-EFI
+                                ;; GRUB is requested on an EFI system.
+                                ;; See <https://bugs.gnu.org/30311>.
+                                ,@(if (file-exists? "/sys/firmware/efi")
+                                      "--target=3Di386-pc")
                                 device))
           (error "failed to install GRUB (BIOS)")))))
=20
=2D-=20
2.16.2


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlqLlFUACgkQoqBt8qM6
VPr4tgf/USpnc+DLJxUw12BYHs8BJhh3hX7I37pcNa+w8+wm1oD7WjjpJ6MGV5vB
pp2J3l21xlvss9gkOraxtzw4UA15D2KvfyB76E2y4e6ez5QA3xr9/d0Ske0guqQd
pu2Kdr0nEP7o5uLIU3Hyzu+G3wNUZQpipMJ8Q3UxaQU6jeFiGlJo8A+Mf9mi7/U4
oKgqFQk3rBFHQNnH53cuMNLkQ/9HTlt7Wk5liUIPWalwdgq75g9eWW6/QGCYRtoK
tkVn8qy4tV6ANXTtCmLWvGG+HmVe312Uf6mB8a9m6x1DSmVK9+O4sn6pflrWgb6X
Fxh5kMabo3I1EJRv08tzkBHZRg63ow==
=ozrx
-----END PGP SIGNATURE-----
--==-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 18 Feb 2018 16:49:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 18 11:49:38 2018
Received: from localhost ([127.0.0.1]:49993 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1enS9h-0006ra-RC
	for submit <at> debbugs.gnu.org; Sun, 18 Feb 2018 11:49:38 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:33608)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1enS9f-0006rR-N3
 for 30311 <at> debbugs.gnu.org; Sun, 18 Feb 2018 11:49:36 -0500
Received: from localhost (178.113.229.194.wireless.dyn.drei.com
 [178.113.229.194])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 1142033607C2;
 Sun, 18 Feb 2018 17:49:33 +0100 (CET)
Date: Sun, 18 Feb 2018 17:49:22 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: Mark H Weaver <mhw@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
Message-ID: <20180218174922.47f656a7@HIDDEN>
In-Reply-To: <87tvuel15z.fsf@HIDDEN>
References: <87tvuel15z.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="MP_/qRq7Jxya59VD8z+37o+T5hJ"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: Ricardo Wurmus <ricardo.wurmus@HIDDEN>, 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--MP_/qRq7Jxya59VD8z+37o+T5hJ
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi Mark,

> This change breaks my mips64el-linux GuixSD system, which is supported
> by GRUB, but where "--target=i386-pc" is obviously not appropriate.  On
> my system I need a different 'target' setting.

A pretty safe workaround is to substitute /sys/firmware/efi by /sys/firmware/non-efi
in ./grub-core/osdep/linux/platform.c for non-efi grub.

See attachment...

> In the rare cases where GRUB fails to detect the target, perhaps we
> could provide a way to specify an explicit GRUB 'target' in the grub
> configuration?

I still think that upstream should fix this bug.  It's silly that we have to
massage grub to not select a target which grub wasn't compiled for - we
patch/configure one part of grub so another part of grub isn't confused.

It's the same package :P

Bootloader configuration is complicated enough already.  In this case I'd rather
grub did the right thing automatically.

--MP_/qRq7Jxya59VD8z+37o+T5hJ
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=0001-gnu-grub-Make-sure-that-non-EFI-grub-doesn-t-try-to-.patch

From 263b1dc0de9643094bc41f4be47b4b2317e95d7c Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@HIDDEN>
Date: Sun, 18 Feb 2018 17:30:48 +0100
Subject: [FIXME] gnu: grub: Make sure that non-EFI grub doesn't try to use
 EFI.
Tags: patch

* gnu/packages/bootloader.scm (grub)[arguments]<:phases>
[patch-/sys/firmware/efi-out]: New phase.
(grub-efi)[arguments]<:phases>[patch-/sys/firmware/efi-out]: Delete phase.

Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30311>.
---
 gnu/packages/bootloaders.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 59eb22f24..c09829e17 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -103,6 +103,11 @@
                      (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz")
                      (system* "gunzip" "unifont.bdf.gz")
                      #t))
+                  (add-after 'unpack 'patch-/sys/firmware/efi-out
+                   (lambda _
+                     (substitute* "grub-core/osdep/linux/platform.c"
+                      (("/sys/firmware/efi") "/sys/firmware/non-efi"))
+                     #t))
                   (add-before 'check 'disable-flaky-test
                     (lambda _
                       ;; This test is unreliable. For more information, see:
@@ -177,6 +182,7 @@ menu to select one of the installed operating systems.")
             `(cons "--with-platform=efi" ,flags))
            ((#:phases phases)
             `(modify-phases ,phases
+               (delete 'patch-/sys/firmware/efi-out)
                (add-after 'patch-stuff 'use-absolute-efibootmgr-path
                  (lambda* (#:key inputs #:allow-other-keys)
                    (substitute* "grub-core/osdep/unix/platform.c"

--MP_/qRq7Jxya59VD8z+37o+T5hJ--




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 18 Feb 2018 16:21:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 18 11:21:20 2018
Received: from localhost ([127.0.0.1]:49937 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1enRiJ-0004DZ-PU
	for submit <at> debbugs.gnu.org; Sun, 18 Feb 2018 11:21:19 -0500
Received: from world.peace.net ([50.252.239.5]:49554)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mhw@HIDDEN>)
 id 1enRiI-0004DI-7q; Sun, 18 Feb 2018 11:21:18 -0500
Received: from pool-72-93-27-42.bstnma.east.verizon.net ([72.93.27.42]
 helo=yeeloong)
 by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <mhw@HIDDEN>)
 id 1enRiB-0003eS-JR; Sun, 18 Feb 2018 11:21:11 -0500
From: Mark H Weaver <mhw@HIDDEN>
To: 30311 <at> debbugs.gnu.org
Subject: Re: bug#30311: efi-less grub install fails
Date: Sun, 18 Feb 2018 11:20:40 -0500
Message-ID: <87tvuel15z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30311
Cc: Danny Milosavljevic <dannym@HIDDEN>,
 Ricardo Wurmus <ricardo.wurmus@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

reopen 30311
thanks

Hi Ricardo,

Ricardo Wurmus <ricardo.wurmus@HIDDEN> writes:
> Okay, I=E2=80=99ve added =E2=80=9C--target=3Di386-pc=E2=80=9D to the list=
 of arguments.

This change breaks my mips64el-linux GuixSD system, which is supported
by GRUB, but where "--target=3Di386-pc" is obviously not appropriate.  On
my system I need a different 'target' setting.

It would be great if we could find another solution to this issue.
GRUB's automatic target selection seems to work on most systems, since
we've been relying on it for a long time without anyone reporting
problems until this bug report.

In the rare cases where GRUB fails to detect the target, perhaps we
could provide a way to specify an explicit GRUB 'target' in the grub
configuration?  What do you think?

      Mark




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311-done <at> debbugs.gnu.org:


Received: (at 30311-done) by debbugs.gnu.org; 18 Feb 2018 11:28:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 18 06:28:33 2018
Received: from localhost ([127.0.0.1]:48960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1enN8z-0005lL-GX
	for submit <at> debbugs.gnu.org; Sun, 18 Feb 2018 06:28:33 -0500
Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:42970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <Ricardo.Wurmus@HIDDEN>) id 1enN8x-0005lC-6X
 for 30311-done <at> debbugs.gnu.org; Sun, 18 Feb 2018 06:28:32 -0500
Received: from localhost (localhost [127.0.0.1])
 by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 150CC787ABC;
 Sun, 18 Feb 2018 12:28:30 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mdc-berlin.de; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:in-reply-to:subject:subject:from:from
 :user-agent:references:received:received:received:received; s=
 mdc; t=1518953304; x=1520767705; bh=8CwqyfyjHRl9IjiHvvepE0guFDk8
 HOhOXMsZS4YaMZo=; b=L264ph4siQHJ+GqnLe3MIii0uxOe+YLQFL5sXXFvHAJc
 WQQPlERsW9e7dzrCW6AbUO1Yir0LzTXfec96DGOxMeDZj+zA3G6VhkO32T41veIj
 uYKCzUtiwfH4AK3gLbyviTxtnqkIqAOcOALdko08XcYMSvqf0p0aVW2/sqZUIj8=
X-Virus-Scanned: amavisd-new at mdc-berlin.de
Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1])
 by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id rJF0hLDpYQmC; Sun, 18 Feb 2018 12:28:24 +0100 (CET)
Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTPS;
 Sun, 18 Feb 2018 12:28:24 +0100 (CET)
Received: from SW-IT-P-CAS2.mdc-berlin.net (141.80.113.54) by
 HTCAONE.mdc-berlin.net (141.80.180.120) with Microsoft SMTP Server (TLS) id
 14.3.361.1; Sun, 18 Feb 2018 12:28:24 +0100
Received: from localhost (141.80.113.51) by SW-IT-P-CAS2.mdc-berlin.net
 (141.80.113.54) with Microsoft SMTP Server id 14.3.361.1; Sun, 18 Feb 2018
 12:28:23 +0100
References: <idjmv0t503l.fsf@HIDDEN>
 <20180201003414.4a535dec@HIDDEN> <87inbgq3wp.fsf@HIDDEN>
User-agent: mu4e 1.0-alpha3; emacs 25.3.1
From: Ricardo Wurmus <ricardo.wurmus@HIDDEN>
To: Marius Bakke <mbakke@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
In-Reply-To: <87inbgq3wp.fsf@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Sun, 18 Feb 2018 12:28:13 +0100
Message-ID: <87371yy1te.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-Originating-IP: [141.80.113.51]
X-TM-AS-Product-Ver: SMEX-11.0.0.4283-8.200.1013-23670.006
X-TM-AS-Result: No--11.097400-0.000000-31
X-TM-AS-MatchedID: 150567-703731-139010-700075-707788-701674-186035-708712-7
 00752-701753-706060-703096-105700-704578-701618-708855-709185-704689-709584
 -700693-702609-707909-701640-701461-705974-702050-701837-700107-148004-1481
 33-20043-42000-42003-63
X-TM-AS-User-Approved-Sender: Yes
X-TM-AS-User-Blocked-Sender: No
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 30311-done
Cc: Danny Milosavljevic <dannym@HIDDEN>, 30311-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)


Marius Bakke <mbakke@HIDDEN> writes:

> Danny Milosavljevic <dannym@HIDDEN> writes:
>
>> Hi Ricardo,
>>
>> On Wed, 31 Jan 2018 19:55:58 +0100
>> Ricardo Wurmus <ricardo.wurmus@HIDDEN> wrote:
>>
>>> “guix system init” fails with a configuration file that specifies
>>> grub-bootloader (not grub-efi-bootloader).
>>> 
>>> “grub-install” reports an error about “lib/grub/x86_64-efi/modinfo.sh”
>>> not being available.  It suggests passing “--target” or “--device”.
>>> 
>>> Our invocation of grub-install does not include a “--target” argument.
>>> Only after I edited it to pass “--target=i386-pc” did “guix system init”
>>> pass.
>>
>> Hmm, I wonder what happened here.
>>
>> We've been very careful to keep grub and grub-efi separate.
>>
>> The entire directory lib/grub/x86_64-efi shouldn't be available in the
>> "grub" package output - and I checked on master, it isn't.  Good.
>>
>> So that leaves automatic target selection as the culprit.
>>
>> And indeed, there's a call to grub_install_get_default_x86_platform
>> in util/grub-install.c .  And that checks for availability of
>> /sys/firmware/efi and if it exists, defaults to EFI.
>>
>> I think it's a bug in grub to do that for a grub which doesn't have EFI
>> platform support. :P
>>
>> We could just always pass i386-pc in install-grub for i386, but then
>> we lose i386-ieee1275 (which I have never heard anyone using so maybe
>> not so bad).
>
> I agree, passing --target seems like the best workaround for this GRUB
> bug.

Okay, I’ve added “--target=i386-pc” to the list of arguments.

Thanks for the comments.

-- 
Ricardo




Notification sent to Ricardo Wurmus <ricardo.wurmus@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ricardo Wurmus <ricardo.wurmus@HIDDEN>:
You have taken responsibility. Full text available.
Severity set to 'important' from 'normal' Request was from ludo@HIDDEN (Ludovic Courtès) to control <at> debbugs.gnu.org. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 1 Feb 2018 12:40:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 01 07:40:27 2018
Received: from localhost ([127.0.0.1]:51862 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ehEAF-0002hZ-A4
	for submit <at> debbugs.gnu.org; Thu, 01 Feb 2018 07:40:27 -0500
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37663)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mbakke@HIDDEN>) id 1ehEAC-0002hR-Vq
 for 30311 <at> debbugs.gnu.org; Thu, 01 Feb 2018 07:40:25 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id 333C620E35;
 Thu,  1 Feb 2018 07:40:24 -0500 (EST)
Received: from frontend1 ([10.202.2.160])
 by compute5.internal (MEProxy); Thu, 01 Feb 2018 07:40:24 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h=
 cc:content-type:date:from:in-reply-to:message-id:mime-version
 :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=1Nah4JzpgswghSI5HysNmlwgNQjLXPsdndsgStLNeBg=; b=a9S9+lEQ
 tvYmyYA+3u+X1vz52uzE4euQN6+A7xGElIGSlq2Tw5sgiuK0sylBJmxdEDfrPDcP
 YnZVLjSqM6sQAs2HR08QyQHhk79hse/2/3WzSAZubrhWz6aV7lFRJB2y1WAv2q4g
 7CCXLu4aAuDp6rwC/CYQ9ZuHWSyTem14MYHUpX1TGWzigAWObnSPCrfwMHWM2LwO
 mfJ3n9I32iN6+9ng7rLnbUf6td/MGDyhRtMhWdI0dNWCOuHOJhKPPMDtaqpo5RPB
 u6DSaX43mbdkwA0QYjKGOds1JVKVyKnmJS7GgDcUxjeC/r7IVNVAN7DSeO6V4YXl
 HnOkqXfhTw6XJQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm1; bh=1Nah4JzpgswghSI5HysNmlwgNQjLX
 PsdndsgStLNeBg=; b=W/u3hdaDWLhjqwHTArl5aqUgiWKkUkFh9YMVH9bqpEW8I
 9DHwNwANcalZpjn1REKmyWEJ64/fp9PmVcYYJFVh7N1GajffJ30B+UtF9VphvZcH
 0WqUgbhnZNJ1ca08K6clXBBvKNWp2+YmQ5/aAzR+hXRVufniBvfHgz3Docc/QLgP
 MYXcpPCuzzw4OBQMuWng5MXs1FZS09F5qhK+WnfdyXZ1szGLaVoWQw/f4cL4/CFD
 RrWssvO55iXwn9S1it/Jd0h+UMJl5AKXQ67u2WsNN5lH0rDIzDQ46j1v00w6K7c0
 Ayi68O+1sGExICVjzECCuYgl+4RN4N/Enkyzk8awA==
X-ME-Sender: <xms:uApzWlFJ2VEoQrvruGG9QiJie4RIDPd69F5yD_IykT9Ti5ie3afC9w>
Received: from localhost (cm-84.214.173.174.getinternet.no [84.214.173.174])
 by mail.messagingengine.com (Postfix) with ESMTPA id AEE247E570;
 Thu,  1 Feb 2018 07:40:23 -0500 (EST)
From: Marius Bakke <mbakke@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>,
 Ricardo Wurmus <ricardo.wurmus@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
In-Reply-To: <20180201003414.4a535dec@HIDDEN>
References: <idjmv0t503l.fsf@HIDDEN>
 <20180201003414.4a535dec@HIDDEN>
User-Agent: Notmuch/0.26 (https://notmuchmail.org) Emacs/25.3.1
 (x86_64-pc-linux-gnu)
Date: Thu, 01 Feb 2018 13:40:22 +0100
Message-ID: <87inbgq3wp.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Danny Milosavljevic <dannym@HIDDEN> writes:

> Hi Ricardo,
>
> On Wed, 31 Jan 2018 19:55:58 +0100
> Ricardo Wurmus <ricardo.wurmus@HIDDEN> wrote:
>
>> =E2=80=9Cguix system init=E2=80=9D fails with a configuration file that =
specifies
>> grub-bootloader (not grub-efi-bootloader).
>>=20
>> =E2=80=9Cgrub-install=E2=80=9D reports an error about =E2=80=9Clib/grub/=
x86_64-efi/modinfo.sh=E2=80=9D
>> not being available.  It suggests passing =E2=80=9C--target=E2=80=9D or =
=E2=80=9C--device=E2=80=9D.
>>=20
>> Our invocation of grub-install does not include a =E2=80=9C--target=E2=
=80=9D argument.
>> Only after I edited it to pass =E2=80=9C--target=3Di386-pc=E2=80=9D did =
=E2=80=9Cguix system init=E2=80=9D
>> pass.
>
> Hmm, I wonder what happened here.
>
> We've been very careful to keep grub and grub-efi separate.
>
> The entire directory lib/grub/x86_64-efi shouldn't be available in the
> "grub" package output - and I checked on master, it isn't.  Good.
>
> So that leaves automatic target selection as the culprit.
>
> And indeed, there's a call to grub_install_get_default_x86_platform
> in util/grub-install.c .  And that checks for availability of
> /sys/firmware/efi and if it exists, defaults to EFI.
>
> I think it's a bug in grub to do that for a grub which doesn't have EFI
> platform support. :P
>
> We could just always pass i386-pc in install-grub for i386, but then
> we lose i386-ieee1275 (which I have never heard anyone using so maybe
> not so bad).

I agree, passing --target seems like the best workaround for this GRUB
bug.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlpzCrYACgkQoqBt8qM6
VPq+8gf/Y1ibK7FQhUDxpyA9k86wEW0DQi/y7S2oe6KbqQutUWi0gNtsOGGzbv5C
qydX7PAEHKkZLAWNEKBRB2ykzzN1RbmgdCZbopEam7GFPrt/+PTr0cNB8slEv9V2
63n4BZqPjPupYYSyPaZ9hksBHINBccqX3JwwtTV+WnnD9v7W5hgqPX7xnEcFE0ZK
f/7ISzRfRh1pPD6dF0mxMBH5XULruFK/F2i6C2lIDKubbf9lrYgvx00zEoZtxNrS
1I3uoIYEPcUVY2YAnO/TPQzHHkT5OACfCWYkK+/1gs5pBBDov4UncMBab3QamPQ/
0/T1JxgenCK8hWBpyW0bLo/jcU1chA==
=ULOe
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 31 Jan 2018 23:55:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 31 18:55:33 2018
Received: from localhost ([127.0.0.1]:51670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eh2E1-0007LJ-KJ
	for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 18:55:33 -0500
Received: from hera.aquilenet.fr ([185.233.100.1]:44674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1eh2E0-0007LB-1y
 for 30311 <at> debbugs.gnu.org; Wed, 31 Jan 2018 18:55:32 -0500
Received: from localhost (localhost [127.0.0.1])
 by hera.aquilenet.fr (Postfix) with ESMTP id 35ADB11C51;
 Thu,  1 Feb 2018 00:55:31 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id stgyxG8kZ9dL; Thu,  1 Feb 2018 00:55:30 +0100 (CET)
Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465])
 by hera.aquilenet.fr (Postfix) with ESMTPSA id 373AE11C2D;
 Thu,  1 Feb 2018 00:55:30 +0100 (CET)
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Ricardo Wurmus <ricardo.wurmus@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
References: <idjmv0t503l.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 13 =?utf-8?Q?Pluvi=C3=B4se?= an 226 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 01 Feb 2018 00:55:29 +0100
In-Reply-To: <idjmv0t503l.fsf@HIDDEN> (Ricardo Wurmus's
 message of "Wed, 31 Jan 2018 19:55:58 +0100")
Message-ID: <87y3kdoa6m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 30311
Cc: Danny Milosavljevic <dannym@HIDDEN>,
 Marius Bakke <mbakke@HIDDEN>, 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Heya,

Ricardo Wurmus <ricardo.wurmus@HIDDEN> skribis:

> =E2=80=9Cguix system init=E2=80=9D fails with a configuration file that s=
pecifies
> grub-bootloader (not grub-efi-bootloader).
>
> =E2=80=9Cgrub-install=E2=80=9D reports an error about =E2=80=9Clib/grub/x=
86_64-efi/modinfo.sh=E2=80=9D
> not being available.  It suggests passing =E2=80=9C--target=E2=80=9D or =
=E2=80=9C--device=E2=80=9D.
>
> Our invocation of grub-install does not include a =E2=80=9C--target=E2=80=
=9D argument.
> Only after I edited it to pass =E2=80=9C--target=3Di386-pc=E2=80=9D did =
=E2=80=9Cguix system init=E2=80=9D
> pass.
>
> This is on an x86_64 laptop where =E2=80=9Clegacy=E2=80=9D BIOS booting i=
s enabled.

To complement from what we=E2=80=99ve discussed on IRC:

  =E2=80=A2 It=E2=80=99s a UEFI laptop with legacy-BIOS enabled, but UEFI s=
till.

  =E2=80=A2 AIUI the installation image boots in UEFI mode on UEFI machines=
, and
    then =E2=80=98grub-install=E2=80=99 (probably via =E2=80=98efivar=E2=80=
=99 or /sys or similar)
    detects that it=E2=80=99s UEFI, decides that the target is thus
    =E2=80=9Cx86_64-efi=E2=80=9D, and fails because it lacks the EFI files.

I can think of two possible workarounds:

  1. Default to =E2=80=98grub-hybrid=E2=80=99.  But in that case, you=E2=80=
=99d have done a UEFI
     install unconditionally.

  2. For =E2=80=98grub-bootloader=E2=80=99 (not EFI), always pass =E2=80=98=
--target=3Di386-pc=E2=80=99.

Danny, Marius, thoughts?  :-)

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at 30311 <at> debbugs.gnu.org:


Received: (at 30311) by debbugs.gnu.org; 31 Jan 2018 23:34:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 31 18:34:22 2018
Received: from localhost ([127.0.0.1]:51661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eh1tW-0006rA-Ir
	for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 18:34:22 -0500
Received: from dd26836.kasserver.com ([85.13.145.193]:34958)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1eh1tU-0006r1-Pp
 for 30311 <at> debbugs.gnu.org; Wed, 31 Jan 2018 18:34:21 -0500
Received: from localhost (77.118.175.51.wireless.dyn.drei.com [77.118.175.51])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 704643360419;
 Thu,  1 Feb 2018 00:34:19 +0100 (CET)
Date: Thu, 1 Feb 2018 00:34:14 +0100
From: Danny Milosavljevic <dannym@HIDDEN>
To: Ricardo Wurmus <ricardo.wurmus@HIDDEN>
Subject: Re: bug#30311: efi-less grub install fails
Message-ID: <20180201003414.4a535dec@HIDDEN>
In-Reply-To: <idjmv0t503l.fsf@HIDDEN>
References: <idjmv0t503l.fsf@HIDDEN>
X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 30311
Cc: 30311 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Hi Ricardo,

On Wed, 31 Jan 2018 19:55:58 +0100
Ricardo Wurmus <ricardo.wurmus@HIDDEN> wrote:

> =E2=80=9Cguix system init=E2=80=9D fails with a configuration file that s=
pecifies
> grub-bootloader (not grub-efi-bootloader).
>=20
> =E2=80=9Cgrub-install=E2=80=9D reports an error about =E2=80=9Clib/grub/x=
86_64-efi/modinfo.sh=E2=80=9D
> not being available.  It suggests passing =E2=80=9C--target=E2=80=9D or =
=E2=80=9C--device=E2=80=9D.
>=20
> Our invocation of grub-install does not include a =E2=80=9C--target=E2=80=
=9D argument.
> Only after I edited it to pass =E2=80=9C--target=3Di386-pc=E2=80=9D did =
=E2=80=9Cguix system init=E2=80=9D
> pass.

Hmm, I wonder what happened here.

We've been very careful to keep grub and grub-efi separate.

The entire directory lib/grub/x86_64-efi shouldn't be available in the
"grub" package output - and I checked on master, it isn't.  Good.

So that leaves automatic target selection as the culprit.

And indeed, there's a call to grub_install_get_default_x86_platform
in util/grub-install.c .  And that checks for availability of
/sys/firmware/efi and if it exists, defaults to EFI.

I think it's a bug in grub to do that for a grub which doesn't have EFI
platform support. :P

We could just always pass i386-pc in install-grub for i386, but then
we lose i386-ieee1275 (which I have never heard anyone using so maybe
not so bad).

Please report a bug with grub...




Information forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Jan 2018 18:56:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 31 13:56:36 2018
Received: from localhost ([127.0.0.1]:51501 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1egxYi-00037U-5l
	for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 13:56:36 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47016)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <Ricardo.Wurmus@HIDDEN>) id 1egxYg-00037H-8E
 for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 13:56:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Ricardo.Wurmus@HIDDEN>) id 1egxYa-0001V7-B6
 for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 13:56:29 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:44508)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <Ricardo.Wurmus@HIDDEN>)
 id 1egxYa-0001Uz-88
 for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 13:56:28 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37986)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <Ricardo.Wurmus@HIDDEN>) id 1egxYZ-0001Kx-0k
 for bug-guix@HIDDEN; Wed, 31 Jan 2018 13:56:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Ricardo.Wurmus@HIDDEN>) id 1egxYV-0001RG-SQ
 for bug-guix@HIDDEN; Wed, 31 Jan 2018 13:56:27 -0500
Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:49578)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <Ricardo.Wurmus@HIDDEN>)
 id 1egxYV-0001LJ-Ib
 for bug-guix@HIDDEN; Wed, 31 Jan 2018 13:56:23 -0500
Received: from localhost (localhost [127.0.0.1])
 by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTP id BA6FC7029DD
 for <bug-guix@HIDDEN>; Wed, 31 Jan 2018 19:56:14 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mdc-berlin.de; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:subject:subject:from:from:user-agent
 :received:received:received:received; s=mdc; t=1517424969; x=
 1519239370; bh=jKawxyzePzicd60Gmv8FKa3HaafCfQMLfksnD2ihyo4=; b=g
 KNQKzBjei/K0b8+MjxCb1N+GG4kuy1+QJPgu2jbI1ltv64oqv/Ge8M6ma6NGw4/8
 0N6QHtXsk2xjQ1YncsVQFSAoR1g0xWFBUldGVJ1LYobtyxsUgKtkJzDt9VPXYmGD
 HqU05gFYJEB5KQKun8pbqQZl/r3O6dS9evumFNIVf4=
X-Virus-Scanned: amavisd-new at mdc-berlin.de
Received: from pegasus.bbbm.mdc-berlin.de ([127.0.0.1])
 by localhost (pegasus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id uJZ2mKQD_nlo for <bug-guix@HIDDEN>;
 Wed, 31 Jan 2018 19:56:09 +0100 (CET)
Received: from HTCATWO.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by pegasus.bbbm.mdc-berlin.de (Postfix) with ESMTPS
 for <bug-guix@HIDDEN>; Wed, 31 Jan 2018 19:56:09 +0100 (CET)
Received: from SW-IT-P-CAS2.mdc-berlin.net (141.80.113.54) by
 HTCATWO.mdc-berlin.net (141.80.180.190) with Microsoft SMTP Server (TLS) id
 14.3.361.1; Wed, 31 Jan 2018 19:56:09 +0100
Received: from localhost (141.80.113.51) by SW-IT-P-CAS2.mdc-berlin.net
 (141.80.113.54) with Microsoft SMTP Server id 14.3.361.1; Wed, 31 Jan 2018
 19:56:08 +0100
User-agent: mu4e 0.9.18; emacs 25.3.1
From: Ricardo Wurmus <ricardo.wurmus@HIDDEN>
To: <bug-guix@HIDDEN>
Subject: efi-less grub install fails
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Wed, 31 Jan 2018 19:55:58 +0100
Message-ID: <idjmv0t503l.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
X-Originating-IP: [141.80.113.51]
X-TM-AS-Product-Ver: SMEX-11.0.0.4283-8.200.1013-23634.001
X-TM-AS-Result: No--0.354600-0.000000-31
X-TM-AS-MatchedID: 707788-701674-186035-708712-700752-701753-700532-702931-1
 21224-148004-148133-10018-41000-42000-42003-63
X-TM-AS-User-Approved-Sender: Yes
X-TM-AS-User-Blocked-Sender: No
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

=E2=80=9Cguix system init=E2=80=9D fails with a configuration file that s=
pecifies
grub-bootloader (not grub-efi-bootloader).

=E2=80=9Cgrub-install=E2=80=9D reports an error about =E2=80=9Clib/grub/x=
86_64-efi/modinfo.sh=E2=80=9D
not being available.  It suggests passing =E2=80=9C--target=E2=80=9D or =E2=
=80=9C--device=E2=80=9D.

Our invocation of grub-install does not include a =E2=80=9C--target=E2=80=
=9D argument.
Only after I edited it to pass =E2=80=9C--target=3Di386-pc=E2=80=9D did =E2=
=80=9Cguix system init=E2=80=9D
pass.

This is on an x86_64 laptop where =E2=80=9Clegacy=E2=80=9D BIOS booting i=
s enabled.

--
Ricardo




Acknowledgement sent to Ricardo Wurmus <ricardo.wurmus@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#30311; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 20 Feb 2018 21:45:01 UTC

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