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