From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RDkTW-0004Ym-Qd for garchives@archives.gentoo.org; Tue, 11 Oct 2011 22:07:03 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B03F521C07C; Tue, 11 Oct 2011 22:06:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6F2DF21C0A5 for ; Tue, 11 Oct 2011 22:06:39 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 64C561B4042 for ; Tue, 11 Oct 2011 22:06:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C4F7380044 for ; Tue, 11 Oct 2011 22:06:37 +0000 (UTC) From: "Matěj Laitl" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matěj Laitl" Message-ID: <928a01e0408231a0e634c043dc0dd1f2f05f8ef0.matej@gentoo> Subject: [gentoo-commits] dev/scarabeus:master commit in: docs/ X-VCS-Repository: dev/scarabeus X-VCS-Files: docs/grub-2-guide.xml X-VCS-Directories: docs/ X-VCS-Committer: matej X-VCS-Committer-Name: Matěj Laitl X-VCS-Revision: 928a01e0408231a0e634c043dc0dd1f2f05f8ef0 Date: Tue, 11 Oct 2011 22:06:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ceacfeb3a76c89b37895fe963612d537 commit: 928a01e0408231a0e634c043dc0dd1f2f05f8ef0 Author: Mat=C4=9Bj Laitl laitl cz> AuthorDate: Tue Oct 11 22:05:47 2011 +0000 Commit: Mat=C4=9Bj Laitl laitl cz> CommitDate: Tue Oct 11 22:05:47 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/scarabeus.git;= a=3Dcommit;h=3D928a01e0 GRUB 2 Guide: significantly enhance EFI section (nearly complete) --- docs/grub-2-guide.xml | 118 +++++++++++++++++++++++++++++++++++++++++++= ++++- 1 files changed, 115 insertions(+), 3 deletions(-) diff --git a/docs/grub-2-guide.xml b/docs/grub-2-guide.xml index e8c5b72..44daf5a 100644 --- a/docs/grub-2-guide.xml +++ b/docs/grub-2-guide.xml @@ -289,10 +289,122 @@ use it at all.

=20

-TODO: grub image +Next, you should add (or edit) an entry for the /boot partition into fst= ab and +mount it: +

+ +
+# cat /etc/fstab | grep efi-boot
+LABEL=3Defi-boot   /boot   vfat   defaults   0 2
+# mount /boot
+
+ +

+Next, you should copy GRUB 2 modules into /boot where they can be found = by +GRUB 2 during system boot: +

+ +
+# mkdir -p /boot/grub2
+# cp /lib/grub2/x86_64-efi/* /boot/grub2/
+
+ +

+The most crucial step is creating the GRUB 2 image (EFI application). Th= is is +accomplished using the grub2-mkimage command: +

+ +
+# grub2-mkimage -p /grub2 -o /boot/grub2/grub.efi -O x86_64-efi part_=
msdos part_gpt fat
+
+ + + + + + + + + + +where should GRUB 2 look for its modules and config? +/grub2 +relative to the root of the +partition where GRUB 2 EFI application is executed from + + + + +where to store created image? +/boot/grub2/grub.efi + + + + +platform to create image for +x86_64-efi +replace with i386-efi on 32bit systems (old Intel Macs) + + + + +modules from /lib/grub2/[platform] to statically link in +part_msdos part_gpt fat +you only need to specify modules that are needed to be able to load = other +modules from filesystem. You may drop part_msdos or part_gpt if +you don't use such partitions. You may add normal for a decent GR= UB 2 +shell available even in cases GRUB 2 cannot load other modules + +
grub2-mkimage optionsrecommended valuenotes
-p
-o
-O
<rest>
+ +

When GRUB 2 image (EFI application) is made, you have to tell your fi= rmware +to execute it upon boot. There are two ways to achieve this. If there is +already a default bootloader on your EFI System Partition that you don't= want +to overwrite, you have to use the second. Otherwise you can use the firs= t and +we encourage you to do so, since it is simpler. +

+ +
+# mkdir -p /boot/EFI/BOOT
+# cp /boot/grub2/grub.efi /boot/EFI/BOOT/BOOTX64.EFI
+
=20 -After you have prepared your GAGA, you can easily proceed with generatin= g the -configuration. + +EFI 2 specification says that the default bootloader location is [EFI= System +Partition]\EFI\BOOT\BOOTx64.EFI for x86_64 hardware. (and +...\BOOTIA32.EFI on 32bit systems) While FAT32 filesystems should= be +case-insesitive, it is recommended to use ALL-CAPS filenames in default +bootloader path in order to be compatible with all vfat mount options. + + +
+# efibootmgr TODO TODO TODO
+
+ + +Executing efibootmgr on Macs is known to brick (destroy) your fir= mware! +Various sources report that the bless command should be used inst= ead. + + +

+Last, you should create a GRUB 2 environment file (where GRUB 2 stores +persistent variables such number of the last booted item) as it is not c= reated +automatically: +

+ +
+# grub2-editenv - create
+
+ + +When you update GRUB 2, be sure to execute all commands that are marked = as +such. Failure to do so would result in you using the previously installe= d GRUB +version. + + +

+The last step is actually installing Linux kernel images into /boot, the= n you +can easily proceed with generating the configuration.

=20