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

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

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

  <para os="a">Some of the idiosyncracies of booting on ppc are discussed in
   <xref linkend="appendixe" role="."/>. Essentially, there are two options
   here - either copy the bootloader to an  OSX root partition and boot from
   Open Firmware, or use an install, Live, or rescue CD to set up a bootstrap
   partition.</para>

  <sect2 role=".">
    <title>Copying the bootloader to OSX and booting from OF.</title>

    <para os="b">You must now ensure that <filename>/tools/etc/yaboot.conf</filename>
    contains the correct details for the CLFS system.  Consult
    <xref linkend="ch-bootable-yaboot" role="."/> for details, but note that
    at this point you do not need the <literal>install, magicboot, enablecdboot
    </literal>or <literal>macosx</literal> parameters because these are not
    available when you boot from Open Firmware.</para>

    <para os="c">By this stage, you should have the temporary system on an ext2
    filesystem on your Mac.  Now, from within OSX, copy
    <filename>/tools/lib/yaboot/yaboot</filename>) and
    <filename>/tools/etc/yaboot.conf</filename>) to the OSX <filename>/</filename>
    directory.</para>

   <para os="d">Each time you want to boot into the temporary system, hold down
   the option-command-o-f keys to get to Open Firmware, then use the following
   command, replacing <literal>X</literal> with the number of the partition
   containing the <emphasis>OSX</emphasis> root filesystem (typically, this
   will be '3').</para>

<screen os="e" role="nodump"><userinput>boot hd:X,yaboot</userinput></screen>

  </sect2>

  <sect2 role=".">
    <title>Using a CD to set up the bootstrap partition.</title>

    <para os="f">This is particularly appropriate if you cannot write to an
    ext2 filesystem from OSX. Boot from the CD, and (as necessary) create
    partitions and filesystems, mount the CLFS partition at
    <filename>/tools</filename>  and untar the temporary system there.</para>

    <para os="g">Now set up <filename>/tools/etc/yaboot.conf</filename> - see
    <xref linkend="ch-bootable-yaboot" role="."/> for details of what should be
    in it, but note that the <emphasis>install</emphasis> and <emphasis>magicboot
    </emphasis>specifications should point to<filename>/tools/lib/yaboot/</filename>
    and <emphasis>not</emphasis> <filename>/usr/lib/yaboot</filename>.</para>

    <para os="h">To write the bootloader to the disk, with <filename>/tools/sbin
   </filename>first on your path and <filename>/proc</filename> mounted, run the
   following command:</para>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../bootable/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='r'])"/>

<screen os="j" role="nodump"><userinput>PATH_PREFIX=/tools ybin -v -C /tools/etc/yaboot.conf</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    href="../../bootable/ppc/yaboot.xml"
    xpointer="xpointer(//*[@os='t'])"/>

<screen os="u" role="nodump"><userinput>PATH_PREFIX=/tools mkofboot</userinput></screen>

  </sect2>

</sect1>
