aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/grub.xml
blob: b714acf7eaf87e7ed4751612a1d3f484ab0419a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-grub" role="wrap">
  <?dbhtml filename="grub.html"?>

  <sect1info condition="script">
    <productname>grub</productname>
    <productnumber>&grub-version;</productnumber>
    <address>&grub-url;</address>
  </sect1info>

  <title>GRUB-&grub-version;</title>

  <indexterm zone="ch-system-grub">
    <primary sortas="a-Grub">GRUB</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>The GRUB package contains the GRand Unified Bootloader.</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>

      <seglistitem>
        <seg>&grub-ch6-sbu;</seg>
        <seg>&grub-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>Installation of GRUB</title>

    <para>Prepare GRUB for compilation:</para>

<screen><userinput remap="configure">./configure --prefix=/usr           \
             --sysconfdir=/etc       \
             --disable-grub-emu-usb  \
             --disable-grub-fstest   \
             --disable-efiemu</userinput></screen>

    <para>The --disable switches minimize what is built by disabling features
    and testing programs not really needed for LFS.</para>

    <para>Compile the package:</para>

<screen><userinput remap="make">make</userinput></screen>

    <para>This package does not come with a test suite.</para>

    <para>Install the package:</para>

<screen><userinput remap="install">make install</userinput></screen>

  <para>Using GRUB to make your LFS system bootable will be discussed in 
  <xref linkend="ch-bootable-grub"/>.</para>

  </sect2>

  <sect2 id="contents-gRUB" role="content">
    <title>Contents of GRUB</title>

    <segmentedlist>
      <segtitle>Installed programs</segtitle>
      <segtitle>Installed directories</segtitle>

      <seglistitem>
        <seg>grub-bin2h, grub-editenv, grub-install, grub-mkconfig,
        grub-mkdevicemap, grub-mkelfimage, grub-mkimage, grub-mkisofs,
        grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-probe,
        grub-reboot, grub-script-check, grub-set-default, grub-setup</seg>
        <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="grub-bin2h">
        <term><command>grub-bin2h</command></term>
        <listitem>
          <para>Converts a binary file to a C header</para>
          <indexterm zone="ch-system-grub grub-bin2h">
            <primary sortas="b-grub-bin2h">grub-bin2h</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-editenv">
        <term><command>grub-editenv</command></term>
        <listitem>
          <para>A tool to edit the environment block</para>
          <indexterm zone="ch-system-grub grub-editenv">
            <primary sortas="b-grub-editenv">grub-editenv</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-install">
        <term><command>grub-install</command></term>
        <listitem>
          <para>Install GRUB on your drive</para>
          <indexterm zone="ch-system-grub grub-install">
            <primary sortas="b-grub-install">grub-install</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkconfig">
        <term><command>grub-mkconfig</command></term>
        <listitem>
          <para>Generate a grub config file</para>
          <indexterm zone="ch-system-grub grub-mkconfig">
            <primary sortas="b-grub-mkconfig">grub-mkconfig</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkdevicemap">
        <term><command>grub-mkdevicemap</command></term>
        <listitem>
          <para>Generate a device map file automatically</para>
          <indexterm zone="ch-system-grub grub-mkdevicemap">
            <primary sortas="b-grub-mkdevicemap">grub-mkdevicemap</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkelfimage">
        <term><command>grub-mkelfimage</command></term>
        <listitem>
          <para>Make a bootable image of GRUB</para>
          <indexterm zone="ch-system-grub grub-mkelfimage">
            <primary sortas="b-grub-mkelfimage">grub-mkelfimage</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkimage">
        <term><command>grub-mkimage</command></term>
        <listitem>
          <para>Make a bootable image of GRUB</para>
          <indexterm zone="ch-system-grub grub-mkimage">
            <primary sortas="b-grub-mkimage">grub-mkimage</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkisofs">
        <term><command>grub-mkisofs</command></term>
        <listitem>
          <para>Creates a bootable ISO image</para>
          <indexterm zone="ch-system-grub grub-mkisofs">
            <primary sortas="b-grub-mkisofs">grub-mkisofs</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkpasswd-pbkdf2">
        <term><command>grub-mkpasswd-pbkdf2</command></term>
        <listitem>
          <para>Generates an encrypted PBKDF2 password for use in the boot
          menu</para>
          <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2">
            <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkrelpath">
        <term><command>grub-mkrelpath</command></term>
        <listitem>
          <para>Makes a system pathname relative to its root</para>
          <indexterm zone="ch-system-grub grub-mkrelpath">
            <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-mkrescue">
        <term><command>grub-mkrescue</command></term>
        <listitem>
          <para>Make a bootable image of GRUB suitable for a floppy disk</para>
          <indexterm zone="ch-system-grub grub-mkrescue">
            <primary sortas="b-grub-mkrescue">grub-mkrescue</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-probe">
        <term><command>grub-probe</command></term>
        <listitem>
          <para>Probe device information for a given path or device</para>
          <indexterm zone="ch-system-grub grub-probe">
            <primary sortas="b-grub-probe">grub-probe</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-reboot">
        <term><command>grub-reboot</command></term>
        <listitem>
          <para>Sets the default boot entry for GRUB for the next boot only</para>
          <indexterm zone="ch-system-grub grub-reboot">
            <primary sortas="b-grub-reboot">grub-reboot</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-script-check">
        <term><command>grub-script-check</command></term>
        <listitem>
          <para>Checks GRUB configuration script for syntax errors</para>
          <indexterm zone="ch-system-grub grub-script-check">
            <primary sortas="b-grub-script-check">grub-script-check</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-set-default">
        <term><command>grub-set-default</command></term>
        <listitem>
          <para>Sets the default boot entry for GRUB</para>
          <indexterm zone="ch-system-grub grub-set-default">
            <primary sortas="b-grub-set-default">grub-set-default</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="grub-setup">
        <term><command>grub-setup</command></term>
        <listitem>
          <para>Set up images to boot from a device</para>
          <indexterm zone="ch-system-grub grub-setup">
            <primary sortas="b-grub-setup">grub-setup</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>