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

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

  <indexterm zone="ch-boot-lilo">
    <primary sortas="a-Lilo">Lilo</primary>
    <secondary>configuring</secondary>
  </indexterm>

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

  <para os="a">You are nearly ready to boot to the new temporary system.
  One of the last things to do is to ensure that the system can be booted.
  The instructions below apply only to x86_64 machines on which Lilo is going
  to be installed. Information on using a pre-installed GRUB on machines
  currently running as x86 or x86_64 multilib should be available in the
  usual resource-specific locations for those architectures.  If you have
  installed an x86 version of Lilo, these instructions should be modified
  to refer to the <command>lilo</command> and <command>keytab-lilo.pl
  </command> commands you installed on the host system.</para>

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

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

  <para os="d">Earlier, we compiled and installed the Lilo boot loader software
  in preparation for this step. The procedure involves writing a boot image to
  a specific location on the hard drive. If you have a floppy disk drive, or
  if you have installed a cd recording program, we highly recommend using
  mkrescue to create a Lilo boot floppy, or CD (using e.g. dvdrecord from
  dvdrtools) as a test and as a backup.</para>

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

<screen os="f" role="nodump"><userinput>keytab-lilo.pl uk >${CLFS}/boot/uk.ktl</userinput></screen>

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

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

<screen os="j" role="nodump"><userinput>cat &gt; ${CLFS}/etc/lilo.conf &lt;&lt; "EOF"
<literal># Begin /etc/lilo.conf
# lilo.conf
#
# global options
boot=/dev/&lt;bootdisk&gt;
keytable=/boot/&lt;keytable&gt;
lba32
map=/boot/map
prompt

# set the name of the default image to boot
default=clfs

# define an image
image=/boot/clfskernel
    label=clfs
    root=/dev/&lt;partition&gt;
    read-only
# optionally add parameters to pass, e.g.
#   append="video=radeonfb:1024x768-16@70"

# if you had an existing system, you could
# add its details here.
EOF</literal></userinput></screen>


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

  <warning os="l">
    <para>The following command will overwrite any current boot loader.
    Do not run the command if this is not desired. If you have
    cross-compiled on a different machine from the target, you must
    install the bootloader on the target machine, the installed boot
    block is not a file which can be copied with <command>tar</command>. 
    </para>
  </warning>

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

<screen os="n" role="nodump"><userinput>/tools/bin/lilo.static -v -C ${CLFS}/etc/lilo.conf</userinput></screen>

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

</sect1>
