<?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">
  <?dbhtml filename="grub.html"?>

  <title>Making the Temporary System Bootable</title>

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

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

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

<screen os="d"><userinput>dd if=${LFS}/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
dd if=${LFS}/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen>

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

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

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

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

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

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

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

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

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

  <para os="n">If all went well, GRUB will have reported finding its files
  in <filename class="directory">${LFS}/boot/grub</filename>. That's
  all there is to it. Quit the <command>grub</command> shell:</para>

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

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

<screen><userinput>cat &gt; ${LFS}/boot/grub/menu.lst &lt;&lt; "EOF"
<literal># Begin /boot/grub/menu.lst

# By default boot the first menu entry.
default 0

# Allow 30 seconds before booting the default.
timeout 30

# Use prettier colors.
color green/black light-green/black

# The first entry is for LFS.
title LFS &version;
root (hd0,3)
kernel /boot/lfskernel-&linux-x86-version; root=/dev/hda4</literal>
EOF</userinput></screen>

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

<screen os="r"><userinput>cat &gt;&gt; ${LFS}/boot/grub/menu.lst &lt;&lt; "EOF"
<literal>title Red Hat
root (hd0,2)
kernel /boot/kernel-2.6.5 root=/dev/hda3
initrd /boot/initrd-2.6.5</literal>
EOF</userinput></screen>

</sect1>
