From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH 6/6] gnu: Add grub-efi. Date: Mon, 19 Dec 2016 23:48:44 +0100 Message-ID: <87inqfbkmr.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20161105125511.29383-1-mbakke@fastmail.com> <20161105125511.29383-7-mbakke@fastmail.com> <20161105185803.GA11667@jasmine> <87h97l67kz.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <878tsww9ov.fsf@gnu.org> <87vaw087kr.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <871syny88o.fsf@gnu.org> <87oa1r8wyv.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <871sx73ink.fsf@gnu.org> <87y3zfrd7j.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87y3zdo6cx.fsf@gnu.org> <87lgvdnw23.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87lgvc6vp0.fsf@gnu.org> <87lgvbc41t.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87fulj1uxc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJ6ji-00073D-8B for guix-devel@gnu.org; Mon, 19 Dec 2016 17:48:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJ6jf-0000DW-6a for guix-devel@gnu.org; Mon, 19 Dec 2016 17:48:50 -0500 In-Reply-To: <87fulj1uxc.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Marius Bakke skribis: > >> Ludovic Court=C3=A8s writes: >> >>> Hi Marius, >>> >>> Marius Bakke skribis: >>> >>>> Ludovic Court=C3=A8s writes: >>>> >>>>>> Relatedly, I think the way to build a 'multi-grub' is to have one >>>>>> expression for each supported grub platform, and then consolidate >>>>>> out/lib/grub from each. >>>>> >>>>> So in essence, GRUB itself supports only one platform at a time? >>>> >>>> AFAICT yes. Gentoo works around this by running the build for each >>>> user-specified platform and combining the outputs. Most other distros >>>> just carry separate grub-pc and grub-efi packages. >>>> >>>>>>> Now there are things I didn=E2=80=99t quite get. Apparently you=E2= =80=99re supposed to >>>>>>> have a /boot/efi as a vfat partition, and =E2=80=98grub-install=E2= =80=99 is supposed to >>>>>>> detect it and install the EFI stuff, or so I thought (info "(grub) >>>>>>> Installing GRUB using grub-install"). >>>>>>> >>>>>>> However, =E2=80=98grub-install=E2=80=99 still seems to be installin= g for =E2=80=9Ci386-pc=E2=80=9D >>>>>>> instead of EFI. >>>>>>> >>>>>>> What am I missing? >>>>>> >>>>>> IIRC grub-install will detect and install for the running mode (pc, = efi, >>>>>> etc). So in a classic chicken-and-egg situation, you need to be boot= ed >>>>>> with UEFI mode for grub to select the correct installation platform! >>>>> >>>>> My understanding is that it would install for UEFI if it fines >>>>> /boot/efi or if --efi-directory is passed. >>>> >>>> I'm not so sure, but it's been a while since I played around with this. >>>> At least building the 'gnu/system/install.scm' image works fine when >>>> passing --efi-directory (see the bottom two patches from >>>> https://lists.gnu.org/archive/html/guix-devel/2016-12/txtchTym4QVKr.tx= t ), >>>> and I think it would choose i386-pc even if x86_64-efi was available >>>> since the VM boots in BIOS mode. >>>> >>>> Tangentially, I'm not aware of any way to build a "hybrid" ISO image >>>> using only grub. I've started work on packaging syslinux/isolinux which >>>> is what Debian uses for their hybrid UEFI/BIOS install image. >>> >>> OK. >>> >>> Having checked GRUB=E2=80=99s configure.ac etc., I realize that my sugg= estion of >>> having one =E2=80=98grub=E2=80=99 package doing both EFI and =E2=80=9CP= C=E2=80=9D cannot work. What you >>> suggested initially (a separate =E2=80=98grub-efi=E2=80=99 package) is = the only thing we >>> can do (we could perhaps merge the lib/grub directories as you >>> suggested, but it=E2=80=99s not even clear that this would work.) >>> >>> Thus, I think we need to revert 3eee16130d858ae96510ec1c7d38d31290de2699 >>> and install your initial =E2=80=98grub-efi=E2=80=99 patch. How does th= at sound? >> >> OK. I'll try to find out why tests don't work with the UEFI variant >> first in order to at least write a meaningful comment. Maybe qemu needs >> UEFI support or something like that. > > It might be that we no longer need QEMU 1.3.1 to run the tests (see the > top of gnu/packages/grub.scm)? The problem is missing UEFI firmware for the qemu calls. But we indeed no longer need qemu@1.3.1 for the tests, at least on x86_64. I replaced it with 'qemu-minimal'. Pushed! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhYY8wACgkQoqBt8qM6 VPrYUAgAmQoXJ5txNDpf0yGVaTxzVKyRIw9st7334pBDE8Ls+nMAJ+Spmij9UOsd ix0KkcePgCrjewZ0pPe0a99bZODy0mcV5ly22uwEvXf4750Ny+YozUz2rY3Zpb9L /0pzAjY83ezrmKs7OfNea0g0006BhGoP4E60csuu87UijOECisRHocJNgXjLi+SN +/HNC/mnn+ohuuBaI8hLFnbpcqodxoEGNP6ZE/m35JfBb6TVLahdnlImvMrbI4Kw 8k0GfnpxOHo7lcEWkWHu6m2qDyY4badireT986ZRF9u/wdTZlHvx3QvIKIQ0Owxe JvcrxpbJvYekUO/Dl6XMj23zmmiDjw== =OR4a -----END PGP SIGNATURE----- --=-=-=--