aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/grub-inst.xml
blob: 650b76c0bedc494d65900c664eaa7cf04c0ba6e3 (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
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>

<sect2>
<title>Installation of Grub</title>

<para>This package is known to behave badly when you have changed its default
optimization flags (including the -march and -mcpu options). Therefore, if you
have defined any environment variables that override default optimizations,
such as CFLAGS and CXXFLAGS, we recommend unsetting them when building
Grub.</para>

<para>Grub needs a patch to fix a compilation problem with GCC-3.3.1</para>

<para><screen><userinput>patch -Np1 -i ../grub-&grub-patch-version;.patch</userinput></screen></para>

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

<para><screen><userinput>./configure --prefix=/usr</userinput></screen></para>

<para>Compile the package:</para>

<para><screen><userinput>make</userinput></screen></para>

<para>And install it:</para>

<para><screen><userinput>make install
mkdir /boot/grub
cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen></para>

<para>Replace <filename class="directory">i386-pc</filename> with whatever
directory is appropriate for your hardware.</para>

<para>The <filename class="directory">i386-pc</filename> directory also
contains a number of <filename>*stage1_5</filename> files, different ones
for different filesystems. Have a look at the ones available and copy the
appropriate ones to the <filename class="directory">/boot/grub</filename>
directory. Most people will copy the <filename>e2fs_stage1_5</filename>
and/or <filename>reiserfs_stage1_5</filename> files.</para>

</sect2>