<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

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

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

  <indexterm zone="ch-boot-grub-build">
    <primary sortas="a-GRUB">GRUB</primary>
    <secondary>boot</secondary>
  </indexterm>

  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
  href="../../final-system/x86/grub.xml"
  xpointer="xpointer(//*[@role='package'])"/>

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

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/x86_64/grub.xml"
    xpointer="xpointer(//*[@os='p3'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/x86_64/grub.xml"
    xpointer="xpointer(//*[@os='p4'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='p1'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='p2'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='a'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='b'])"/>

<screen os="aa"><userinput>CC="${CC} ${BUILD32}" ./configure --prefix=/usr \
   --build=${CLFS_HOST} --host=${CLFS_TARGET}</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='c'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='d'])"/>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../x86/grub-build.xml"
    xpointer="xpointer(//*[@os='f'])"/>

<screen os="ab"><userinput>make DESTDIR=${CLFS} install
mkdir -v ${CLFS}/boot/grub
cp -v ${CLFS}/usr/lib/grub/x86_64-pc/stage{1,2} ${CLFS}/boot/grub</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
    href="../../final-system/x86_64/grub.xml"
    xpointer="xpointer(//*[@os='i'])"/>

    <para os="j">The <filename class="directory">x86_64-pc</filename>
    directory contains a number of <filename>*stage1_5</filename>
    files, different ones for different file systems. Review the files
    available and copy the appropriate ones to the <filename
    class="directory">${CLFS}/boot/grub</filename> directory. Most
    users will copy the <filename>e2fs_stage1_5</filename> and/or
    <filename>reiserfs_stage1_5</filename> files.</para>

  </sect2>

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

    <para>Details on this package are located in <xref
    linkend="contents-grub" role="."/></para>

  </sect2>

</sect1>
