source: BOOK/bootable/ppc/yaboot.xml@ 3c67a00

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 3c67a00 was 968933d, checked in by Chris Staub <chris@…>, 16 years ago

Text updates

  • Property mode set to 100644
File size: 6.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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 <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>
40
41 <para os="e">Images (kernels) are specified, together with any necessary path,
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
48 full OF path to the device, obtained by running <command>ofpath /dev/hdX</command>
49 .</para>
50
51 <para os="h">Using the above information, determine the appropriate designators
52 for the bootstrap partition and the root partition. For the following example,
53 it is assumed that the bootstrap partition is <filename class="partition">hda2
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
57 for your machine.</para>
58
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
61 way. At least some of the distros specify a full OF path to the 'device' and
62 to the image(s), such as
63 <parameter>device=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:</parameter>
64 for the disk, and
65 <parameter>image=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:9,/boot/clfskernel-&linux-version;</parameter>
66 which definitely works.</para>
67
68 <para os="k">Create a <quote>yaboot.conf</quote> file defining yaboot's boot
69 menu:</para>
70
71<screen os="l" role="nodump"><?dbfo keep-together="auto"?><userinput>cat &gt; /etc/yaboot.conf &lt;&lt; "EOF"
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
78timeout=100
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
93# where ybin is to find yaboot and ofboot
94install=/usr/lib/yaboot/yaboot
95magicboot=/usr/lib/yaboot/ofboot
96
97# allow the initial menu to offer CD as an option
98enablecdboot
99
100# allow the initial menu to offer booting from Open Firmware
101enableofboot
102
103# allow the initial menu to boot from mac osx
104macosx=/dev/hda4
105
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
111# The first entry is for CLFS.
112# For all images, the pathname is relative to the filesystem
113# on which they are situated and can include at most one
114# directory
115image=/boot/clfskernel-&linux-version;
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">
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>
139 </warning>
140
141<screen os="s" role="nodump"><userinput>ybin</userinput></screen>
142
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
149</sect1>
Note: See TracBrowser for help on using the repository browser.