source: chapter08/grub.xml@ c6c122eb

xry111/arm64
Last change on this file since c6c122eb was 2addc64, checked in by Xi Ruoyao <xry111@…>, 2 days ago

Merge remote-tracking branch 'origin/trunk' into xry111/arm64

  • Property mode set to 100644
File size: 15.0 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, and move the Bash completion support file to
119 the location recommended by the Bash completion maintainers:</para>
120
121<screen><userinput remap="install">make install
122mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
123
124 <para>Making your LFS system bootable with GRUB will be discussed in
125 <xref linkend="ch-bootable-grub" role='.'/></para>
126
127 </sect2>
128
129 <sect2 id="contents-gRUB" role="content">
130 <title>Contents of GRUB</title>
131
132 <segmentedlist>
133 <segtitle>Installed programs</segtitle>
134 <segtitle>Installed directories</segtitle>
135
136 <seglistitem>
137
138 <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest,
139 grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless,
140 grub-menulst2cfg, grub-mkconfig,
141 grub-mkimage, grub-mklayout, grub-mknetdir,
142 grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone,
143 grub-ofpathname, grub-probe, grub-reboot, grub-render-label,
144 grub-script-check,
145 grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg>
146
147 <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install
148 is first run)</seg>
149 </seglistitem>
150 </segmentedlist>
151
152 <variablelist>
153 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
154 <?dbfo list-presentation="list"?>
155 <?dbhtml list-presentation="table"?>
156
157 <varlistentry id="grub-bios-setup">
158 <term><command>grub-bios-setup</command></term>
159 <listitem>
160 <para>Is a helper program for <command>grub-install</command></para>
161 <indexterm zone="ch-system-grub grub-bios-setup">
162 <primary sortas="b-grub-bios-setup">grub-bios-setup</primary>
163 </indexterm>
164 </listitem>
165 </varlistentry>
166
167 <varlistentry id="grub-editenv">
168 <term><command>grub-editenv</command></term>
169 <listitem>
170 <para>Is a tool to edit the environment block</para>
171 <indexterm zone="ch-system-grub grub-editenv">
172 <primary sortas="b-grub-editenv">grub-editenv</primary>
173 </indexterm>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry id="grub-file">
178 <term><command>grub-file</command></term>
179 <listitem>
180 <para>Checks to see if the given file is of the specified type</para>
181 <indexterm zone="ch-system-grub grub-file">
182 <primary sortas="b-grub-file">grub-file</primary>
183 </indexterm>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry id="grub-fstest">
188 <term><command>grub-fstest</command></term>
189 <listitem>
190 <para>Is a tool to debug the filesystem driver</para>
191 <indexterm zone="ch-system-grub grub-fstest">
192 <primary sortas="b-grub-fstest">grub-fstest</primary>
193 </indexterm>
194 </listitem>
195 </varlistentry>
196
197 <varlistentry id="grub-glue-efi">
198 <term><command>grub-glue-efi</command></term>
199 <listitem>
200 <para>Glues 32-bit and 64-bit binaries into a single file (for Apple machines)</para>
201 <indexterm zone="ch-system-grub grub-glue-efi">
202 <primary sortas="b-grub-glue-efi">grub-glue-efi</primary>
203 </indexterm>
204 </listitem>
205 </varlistentry>
206
207 <varlistentry id="grub-install">
208 <term><command>grub-install</command></term>
209 <listitem>
210 <para>Installs GRUB on your drive</para>
211 <indexterm zone="ch-system-grub grub-install">
212 <primary sortas="b-grub-install">grub-install</primary>
213 </indexterm>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry id="grub-kbdcomp">
218 <term><command>grub-kbdcomp</command></term>
219 <listitem>
220 <para>Is a script that converts an xkb layout into one recognized by
221 GRUB</para>
222 <indexterm zone="ch-system-grub grub-kbdcomp">
223 <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="grub-macbless">
229 <term><command>grub-macbless</command></term>
230 <listitem>
231 <para>Is the Mac-style bless for HFS or HFS+ file systems (<command>bless</command>
232 is peculiar to Apple machines; it makes a device bootable)</para>
233 <indexterm zone="ch-system-grub grub-macbless">
234 <primary sortas="b-grub-macbless">grub-macbless</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="grub-menulst2cfg">
240 <term><command>grub-menulst2cfg</command></term>
241 <listitem>
242 <para>Converts a GRUB Legacy <filename>menu.lst</filename>
243 into a <filename>grub.cfg</filename> for use with GRUB 2</para>
244 <indexterm zone="ch-system-grub grub-menulst2cfg">
245 <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="grub-mkconfig">
251 <term><command>grub-mkconfig</command></term>
252 <listitem>
253 <para>Generates a <filename>grub.cfg</filename> file</para>
254 <indexterm zone="ch-system-grub grub-mkconfig">
255 <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="grub-mkimage">
261 <term><command>grub-mkimage</command></term>
262 <listitem>
263 <para>Makes a bootable image of GRUB</para>
264 <indexterm zone="ch-system-grub grub-mkimage">
265 <primary sortas="b-grub-mkimage">grub-mkimage</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="grub-mklayout">
271 <term><command>grub-mklayout</command></term>
272 <listitem>
273 <para>Generates a GRUB keyboard layout file</para>
274 <indexterm zone="ch-system-grub grub-mklayout">
275 <primary sortas="b-grub-mklayout">grub-mklayout</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="grub-mknetdir">
281 <term><command>grub-mknetdir</command></term>
282 <listitem>
283 <para>Prepares a GRUB netboot directory</para>
284 <indexterm zone="ch-system-grub grub-mknetdir">
285 <primary sortas="b-grub-mknetdir">grub-mknetdir</primary>
286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="grub-mkpasswd-pbkdf2">
291 <term><command>grub-mkpasswd-pbkdf2</command></term>
292 <listitem>
293 <para>Generates an encrypted PBKDF2 password for use in the boot
294 menu</para>
295 <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
296 <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry id="grub-mkrelpath">
302 <term><command>grub-mkrelpath</command></term>
303 <listitem>
304 <para>Makes a system pathname relative to its root</para>
305 <indexterm zone="ch-system-grub grub-mkrelpath">
306 <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="grub-mkrescue">
312 <term><command>grub-mkrescue</command></term>
313 <listitem>
314 <para>Makes a bootable image of GRUB suitable for a floppy disk,
315 CDROM/DVD, or a USB drive</para>
316 <indexterm zone="ch-system-grub grub-mkrescue">
317 <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="grub-mkstandalone">
323 <term><command>grub-mkstandalone</command></term>
324 <listitem>
325 <para>Generates a standalone image</para>
326 <indexterm zone="ch-system-grub grub-mkstandalone">
327 <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="grub-ofpathname">
333 <term><command>grub-ofpathname</command></term>
334 <listitem>
335 <para>Is a helper program that prints the path to a GRUB device</para>
336 <indexterm zone="ch-system-grub grub-ofpathname">
337 <primary sortas="b-grub-ofpathname">grub-ofpathname</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342 <varlistentry id="grub-probe">
343 <term><command>grub-probe</command></term>
344 <listitem>
345 <para>Probes device information for a given path or device</para>
346 <indexterm zone="ch-system-grub grub-probe">
347 <primary sortas="b-grub-probe">grub-probe</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="grub-reboot">
353 <term><command>grub-reboot</command></term>
354 <listitem>
355 <para>Sets the default boot entry for GRUB for the next boot only</para>
356 <indexterm zone="ch-system-grub grub-reboot">
357 <primary sortas="b-grub-reboot">grub-reboot</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="grub-render-label">
363 <term><command>grub-render-label</command></term>
364 <listitem>
365 <para>Renders Apple .disk_label for Apple Macs</para>
366 <indexterm zone="ch-system-grub grub-render-label">
367 <primary sortas="b-grub-render-label">grub-render-label</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="grub-script-check">
373 <term><command>grub-script-check</command></term>
374 <listitem>
375 <para>Checks the GRUB configuration script for syntax errors</para>
376 <indexterm zone="ch-system-grub grub-script-check">
377 <primary sortas="b-grub-script-check">grub-script-check</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="grub-set-default">
383 <term><command>grub-set-default</command></term>
384 <listitem>
385 <para>Sets the default boot entry for GRUB</para>
386 <indexterm zone="ch-system-grub grub-set-default">
387 <primary sortas="b-grub-set-default">grub-set-default</primary>
388 </indexterm>
389 </listitem>
390 </varlistentry>
391
392 <varlistentry id="grub-sparc64-setup">
393 <term><command>grub-sparc64-setup</command></term>
394 <listitem>
395 <para>Is a helper program for grub-setup</para>
396 <indexterm zone="ch-system-grub grub-sparc64-setup">
397 <primary sortas="b-grub-sparc64-setup">grub-setup</primary>
398 </indexterm>
399 </listitem>
400 </varlistentry>
401
402 <varlistentry id="grub-syslinux2cfg">
403 <term><command>grub-syslinux2cfg</command></term>
404 <listitem>
405 <para>Transforms a syslinux config file into grub.cfg format</para>
406 <indexterm zone="ch-system-grub grub-syslinux2cfg">
407 <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 </variablelist>
413
414 </sect2>
415
416</sect1>
Note: See TracBrowser for help on using the repository browser.