From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH 6/6] gnu: Add grub-efi. Date: Tue, 20 Dec 2016 15:42:58 +0100 Message-ID: <87a8bqbr0t.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> <87inqfbkmr.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <87d1gmiu5b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJLdC-0004Cd-0y for guix-devel@gnu.org; Tue, 20 Dec 2016 09:43:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJLd7-0000JN-0q for guix-devel@gnu.org; Tue, 20 Dec 2016 09:43:06 -0500 In-Reply-To: <87d1gmiu5b.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: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Hello! > > Marius Bakke skribis: > >>>> 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! > > Great! > > I=E2=80=99m failing at installing GuixSD on a new laptop I have here. > =E2=80=98efibootmgr=E2=80=99 exits with code 2 and this message: > > EFI variables are not supported on this system. > > (which =E2=80=98grub-install=E2=80=99 happily ignores.) > > This is because /sys/firmware/efi is missing, which apparently is > because I booted off the GuixSD USB image (=E2=80=9Clegacy=E2=80=9D) and = not in EFI > mode. > > What would you suggest? :-) What I did was a normal BIOS install, backup the grub.cfg, switch laptop to UEFI (only) and boot a Debian live CD. From there "apt-get install grub-efi; grub-install /dev/sda" and afterwards copy grub.cfg in place. You may want to add "insmod efi_gop" and "insmod efi_uga" to grub.cfg, otherwise you won't get a framebuffer until the proper video driver is loaded (which may require unlocking root partition etc). Not the most user friendly installation instructions! I'm researching methods to make the base install image hybrid BIOS/UEFI. Once booted, you should apply the following two patches when reconfiguring the system. I think they are safe for BIOS systems too, but haven't done extensive testing. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhZQ3IACgkQoqBt8qM6 VPpAQwf8CKa/x6L9BHgYBJ5e03z2TZoQIaz/KWVeTdWhqGKB20RsnYNfRB3NmHbx ItV3BiCsmBhce/Fx+DKtwD7OIzENrSIRbV25OHa9BC1ygyIUbl5hGBL6MmuHqQtv +LGJJNhH90Jm3Y6giNaZK28KAPQsRIKm10Q6lm5yezdKZDRt0c4oEevZFgWgiGRO xaR6eSklXtJW5oliDB5BB/Xpn+/kfJUPdhffeSwfmRRFdOGHn9aVeRMw3SRlPoUC woniYvGjoHJZZH//FblFAmoN+0O1lmch1SZG5ZBKNtgrlYHfDjKRzRLnM1sF1Xj8 FdTiHvwdJzQn+QPVoF/rzmzpHx6hnw== =oFs6 -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-build-Make-grub-install-command-UEFI-aware.patch >From fa12cd92a2e4eead22f640d6231813e50b8191bf Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 6 Nov 2016 17:26:06 +0000 Subject: [PATCH 1/2] build: Make grub-install command UEFI aware. * gnu/build/install.scm (install-grub): Extend grub-install command with '--bootloader-id' and '--efi-directory'. --- gnu/build/install.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/build/install.scm b/gnu/build/install.scm index 5c2b35632..ddd95bbf6 100644 --- a/gnu/build/install.scm +++ b/gnu/build/install.scm @@ -54,6 +54,9 @@ GC'd." (unless (zero? (system* "grub-install" "--no-floppy" "--boot-directory" (string-append mount-point "/boot") + "--bootloader-id=GNU" + "--efi-directory" + (string-append mount-point "/boot") device)) (error "failed to install GRUB"))) -- 2.11.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-system-Load-efi-modules-in-grub.cfg.patch >From dd71d9b334ceccc09cd42484c6deac2079c44c70 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 7 Nov 2016 12:24:01 +0000 Subject: [PATCH 2/2] system: Load efi modules in grub.cfg. * gnu/system/grub.scm (eye-candy): Load 'efi_gop' and 'efi_uga' grub modules. --- gnu/system/grub.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index 4657b06b5..9477b2494 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -183,6 +183,8 @@ system string---e.g., \"x86_64-linux\"." (if (string-match "^(x86_64|i[3-6]86)-" system) " # Leave 'gfxmode' to 'auto'. + insmod efi_gop + insmod efi_uga insmod vbe insmod vga insmod video_bochs -- 2.11.0 --=-=-=--