source: BOOK/final-system/x86/grub.xml@ 058c18ab

clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 058c18ab was 6e70753, checked in by William Harrington <kb0iic@…>, 11 years ago

Eglibc doesn't declare gets() and edit grub for it.

  • Property mode set to 100644
File size: 8.6 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<sect1 id="ch-system-grub" role="wrap">
8 <?dbhtml filename="grub.html"?>
9
10 <title>GRUB-&grub-version;</title>
11
12 <indexterm zone="ch-system-grub">
13 <primary sortas="a-GRUB">GRUB</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The GRUB package contains the GRand Unified Bootloader.</para>
20
21 </sect2>
22
23 <sect2 role="installation">
24 <title>Installation of GRUB</title>
25
26 <note os="n1">
27 <para>If you would like use a different bootloader than this
28 one you can go to the following link for alterative bootloaders
29 and the instructions to use them.
30 <ulink url="http://trac.cross-lfs.org/wiki/bootloaders"/></para>
31 </note>
32
33 <note os="n2">
34 <para>This package is known to have issues when its default optimization
35 flags (including the <option>-march</option> and <option>-mcpu</option>
36 options) are changed. If any environment variables that override default
37 optimizations have been defined, such as <envar>CFLAGS</envar> and
38 <envar>CXXFLAGS</envar>, unset them when building GRUB.</para>
39 </note>
40
41 <para os="s1">Glibc-2.17 does not declare gets():</para>
42
43<screen os="s2"><userinput>sed -i -e '/gets is a/d' grub-core/gnulib/stdio.in.h</userinput></screen>
44
45 <para os="a">Prepare GRUB for compilation:</para>
46
47<screen os="b"><userinput>./configure --prefix=/usr \
48 --sysconfdir=/etc --disable-werror</userinput></screen>
49
50 <para os="c">Compile the package:</para>
51
52<screen os="d"><userinput>make</userinput></screen>
53
54 <para os="e">To test GRUB you must have QEMU installed and then, issue:
55 <userinput>make check</userinput>.</para>
56
57 <para os="f">Install the package:</para>
58
59<screen os="g"><userinput>make install</userinput></screen>
60
61 </sect2>
62
63 <sect2 id="conf-grub" role="configuration">
64 <title>Configuring GRUB</title>
65
66 <indexterm zone="conf-grub">
67 <primary sortas="a-GRUB">GRUB</primary>
68 <secondary>configuring</secondary></indexterm>
69
70 <indexterm zone="conf-grub">
71 <primary sortas="e-/etc/default/grub">/etc/default/grub</primary>
72 </indexterm>
73
74 <para>Now that grub is installed, we need to configure the defaults that
75 will be used to generate the configuration after we install the kernel.
76 Create this file with the following:</para>
77
78<screen><userinput>install -m755 -dv /etc/default
79cat &gt; /etc/default/grub &lt;&lt; "EOF"
80<literal># Begin /etc/default/grub
81
82GRUB_DEFAULT=0
83#GRUB_SAVEDEFAULT=true
84GRUB_HIDDEN_TIMEOUT=
85GRUB_HIDDEN_TIMEOUT_QUIET=false
86GRUB_TIMEOUT=10
87GRUB_DISTRIBUTOR=Cross-LFS
88
89GRUB_CMDLINE_LINUX=""
90GRUB_CMDLINE_LINUX_DEFAULT=""
91
92#GRUB_TERMINAL=console
93#GRUB_GFXMODE=640x480
94#GRUB_GFXPAYLOAD_LINUX=keep
95
96#GRUB_DISABLE_LINUX_UUID=true
97#GRUB_DISABLE_LINUX_RECOVERY=true
98
99#GRUB_INIT_TUNE="480 440 1"
100
101#GRUB_DISABLE_OS_PROBER=true
102
103# End /etc/default/grub</literal>
104EOF</userinput></screen>
105
106 <variablelist>
107 <title>The meaning of the above options and possible alternate
108 values:</title>
109
110 <varlistentry>
111 <term><parameter>GRUB_DEFAULT=</parameter></term>
112 <listitem>
113 <para>Write Me</para>
114 </listitem>
115 </varlistentry>
116
117 <varlistentry>
118 <term><parameter>GRUB_SAVEDEFAULT=</parameter></term>
119 <listitem>
120 <para>Write Me</para>
121 </listitem>
122 </varlistentry>
123
124 <varlistentry>
125 <term><parameter>GRUB_HIDDEN_TIMEOUT=</parameter></term>
126 <listitem>
127 <para>Write Me</para>
128 </listitem>
129 </varlistentry>
130
131 <varlistentry>
132 <term><parameter>GRUB_HIDDEN_TIMEOUT_QUIET=</parameter></term>
133 <listitem>
134 <para>Write Me</para>
135 </listitem>
136 </varlistentry>
137
138 <varlistentry>
139 <term><parameter>GRUB_TIMEOUT=</parameter></term>
140 <listitem>
141 <para>Write Me</para>
142 </listitem>
143 </varlistentry>
144
145 <varlistentry>
146 <term><parameter>GRUB_DISTRIBUTOR=</parameter></term>
147 <listitem>
148 <para>Write Me</para>
149 </listitem>
150 </varlistentry>
151
152 <varlistentry>
153 <term><parameter>GRUB_CMDLINE_LINUX=</parameter></term>
154 <listitem>
155 <para>Write Me</para>
156 </listitem>
157 </varlistentry>
158
159 <varlistentry>
160 <term><parameter>GRUB_CMDLINE_LINUX_DEFAULT=</parameter></term>
161 <listitem>
162 <para>Write Me</para>
163 </listitem>
164 </varlistentry>
165
166 <varlistentry>
167 <term><parameter>GRUB_TERMINAL=</parameter></term>
168 <listitem>
169 <para>Write Me</para>
170 </listitem>
171 </varlistentry>
172
173 <varlistentry>
174 <term><parameter>GRUB_GFXMODE=</parameter></term>
175 <listitem>
176 <para>Write Me</para>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry>
181 <term><parameter>GRUB_GFXPAYLOAD_LINUX=</parameter></term>
182 <listitem>
183 <para>Write Me</para>
184 </listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><parameter>GRUB_DEFAULT=</parameter></term>
189 <listitem>
190 <para>Write Me</para>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry>
195 <term><parameter>GRUB_DISABLE_LINUX_UUID=</parameter></term>
196 <listitem>
197 <para>Write Me</para>
198 </listitem>
199 </varlistentry>
200
201 <varlistentry>
202 <term><parameter>GRUB_DISABLE_LINUX_RECOVERY=</parameter></term>
203 <listitem>
204 <para>Write Me</para>
205 </listitem>
206 </varlistentry>
207
208 <varlistentry>
209 <term><parameter>GRUB_INIT_TUNE=</parameter></term>
210 <listitem>
211 <para>Write Me</para>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry>
216 <term><parameter>GRUB_DISABLE_OS_PROBER=</parameter></term>
217 <listitem>
218 <para>Write Me</para>
219 </listitem>
220 </varlistentry>
221
222 </variablelist>
223
224 </sect2>
225
226 <sect2 id="contents-grub" role="content">
227 <title>Contents of GRUB</title>
228
229 <segmentedlist>
230 <segtitle>Installed programs</segtitle>
231 <segtitle>Installed directories</segtitle>
232
233 <seglistitem>
234 <seg>grub, grub-install, grub-md5-crypt, grub-set-default, grub-terminfo, and mbchk</seg>
235 <seg>/usr/lib/grub, /boot/grub</seg>
236 </seglistitem>
237 </segmentedlist>
238
239 <variablelist>
240 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
241 <?dbfo list-presentation="list"?>
242 <?dbhtml list-presentation="table"?>
243
244 <varlistentry id="grub">
245 <term><command>grub</command></term>
246 <listitem>
247 <para>The Grand Unified Bootloader's command shell</para>
248 <indexterm zone="ch-system-grub grub">
249 <primary sortas="b-grub">grub</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 <varlistentry id="grub-install">
255 <term><command>grub-install</command></term>
256 <listitem>
257 <para>Installs GRUB on the given device</para>
258 <indexterm zone="ch-system-grub grub-install">
259 <primary sortas="b-grub-install">grub-install</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="grub-md5-crypt">
265 <term><command>grub-md5-crypt</command></term>
266 <listitem>
267 <para>Encrypts a password in MD5 format</para>
268 <indexterm zone="ch-system-grub grub-md5-crypt">
269 <primary sortas="b-grub-md5-crypt">grub-md5-crypt</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="grub-set-default">
275 <term><command>grub-set-default</command></term>
276 <listitem>
277 <para>Sets the default boot entry for GRUB</para>
278 <indexterm zone="ch-system-grub grub-set-default">
279 <primary sortas="b-grub-set-default">grub-set-default</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 <varlistentry id="grub-terminfo">
285 <term><command>grub-terminfo</command></term>
286 <listitem>
287 <para>Generates a terminfo command from a terminfo name; it can be
288 employed if an unknown terminal is being used</para>
289 <indexterm zone="ch-system-grub grub-terminfo">
290 <primary sortas="b-grub-terminfo">grub-terminfo</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="mbchk">
296 <term><command>mbchk</command></term>
297 <listitem>
298 <para>Checks the format of a multi-boot kernel</para>
299 <indexterm zone="ch-system-grub mbchk">
300 <primary sortas="b-mbchk">mbchk</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 </variablelist>
306
307 </sect2>
308
309</sect1>
Note: See TracBrowser for help on using the repository browser.