source: chapter08/grub.xml@ 1ace465

xry111/arm64 xry111/arm64-12.0
Last change on this file since 1ace465 was f8ffc3a5, checked in by Xi Ruoyao <xry111@…>, 19 months ago

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

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