source: chapter08/grub.xml@ 133b5cc

xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1
Last change on this file since 133b5cc was 133b5cc, checked in by Xi Ruoyao <xry111@…>, 12 months ago

loongarch: grub: reword the note about UEFI

No instruction change is needed.

Cherry picked from ARM64 branch.

(cherry picked from commit 5a458e897afcb58993b447a722e23beea6964fab)

  • Property mode set to 100644
File size: 14.5 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 LoongArch 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. The low-level
71 operations in the source code may be broken by
72 aggressive optimization.</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 versions of Flex.</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 eliminating some test 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>Making your LFS system bootable with GRUB 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 <command>grub-install</command></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>Is 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 to see if the given 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>Is a 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>Glues 32-bit and 64-bit binaries into a single file (for Apple machines)</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>Installs 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>Is a 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>Is the Mac-style bless for HFS or HFS+ file systems (<command>bless</command>
224 is peculiar to Apple machines; it makes a device bootable)</para>
225 <indexterm zone="ch-system-grub grub-macbless">
226 <primary sortas="b-grub-macbless">grub-macbless</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="grub-menulst2cfg">
232 <term><command>grub-menulst2cfg</command></term>
233 <listitem>
234 <para>Converts a GRUB Legacy <filename>menu.lst</filename>
235 into a <filename>grub.cfg</filename> for use with GRUB 2</para>
236 <indexterm zone="ch-system-grub grub-menulst2cfg">
237 <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry id="grub-mkconfig">
243 <term><command>grub-mkconfig</command></term>
244 <listitem>
245 <para>Generates a <filename>grub.cfg</filename> file</para>
246 <indexterm zone="ch-system-grub grub-mkconfig">
247 <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="grub-mkimage">
253 <term><command>grub-mkimage</command></term>
254 <listitem>
255 <para>Makes a bootable image of GRUB</para>
256 <indexterm zone="ch-system-grub grub-mkimage">
257 <primary sortas="b-grub-mkimage">grub-mkimage</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 <varlistentry id="grub-mklayout">
263 <term><command>grub-mklayout</command></term>
264 <listitem>
265 <para>Generates a GRUB keyboard layout file</para>
266 <indexterm zone="ch-system-grub grub-mklayout">
267 <primary sortas="b-grub-mklayout">grub-mklayout</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry id="grub-mknetdir">
273 <term><command>grub-mknetdir</command></term>
274 <listitem>
275 <para>Prepares a GRUB netboot directory</para>
276 <indexterm zone="ch-system-grub grub-mknetdir">
277 <primary sortas="b-grub-mknetdir">grub-mknetdir</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="grub-mkpasswd-pbkdf2">
283 <term><command>grub-mkpasswd-pbkdf2</command></term>
284 <listitem>
285 <para>Generates an encrypted PBKDF2 password for use in the boot
286 menu</para>
287 <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
288 <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="grub-mkrelpath">
294 <term><command>grub-mkrelpath</command></term>
295 <listitem>
296 <para>Makes a system pathname relative to its root</para>
297 <indexterm zone="ch-system-grub grub-mkrelpath">
298 <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
299 </indexterm>
300 </listitem>
301 </varlistentry>
302
303 <varlistentry id="grub-mkrescue">
304 <term><command>grub-mkrescue</command></term>
305 <listitem>
306 <para>Makes a bootable image of GRUB suitable for a floppy disk,
307 CDROM/DVD, or a USB drive</para>
308 <indexterm zone="ch-system-grub grub-mkrescue">
309 <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
310 </indexterm>
311 </listitem>
312 </varlistentry>
313
314 <varlistentry id="grub-mkstandalone">
315 <term><command>grub-mkstandalone</command></term>
316 <listitem>
317 <para>Generates a standalone image</para>
318 <indexterm zone="ch-system-grub grub-mkstandalone">
319 <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary>
320 </indexterm>
321 </listitem>
322 </varlistentry>
323
324 <varlistentry id="grub-ofpathname">
325 <term><command>grub-ofpathname</command></term>
326 <listitem>
327 <para>Is a helper program that prints the path to a GRUB device</para>
328 <indexterm zone="ch-system-grub grub-ofpathname">
329 <primary sortas="b-grub-ofpathname">grub-ofpathname</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="grub-probe">
335 <term><command>grub-probe</command></term>
336 <listitem>
337 <para>Probes device information for a given path or device</para>
338 <indexterm zone="ch-system-grub grub-probe">
339 <primary sortas="b-grub-probe">grub-probe</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="grub-reboot">
345 <term><command>grub-reboot</command></term>
346 <listitem>
347 <para>Sets the default boot entry for GRUB for the next boot only</para>
348 <indexterm zone="ch-system-grub grub-reboot">
349 <primary sortas="b-grub-reboot">grub-reboot</primary>
350 </indexterm>
351 </listitem>
352 </varlistentry>
353
354 <varlistentry id="grub-render-label">
355 <term><command>grub-render-label</command></term>
356 <listitem>
357 <para>Renders Apple .disk_label for Apple Macs</para>
358 <indexterm zone="ch-system-grub grub-render-label">
359 <primary sortas="b-grub-render-label">grub-render-label</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
364 <varlistentry id="grub-script-check">
365 <term><command>grub-script-check</command></term>
366 <listitem>
367 <para>Checks the GRUB configuration script for syntax errors</para>
368 <indexterm zone="ch-system-grub grub-script-check">
369 <primary sortas="b-grub-script-check">grub-script-check</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="grub-set-default">
375 <term><command>grub-set-default</command></term>
376 <listitem>
377 <para>Sets the default boot entry for GRUB</para>
378 <indexterm zone="ch-system-grub grub-set-default">
379 <primary sortas="b-grub-set-default">grub-set-default</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="grub-sparc64-setup">
385 <term><command>grub-sparc64-setup</command></term>
386 <listitem>
387 <para>Is a helper program for grub-setup</para>
388 <indexterm zone="ch-system-grub grub-sparc64-setup">
389 <primary sortas="b-grub-sparc64-setup">grub-setup</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="grub-syslinux2cfg">
395 <term><command>grub-syslinux2cfg</command></term>
396 <listitem>
397 <para>Transforms a syslinux config file into grub.cfg format</para>
398 <indexterm zone="ch-system-grub grub-syslinux2cfg">
399 <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 </variablelist>
405
406 </sect2>
407
408</sect1>
Note: See TracBrowser for help on using the repository browser.