source: chapter08/grub.xml@ 2324b83

xry111/arm64
Last change on this file since 2324b83 was c6e4dba, checked in by Xi Ruoyao <xry111@…>, 4 months ago

arm64: grub: Update references to BLFS

Now BLFS documents how to install only the GRUB components missing in
LFS, take the advantage.

Also if efibootmgr is available, it's easier to just run grub-install
w/o the --removable option instead of manually input some nasty
efibootmgr commands.

  • Property mode set to 100644
File size: 14.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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
8<sect1 id="ch-system-grub" role="wrap">
9 <?dbhtml filename="grub.html"?>
10
11 <sect1info condition="script">
12 <productname>grub</productname>
13 <productnumber>&grub-version;</productnumber>
14 <address>&grub-url;</address>
15 </sect1info>
16
17 <title>GRUB-&grub-version;</title>
18
19 <indexterm zone="ch-system-grub">
20 <primary sortas="a-Grub">GRUB</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The GRUB package contains the GRand Unified Bootloader.</para>
27
28 <segmentedlist>
29 <segtitle>&buildtime;</segtitle>
30 <segtitle>&diskspace;</segtitle>
31
32 <seglistitem>
33 <seg>&grub-fin-sbu;</seg>
34 <seg>&grub-fin-du;</seg>
35 </seglistitem>
36 </segmentedlist>
37
38 </sect2>
39
40 <sect2 role="installation">
41 <title>Installation of GRUB</title>
42
43 <note>
44 <para>
45 On ARM64 systems, the following instruction builds GRUB for UEFI.
46 But because LFS lacks the FreeType package and the Unifont data
47 file, GRUB won't install any font for the boot loader and
48 the GRUB boot menu will be displayed using a coarse font or in a
49 smaller region on the screen.
50 If wanted, after the LFS system is finished, install
51 <ulink url="&blfs-book;general/freetype.html">FreeType</ulink>
52 and then install the GRUB compoents not installed from LFS following
53 <ulink url="&blfs-book;postlfs/grub-efi.html">the BLFS
54 instruction</ulink>, but remove the <option>--target=x86_64</option>
55 option and skip the command to install the
56 <filename class='directory'>/usr/lib/grub/x86_64-efi</filename>
57 directory.
58 </para>
59 <para>
60 If your system firmware does not support UEFI, you need to skip the
61 content of this page and try to figure out how to boot your system.
62 </para>
63 </note>
64
65 <warning>
66 <para>Unset any environment variables which may affect the build:</para>
67
68 <screen><userinput remap='pre'>unset {C,CPP,CXX,LD}FLAGS</userinput></screen>
69
70 <para>Don't try <quote>tuning</quote> this package with custom
71 compilation flags. This package is a bootloader. The low-level
72 operations in the source code may be broken by
73 aggressive optimization.</para>
74 </warning>
75
76 <para>
77 Add a file missing from the release tarball:
78 </para>
79
80<screen><userinput remap='pre'>echo <literal>depends bli part_gpt</literal> &gt; grub-core/extra_deps.lst</userinput></screen>
81
82 <para>Prepare GRUB for compilation:</para>
83
84<screen><userinput remap="configure">./configure --prefix=/usr \
85 --sysconfdir=/etc \
86 --disable-efiemu \
87 --disable-werror</userinput></screen>
88
89 <variablelist>
90 <title>The meaning of the new configure options:</title>
91
92 <varlistentry>
93 <term><parameter>--disable-werror</parameter></term>
94 <listitem>
95 <para>This allows the build to complete with warnings introduced
96 by more recent versions of Flex.</para>
97 </listitem>
98 </varlistentry>
99
100 <varlistentry>
101 <term><parameter>--disable-efiemu</parameter></term>
102 <listitem>
103 <para>This option minimizes what is built by disabling a feature and
104 eliminating some test programs not needed for LFS.</para>
105 </listitem>
106 </varlistentry>
107
108 </variablelist>
109
110 <para>Compile the package:</para>
111
112<screen><userinput remap="make">make</userinput></screen>
113
114 <para>The test suite for this packages is not recommended. Most of
115 the tests depend on packages that are not available in the limited
116 LFS environment. To run the tests anyway, run <command>make check</command>.</para>
117
118 <para>Install the package:</para>
119
120<screen><userinput remap="install">make install
121mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
122
123 <para>Making your LFS system bootable with GRUB will be discussed in
124 <xref linkend="ch-bootable-grub"/>.</para>
125
126 </sect2>
127
128 <sect2 id="contents-gRUB" role="content">
129 <title>Contents of GRUB</title>
130
131 <segmentedlist>
132 <segtitle>Installed programs</segtitle>
133 <segtitle>Installed directories</segtitle>
134
135 <seglistitem>
136
137 <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest,
138 grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless,
139 grub-menulst2cfg, grub-mkconfig,
140 grub-mkimage, grub-mklayout, grub-mknetdir,
141 grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone,
142 grub-ofpathname, grub-probe, grub-reboot, grub-render-label,
143 grub-script-check,
144 grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg>
145
146 <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install
147 is first run)</seg>
148 </seglistitem>
149 </segmentedlist>
150
151 <variablelist>
152 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
153 <?dbfo list-presentation="list"?>
154 <?dbhtml list-presentation="table"?>
155
156 <varlistentry id="grub-bios-setup">
157 <term><command>grub-bios-setup</command></term>
158 <listitem>
159 <para>Is a helper program for <command>grub-install</command></para>
160 <indexterm zone="ch-system-grub grub-bios-setup">
161 <primary sortas="b-grub-bios-setup">grub-bios-setup</primary>
162 </indexterm>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry id="grub-editenv">
167 <term><command>grub-editenv</command></term>
168 <listitem>
169 <para>Is a tool to edit the environment block</para>
170 <indexterm zone="ch-system-grub grub-editenv">
171 <primary sortas="b-grub-editenv">grub-editenv</primary>
172 </indexterm>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry id="grub-file">
177 <term><command>grub-file</command></term>
178 <listitem>
179 <para>Checks to see if the given file is of the specified type</para>
180 <indexterm zone="ch-system-grub grub-file">
181 <primary sortas="b-grub-file">grub-file</primary>
182 </indexterm>
183 </listitem>
184 </varlistentry>
185
186 <varlistentry id="grub-fstest">
187 <term><command>grub-fstest</command></term>
188 <listitem>
189 <para>Is a tool to debug the filesystem driver</para>
190 <indexterm zone="ch-system-grub grub-fstest">
191 <primary sortas="b-grub-fstest">grub-fstest</primary>
192 </indexterm>
193 </listitem>
194 </varlistentry>
195
196 <varlistentry id="grub-glue-efi">
197 <term><command>grub-glue-efi</command></term>
198 <listitem>
199 <para>Glues 32-bit and 64-bit binaries into a single file (for Apple machines)</para>
200 <indexterm zone="ch-system-grub grub-glue-efi">
201 <primary sortas="b-grub-glue-efi">grub-glue-efi</primary>
202 </indexterm>
203 </listitem>
204 </varlistentry>
205
206 <varlistentry id="grub-install">
207 <term><command>grub-install</command></term>
208 <listitem>
209 <para>Installs GRUB on your drive</para>
210 <indexterm zone="ch-system-grub grub-install">
211 <primary sortas="b-grub-install">grub-install</primary>
212 </indexterm>
213 </listitem>
214 </varlistentry>
215
216 <varlistentry id="grub-kbdcomp">
217 <term><command>grub-kbdcomp</command></term>
218 <listitem>
219 <para>Is a script that converts an xkb layout into one recognized by
220 GRUB</para>
221 <indexterm zone="ch-system-grub grub-kbdcomp">
222 <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary>
223 </indexterm>
224 </listitem>
225 </varlistentry>
226
227 <varlistentry id="grub-macbless">
228 <term><command>grub-macbless</command></term>
229 <listitem>
230 <para>Is the Mac-style bless for HFS or HFS+ file systems (<command>bless</command>
231 is peculiar to Apple machines; it makes a device bootable)</para>
232 <indexterm zone="ch-system-grub grub-macbless">
233 <primary sortas="b-grub-macbless">grub-macbless</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="grub-menulst2cfg">
239 <term><command>grub-menulst2cfg</command></term>
240 <listitem>
241 <para>Converts a GRUB Legacy <filename>menu.lst</filename>
242 into a <filename>grub.cfg</filename> for use with GRUB 2</para>
243 <indexterm zone="ch-system-grub grub-menulst2cfg">
244 <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="grub-mkconfig">
250 <term><command>grub-mkconfig</command></term>
251 <listitem>
252 <para>Generates a <filename>grub.cfg</filename> file</para>
253 <indexterm zone="ch-system-grub grub-mkconfig">
254 <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="grub-mkimage">
260 <term><command>grub-mkimage</command></term>
261 <listitem>
262 <para>Makes a bootable image of GRUB</para>
263 <indexterm zone="ch-system-grub grub-mkimage">
264 <primary sortas="b-grub-mkimage">grub-mkimage</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="grub-mklayout">
270 <term><command>grub-mklayout</command></term>
271 <listitem>
272 <para>Generates a GRUB keyboard layout file</para>
273 <indexterm zone="ch-system-grub grub-mklayout">
274 <primary sortas="b-grub-mklayout">grub-mklayout</primary>
275 </indexterm>
276 </listitem>
277 </varlistentry>
278
279 <varlistentry id="grub-mknetdir">
280 <term><command>grub-mknetdir</command></term>
281 <listitem>
282 <para>Prepares a GRUB netboot directory</para>
283 <indexterm zone="ch-system-grub grub-mknetdir">
284 <primary sortas="b-grub-mknetdir">grub-mknetdir</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="grub-mkpasswd-pbkdf2">
290 <term><command>grub-mkpasswd-pbkdf2</command></term>
291 <listitem>
292 <para>Generates an encrypted PBKDF2 password for use in the boot
293 menu</para>
294 <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
295 <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="grub-mkrelpath">
301 <term><command>grub-mkrelpath</command></term>
302 <listitem>
303 <para>Makes a system pathname relative to its root</para>
304 <indexterm zone="ch-system-grub grub-mkrelpath">
305 <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="grub-mkrescue">
311 <term><command>grub-mkrescue</command></term>
312 <listitem>
313 <para>Makes a bootable image of GRUB suitable for a floppy disk,
314 CDROM/DVD, or a USB drive</para>
315 <indexterm zone="ch-system-grub grub-mkrescue">
316 <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="grub-mkstandalone">
322 <term><command>grub-mkstandalone</command></term>
323 <listitem>
324 <para>Generates a standalone image</para>
325 <indexterm zone="ch-system-grub grub-mkstandalone">
326 <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="grub-ofpathname">
332 <term><command>grub-ofpathname</command></term>
333 <listitem>
334 <para>Is a helper program that prints the path to a GRUB device</para>
335 <indexterm zone="ch-system-grub grub-ofpathname">
336 <primary sortas="b-grub-ofpathname">grub-ofpathname</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="grub-probe">
342 <term><command>grub-probe</command></term>
343 <listitem>
344 <para>Probes device information for a given path or device</para>
345 <indexterm zone="ch-system-grub grub-probe">
346 <primary sortas="b-grub-probe">grub-probe</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="grub-reboot">
352 <term><command>grub-reboot</command></term>
353 <listitem>
354 <para>Sets the default boot entry for GRUB for the next boot only</para>
355 <indexterm zone="ch-system-grub grub-reboot">
356 <primary sortas="b-grub-reboot">grub-reboot</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="grub-render-label">
362 <term><command>grub-render-label</command></term>
363 <listitem>
364 <para>Renders Apple .disk_label for Apple Macs</para>
365 <indexterm zone="ch-system-grub grub-render-label">
366 <primary sortas="b-grub-render-label">grub-render-label</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="grub-script-check">
372 <term><command>grub-script-check</command></term>
373 <listitem>
374 <para>Checks the GRUB configuration script for syntax errors</para>
375 <indexterm zone="ch-system-grub grub-script-check">
376 <primary sortas="b-grub-script-check">grub-script-check</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="grub-set-default">
382 <term><command>grub-set-default</command></term>
383 <listitem>
384 <para>Sets the default boot entry for GRUB</para>
385 <indexterm zone="ch-system-grub grub-set-default">
386 <primary sortas="b-grub-set-default">grub-set-default</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="grub-sparc64-setup">
392 <term><command>grub-sparc64-setup</command></term>
393 <listitem>
394 <para>Is a helper program for grub-setup</para>
395 <indexterm zone="ch-system-grub grub-sparc64-setup">
396 <primary sortas="b-grub-sparc64-setup">grub-setup</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="grub-syslinux2cfg">
402 <term><command>grub-syslinux2cfg</command></term>
403 <listitem>
404 <para>Transforms a syslinux config file into grub.cfg format</para>
405 <indexterm zone="ch-system-grub grub-syslinux2cfg">
406 <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 </variablelist>
412
413 </sect2>
414
415</sect1>
Note: See TracBrowser for help on using the repository browser.