source: BOOK/bootable/ppc/yaboot.xml @ fb40919

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since fb40919 was fb40919, checked in by Chris Staub <chris@…>, 13 years ago

Changed many 'LFS' references to 'CLFS'

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