source: postlfs/filesystems/uefi-bootloaders/grub-efi.xml@ 756a787

11.0 lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 756a787 was 756a787, checked in by Xi Ruoyao <xry111@…>, 6 months ago

Add packages and instructions for UEFI

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24393 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 6.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../../general.ent">
5 %general-entities;
6
7 <!ENTITY grub-efi-download-http "https://alpha.gnu.org/gnu/grub/grub-&grub-version;.tar.xz">
8 <!ENTITY grub-efi-download-ftp " ">
9 <!ENTITY grub-efi-md5sum "3c222b51347c182d655f9b94d5b56582">
10 <!ENTITY grub-efi-size "6.2 MB">
11 <!ENTITY grub-efi-buildsize "592 KB">
12 <!ENTITY grub-efi-time "less than 0.1 SBU">
13
14 <!ENTITY unifont-download-http "http://unifoundry.com/pub/unifont/unifont-&unifont-version;/font-builds/unifont-&unifont-version;.pcf.gz">
15 <!ENTITY unifont-md5sum "4fbc33c8d8d25985f1bcdd4d28bc2420">
16 <!ENTITY unifont-size "1.3 MB">
17]>
18
19<sect1 id="grub-efi" xreflabel="GRUB-&grub-version; for EFI">
20 <?dbhtml filename="grub-efi.html"?>
21
22 <sect1info>
23 <othername>$LastChangedBy: bdubbs $</othername>
24 <date>$Date: 2021-02-21 03:35:58 +0800 (日, 2021-02-21) $</date>
25 </sect1info>
26
27 <title>GRUB-&grub-version; for EFI</title>
28
29 <indexterm zone="grub-efi">
30 <primary sortas="a-grub-efi">grub-efi</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to GRUB</title>
35
36 <para>
37 The <application>GRUB</application> package provides GRand Unified
38 Bootloader. In this page it will be built with UEFI support, which
39 is not enabled for GRUB built in LFS.
40 </para>
41
42 &lfs101_checked;
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>
48 Download (HTTP): <ulink url="&grub-efi-download-http;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download (FTP): <ulink url="&grub-efi-download-ftp;"/>
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download MD5 sum: &grub-efi-md5sum;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Download size: &grub-efi-size;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated disk space required: &grub-efi-buildsize;
69 </para>
70 </listitem>
71 <listitem>
72 <para>
73 Estimated build time: &grub-efi-time;
74 </para>
75 </listitem>
76 </itemizedlist>
77
78 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
79
80 <itemizedlist spacing="compact">
81 <title>Unicode font data used to display GRUB menu</title>
82 <listitem>
83 <para>
84 Download (HTTP): <ulink url="&unifont-download-http;"/>
85 </para>
86 </listitem>
87 <listitem>
88 <para>
89 Download MD5 sum: &unifont-md5sum;
90 </para>
91 </listitem>
92 <listitem>
93 <para>
94 Download size: &unifont-size;
95 </para>
96 </listitem>
97 </itemizedlist>
98
99 <bridgehead renderas="sect3">GRUB Dependencies</bridgehead>
100
101 <bridgehead renderas="sect4">Required (runtime)</bridgehead>
102 <para role="runtime">
103 <xref linkend="efibootmgr"/>
104 </para>
105
106 <bridgehead renderas="sect4">Recommended</bridgehead>
107 <para role="recommended">
108 <xref linkend="freetype2"/>
109 </para>
110
111 <bridgehead renderas="sect4">Optional</bridgehead>
112 <para role="optional">
113 <xref linkend="lvm2"/>
114 </para>
115
116 <para condition="html" role="usernotes">User Notes:
117 <ulink url="&blfs-wiki;/grub-efi"/></para>
118
119 </sect2>
120
121 <sect2 role="installation">
122 <title>Installation of GRUB</title>
123
124 <para>
125 At first, install font data as the
126 <systemitem class="username">root</systemitem> user:
127 </para>
128
129<screen role="root"><userinput>mkdir -pv /usr/share/fonts/unifont &amp;&amp;
130gunzip -c unifont-&unifont-version;.pcf.gz > /usr/share/fonts/unifont/unifont.pcf</userinput></screen>
131
132 <warning>
133 <para>Unset any environment variables which may affect the build:</para>
134
135 <screen><userinput>unset {C,CPP,CXX,LD}FLAGS</userinput></screen>
136
137 <para>Don't try <quote>tuning</quote> this package with custom
138 compilation flags: this package is a bootloader, with low-level
139 operations in the source code which is likely to be broken by some
140 aggressive optimizations.</para>
141 </warning>
142
143 <para>
144 Build <application>GRUB</application> with the following commands:
145 </para>
146
147<screen><userinput>./configure --prefix=/usr \
148 --sbindir=/sbin \
149 --sysconfdir=/etc \
150 --disable-efiemu \
151 --enable-grub-mkfont \
152 --with-platform=efi \
153 --disable-werror &amp;&amp;
154
155make</userinput></screen>
156
157 <para>
158 This package does not have a test suite providing meaningful result.
159 </para>
160
161 <para>
162 Now, as the <systemitem class="username">root</systemitem> user:
163 </para>
164
165<screen role="root"><userinput>make install &amp;&amp;
166mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
167
168 </sect2>
169
170 <sect2 role="commands">
171 <title>Command Explanations</title>
172
173 <para>
174 <parameter>--enable-grub-mkfont</parameter>: Built the tool named
175 <command>grub-mkfont</command> to generate font file for the boot
176 loader, from the font data we've installed.
177 </para>
178
179 <warning>
180 <para>If the recommended dependency <xref linkend="freetype2"/> is not
181 installed, it's possible to omit this option and build GRUB. However,
182 if <command>grub-mkfont</command> is not built, or the unicode font
183 data is not avaliable at the time GRUB is built, GRUB won't install
184 any font for the boot loader. The GRUB boot menu will be displayed
185 in an ugly way, and the early stage of kernel initialization will be
186 in <quote>blind mode</quote> - you can't see any kernel message before
187 the graphics card driver is initialized. It will be very difficult to
188 diagnostic some boot issue (especially, if the graphics driver is
189 built as module).</para>
190 </warning>
191
192 <para>
193 <parameter>--with-platform=efi</parameter>: Ensures to build GRUB with
194 for EFI.
195 </para>
196
197 </sect2>
198
199 <sect2>
200 <title>Configuring GRUB</title>
201
202 <para>
203 Using GRUB to make the LFS system bootable on UEFI platform will be
204 discussed in <xref linkend="grub-setup"/>.
205 </para>
206 </sect2>
207
208 <sect2 role="content">
209 <title>Contents</title>
210
211 <para>See the page for GRUB in LFS book.</para>
212 </sect2>
213
214</sect1>
Note: See TracBrowser for help on using the repository browser.