Feb 21, 2006, 12:44:59 AM (17 years ago)
Jim Gifford <clfs@…>

r632@server (orig r630): ken | 2005-11-05 12:48:32 -0800
Add example yaboot.conf

1 edited


  • bootable/ppc/yaboot.xml

    r164c9be ra625f8b  
    1515  <secondary>configuring</secondary></indexterm>
    17   <para>This is a place holder for configuring yaboot</para>
     17  <para os="a">Your shiny new LFS system is almost complete. One of the last
     18  things to do is to ensure that the system can be properly booted. The
     19  instructions below apply only to NewWorld Macintoshes and (probably)
     20  PegasosPPC.</para>
     22  <para os="b">Boot loading can be a complex area, so a few cautionary words
     23  are in order. Be familiar with the current boot loader and any other
     24  operating systems present on the hard drive(s) that need to be bootable.
     25  Make sure that an emergency CD is ready to <quote>rescue</quote> the
     26  computer if it becomes un-bootable.</para>
     28  <para os="c">Earlier, we compiled and installed the yaboot boot loader software
     29  in preparation for this step. The procedure involves writing the bootloader
     30  to a bootstrap partition and blessing it so that OpenFirmware will boot from
     31  it.  This is all handled by <command>ybin</command> the yaboot installer.</para>
     33  <para os="d">Ybin assembles all the information it needs by reading yaboot.conf,
     34  then writes the bootstrap. When booted, the bootstrap provides an initial menu to
     35  choose between linux, boot from CD, and e.g. osx (depending on what was in yaboot.conf).
     36  If you boot to 'linux', yaboot kicks in and lets you select which kernel to use.</para>
     38  <para os="e">Images (kernels) are specified, together with any necessary path,
     39  in yaboot.conf - the details are incorporated into the bootloader, but no attempt
     40  is made to access or validate the paths until they are selected.  There are many
     41  possible options that can be specified in yaboot.conf, see the man page for the
     42  details.  Most people will be able to specify device=hd: (for a single hard disk),
     43  but if you have multiple disks, or if you wish to be pedantic, you can specify the
     44  full OF path to the device, obtained by running <command>ofpath</command>.</para>
     46  <para os="f">Note that the man page mentions which filesystems yaboot can
     47  navigate to find the images - the only linux filesystem type mentioned is ext2.
     48  You can use ext3 because that can be read like ext2, but if you wish to use
     49  reiserfs or any other filesystem you may need to create a separate boot partition
     50  formatted as ext2.</para>
     52  <para os="h">Using the above information, determine the appropriate designators
     53  for the bootstrap partition and the root partition.  For the following example,
     54  it is assumed that the bootstrap partition is <filename class="partition">hda2
     55  </filename> and the root partition is <filename class="partition">hda7</filename>
     56  .  We will also assume that you wish to be able to boot an OSX installation on
     57  <filename class="partition">hda4</filename>.  Change these items as necessary
     58  for your machine.</para>
     60  <para os="k">Create a <quote>yaboot.conf</quote> file defining yaboot's boot
     61  menu:</para>
     63<screen os="l" role="nodump"><userinput>cat &gt; /etc/yaboot.conf &lt;&lt; "EOF"
     64<literal># Begin /etc/yaboot.conf
     66# By default, yaboot will boot the first menu entry.
     68# Allow 10 seconds before booting the default.
     69# this will also apply to the first-stage os selector
     70timeout 100
     72# These variables are global
     73# first, where to put the bootstrap partition
     76# Which disk to use
     79# Default partition for the kernel images
     82# default root partition
     85# where ybin is to find yaboot and ofboot
     89# allow the initial menu to offer CD as an option
     92# allow the initial menu to boot from mac osx
     95# The first entry is for LFS.
     96# For all images, the pathname is relative to the filesystem
     97# on which they are mounted.
     99    label=&version;
     100    read-only</literal>
     104  <para os="n">Add an entry for the host distribution, if you have one. It might
     105  look something like this if the kernel and initrd are in the host's '/'
     106  directory on <filename class="partition">hda6</filename>:</para>
     108<screen os="o" role="nodump"><userinput>cat &gt;&gt; /etc/yaboot.conf &lt;&lt; "EOF"
     109<literal>title Debian
     111    label=Debian
     112    initrd=/pci@f4000000/ata-6d/disk@0:6,/initrd.gz
     113    initrd-size=10000
     114    append="root=/dev/hda7"
     115    read-only</literal>
     118  <warning os="r">
     119    <para>The following command will overwrite the current boot loader.
     120    Do not run the command if this is not desired.</para>
     121  </warning>
     123<screen os="s" role="nodump"><userinput>ybin</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.