source: BOOK/bootable/ppc/yaboot.xml @ 87c0d57

clfs-3.0.0-sysvinitsysvinit
Last change on this file since 87c0d57 was 87c0d57, checked in by William Harrington <kb0iic@…>, 10 years ago

Add &linux-version2; entity to the required parts of the book that need the full kernel version rather than just the &linux-version; entity. I.E. 3.14.8 instead of 3.14

  • Property mode set to 100644
File size: 6.0 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  %general-entities;
6]>
7
8<sect1 id="ch-bootable-yaboot" arch="ppc">
9  <?dbhtml filename="yaboot.html"?>
10
[fb40919]11  <title>Making the CLFS System Bootable</title>
[3f8be484]12
13  <indexterm zone="ch-bootable-yaboot">
14    <primary sortas="a-Yaboot">Yaboot</primary>
15  <secondary>configuring</secondary></indexterm>
16
[fb40919]17  <para os="a">Your shiny new CLFS system is almost complete. One of the last
[4cc3468]18  things to do is to ensure that the system can be properly booted. The
[bd709ec]19  instructions below apply only to NewWorld Macintoshes.</para>
[4cc3468]20
21  <para os="b">Boot loading can be a complex area, so a few cautionary words
22  are in order. Be familiar with the current boot loader and any other
23  operating systems present on the hard drive(s) that need to be bootable.
24  Make sure that an emergency CD is ready to <quote>rescue</quote> the
[bd709ec]25  computer if it becomes un-bootable.  It is also a good idea to enable booting
26  from Open Firmware in case things go really wrong.</para>
[4cc3468]27
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
[bd709ec]30  to a bootstrap partition and blessing it so that Open Firmware will boot from
[968933d]31  it.  This is all handled by <command>ybin</command>, the yaboot installer.</para>
[4cc3468]32
[073fae8]33  <para os="d">Ybin writes an optional 'OS selector' menu into Open Firmware,
[968933d]34  then writes yaboot and <filename>yaboot.conf</filename> to the bootstrap
35  partition, blesses this, and updates the boot device recorded in nvram. When
36  booted, the OF provides the initial menu to choose between linux, boot from
37  CD, and e.g. OSX (depending on what was in <filename>yaboot.conf</filename>).
38  If you boot to 'linux', yaboot is executed and lets you select which kernel
39  to use.</para>
[4cc3468]40
41  <para os="e">Images (kernels) are specified, together with any necessary path,
[968933d]42  in <filename>yaboot.conf</filename> - the details are incorporated into the
43  bootloader, but no attempt is made to access or validate the paths until
44  they are selected. There are many possible options that can be specified in
45  <filename>yaboot.conf</filename>, see the man page for the details. Most
46  people will be able to specify device=hd: (for a single hard disk), but if
47  you have multiple disks, or if you wish to be pedantic, you can specify the
[bd709ec]48  full OF path to the device, obtained by running <command>ofpath /dev/hdX</command>
49  .</para>
[4cc3468]50
51  <para os="h">Using the above information, determine the appropriate designators
[968933d]52  for the bootstrap partition and the root partition. For the following example,
[4cc3468]53  it is assumed that the bootstrap partition is <filename class="partition">hda2
[968933d]54  </filename> and the root partition is <filename class="partition">hda7</filename>.
55  We will also assume that you wish to be able to boot an OSX installation on
56  <filename class="partition">hda4</filename>. Change these items as necessary
[4cc3468]57  for your machine.</para>
58
[bd709ec]59  <para os="i">If your machine has a SATA disk, specify the partitions using
60  <filename class="devicefile">/dev/sda7</filename> and so forth in the usual
[968933d]61  way. At least some of the distros specify a full OF path to the 'device' and
[bd709ec]62  to the image(s), such as
[d018b81]63  <parameter>device=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:</parameter>
64  for the disk, and
[87c0d57]65  <parameter>image=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:9,/boot/clfskernel-&linux-version;-&linux-version2;</parameter>
[d018b81]66  which definitely works.</para>
[bd709ec]67
[4cc3468]68  <para os="k">Create a <quote>yaboot.conf</quote> file defining yaboot's boot
69  menu:</para>
70
[d018b81]71<screen os="l" role="nodump"><?dbfo keep-together="auto"?><userinput>cat &gt; /etc/yaboot.conf &lt;&lt; "EOF"
[4cc3468]72<literal># Begin /etc/yaboot.conf
73
74# By default, yaboot will boot the first menu entry.
75
76# Allow 10 seconds before booting the default.
77# this will also apply to the first-stage os selector
[ba26dd9]78timeout=100
[4cc3468]79
80# These variables are global
81# first, where to put the bootstrap partition
82boot=/dev/hda2
83
84# Which disk to use
85device=hd:
86
87# Default partition for the kernel images
88partition=7
89
90# default root partition
91root=/dev/hda7
92
[d018b81]93# where ybin is to find yaboot and ofboot
[4cc3468]94install=/usr/lib/yaboot/yaboot
95magicboot=/usr/lib/yaboot/ofboot
96
97# allow the initial menu to offer CD as an option
98enablecdboot
99
[bd709ec]100# allow the initial menu to offer booting from Open Firmware
101enableofboot
102
[4cc3468]103# allow the initial menu to boot from mac osx
104macosx=/dev/hda4
105
[bd709ec]106# white on black is boring!
107# note  the spellings : 'fgcolor' but 'light'
108# in this context, light means 'without high intensity'
109fgcolor=light-green
110
[fb40919]111# The first entry is for CLFS.
[4cc3468]112# For all images, the pathname is relative to the filesystem
[bd709ec]113# on which they are situated and can include at most one
114# directory
[87c0d57]115image=/boot/clfskernel-&linux-version;-&linux-version2;
[4cc3468]116    label=&version;
117    read-only</literal>
118EOF</userinput></screen>
119
120
121  <para os="n">Add an entry for the host distribution, if you have one. It might
122  look something like this if the kernel and initrd are in the host's '/'
123  directory on <filename class="partition">hda6</filename>:</para>
124
125<screen os="o" role="nodump"><userinput>cat &gt;&gt; /etc/yaboot.conf &lt;&lt; "EOF"
126<literal>title Debian
127image=/pci@f4000000/ata-6d/disk@0:6,/vmlinux
128    label=Debian
129    initrd=/pci@f4000000/ata-6d/disk@0:6,/initrd.gz
130    initrd-size=10000
131    append="root=/dev/hda7"
132    read-only</literal>
133EOF</userinput></screen>
134
135  <warning os="r">
[073fae8]136    <para>The following command will update the bootstrap partition and the
137    boot variable in Open Firmware. Do not run the command if this is not
138    desired.</para>
[4cc3468]139  </warning>
140
141<screen os="s" role="nodump"><userinput>ybin</userinput></screen>
[3f8be484]142
[7a357d7c]143  <para os="t">Alternatively, if the bootstrap partition has not already been
144  initialized, perhaps because you are using a Live CD, you will need to use
145  a different command to install the bootloader for the first time:</para>
146
147<screen os="u" role="nodump"><userinput>mkofboot</userinput></screen>
148
[3f8be484]149</sect1>
Note: See TracBrowser for help on using the repository browser.