From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 19 22:22:02 2018 Received: (at 30311) by debbugs.gnu.org; 20 Feb 2018 03:22:03 +0000 Received: from localhost ([127.0.0.1]:51965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1enyVG-0006vQ-Jm for submit@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 ) id 1enyVE-0006v1-3a for 30311@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: 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 To: Mark H Weaver , 30311@debbugs.gnu.org Subject: Re: bug#30311: efi-less grub install fails In-Reply-To: <87tvuel15z.fsf@netris.org> References: <87tvuel15z.fsf@netris.org> 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@fastmail.com> 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 writes: > Hi Ricardo, > > Ricardo Wurmus 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 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 . * 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 . + ,@(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----- --==-=-=--