1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "http://www.docbook.org/xml/4.3CR2/docbookx.dtd" [
3 <!ENTITY % grub-entities SYSTEM "../ent/grub.ent">
7 <title>Installing Grub-&grub-version;</title>
8 <?dbhtml filename="grub.html"?>
10 <screen>Estimated build time: 0.2 SBU
11 Estimated required disk space: 10 MB</screen>
13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../appendixa/grub-contents.xml"/>
16 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../appendixa/grub-deps.xml"/>
21 <title>Installation of Grub</title>
23 <para>This package is known to behave badly when you have changed its default
24 optimization flags (including the -march and -mcpu options). Therefore, if you
25 have defined any environment variables that override default optimizations,
26 such as CFLAGS and CXXFLAGS, we recommend unsetting them when building
29 <para>First fix a compilation problem with GCC-3.3.2:</para>
31 <screen><userinput>sed -i 's/2 long/2/' stage2/fsys_reiserfs.c</userinput></screen>
33 <para>Now prepare Grub for compilation:</para>
35 <screen><userinput>./configure --prefix=/usr</userinput></screen>
37 <para>Compile the package:</para>
39 <screen><userinput>make</userinput></screen>
41 <para>And install it:</para>
43 <screen><userinput>make install
45 cp /usr/share/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen>
47 <para>Replace <filename class="directory">i386-pc</filename> with whatever
48 directory is appropriate for your hardware.</para>
50 <para>The <filename class="directory">i386-pc</filename> directory also
51 contains a number of <filename>*stage1_5</filename> files, different ones
52 for different filesystems. Have a look at the ones available and copy the
53 appropriate ones to the <filename class="directory">/boot/grub</filename>
54 directory. Most people will copy the <filename>e2fs_stage1_5</filename>
55 and/or <filename>reiserfs_stage1_5</filename> files.</para>