source: BOOK/bootable/ppc/yaboot.xml@ 41fb416

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 41fb416 was bd709ec, checked in by Jim Gifford <clfs@…>, 19 years ago

r3373@server (orig r1556): ken | 2006-05-10 15:15:06 -0700
Improve yaboot.conf and add examples of sata paths, drop reference to pegasos ppc for lack of information, and correct my attempts to spell Open Firmware as one word.

  • Property mode set to 100644
File size: 6.1 KB
RevLine 
[3f8be484]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 LFS System Bootable</title>
12
13 <indexterm zone="ch-bootable-yaboot">
14 <primary sortas="a-Yaboot">Yaboot</primary>
15 <secondary>configuring</secondary></indexterm>
16
[4cc3468]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
[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
31 it. This is all handled by <command>ybin</command> the yaboot installer.</para>
[4cc3468]32
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>
37
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
[bd709ec]44 full OF path to the device, obtained by running <command>ofpath /dev/hdX</command>
45 .</para>
[4cc3468]46
47 <para os="f">Note that the man page mentions which filesystems yaboot can
48 navigate to find the images - the only linux filesystem type mentioned is ext2.
49 You can use ext3 because that can be read like ext2, but if you wish to use
50 reiserfs or any other filesystem you may need to create a separate boot partition
51 formatted as ext2.</para>
52
53 <para os="h">Using the above information, determine the appropriate designators
54 for the bootstrap partition and the root partition. For the following example,
55 it is assumed that the bootstrap partition is <filename class="partition">hda2
56 </filename> and the root partition is <filename class="partition">hda7</filename>
57 . We will also assume that you wish to be able to boot an OSX installation on
58 <filename class="partition">hda4</filename>. Change these items as necessary
59 for your machine.</para>
60
[bd709ec]61 <para os="i">If your machine has a SATA disk, specify the partitions using
62 <filename class="devicefile">/dev/sda7</filename> and so forth in the usual
63 way. At least some of the distros specify a full OF path to the 'device' and
64 to the image(s), such as
65 <filename class="devicefile">device=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:
66 </filename> for the disk, and
67 <filename class="partition">image=/ht@0,f2000000/pci@3/k2-sata-root@c/k2-sata@0/disk@0:9,/boot/lfskernel-&linux-version;
68 </filename> which definitely works.</para>
69
[4cc3468]70 <para os="k">Create a <quote>yaboot.conf</quote> file defining yaboot's boot
71 menu:</para>
72
73<screen os="l" role="nodump"><userinput>cat &gt; /etc/yaboot.conf &lt;&lt; "EOF"
74<literal># Begin /etc/yaboot.conf
75
76# By default, yaboot will boot the first menu entry.
77
78# Allow 10 seconds before booting the default.
79# this will also apply to the first-stage os selector
[ba26dd9]80timeout=100
[4cc3468]81
82# These variables are global
83# first, where to put the bootstrap partition
84boot=/dev/hda2
85
86# Which disk to use
87device=hd:
88
89# Default partition for the kernel images
90partition=7
91
92# default root partition
93root=/dev/hda7
94
95# where ybin is to find yaboot and ofboot
96install=/usr/lib/yaboot/yaboot
97magicboot=/usr/lib/yaboot/ofboot
98
99# allow the initial menu to offer CD as an option
100enablecdboot
101
[bd709ec]102# allow the initial menu to offer booting from Open Firmware
103enableofboot
104
[4cc3468]105# allow the initial menu to boot from mac osx
106macosx=/dev/hda4
107
[bd709ec]108# white on black is boring!
109# note the spellings : 'fgcolor' but 'light'
110# in this context, light means 'without high intensity'
111fgcolor=light-green
112
[4cc3468]113# The first entry is for LFS.
114# For all images, the pathname is relative to the filesystem
[bd709ec]115# on which they are situated and can include at most one
116# directory
[43daa01]117image=/boot/lfskernel-&linux-version;
[4cc3468]118 label=&version;
119 read-only</literal>
120EOF</userinput></screen>
121
122
123 <para os="n">Add an entry for the host distribution, if you have one. It might
124 look something like this if the kernel and initrd are in the host's '/'
125 directory on <filename class="partition">hda6</filename>:</para>
126
127<screen os="o" role="nodump"><userinput>cat &gt;&gt; /etc/yaboot.conf &lt;&lt; "EOF"
128<literal>title Debian
129image=/pci@f4000000/ata-6d/disk@0:6,/vmlinux
130 label=Debian
131 initrd=/pci@f4000000/ata-6d/disk@0:6,/initrd.gz
132 initrd-size=10000
133 append="root=/dev/hda7"
134 read-only</literal>
135EOF</userinput></screen>
136
137 <warning os="r">
138 <para>The following command will overwrite the current boot loader.
139 Do not run the command if this is not desired.</para>
140 </warning>
141
142<screen os="s" role="nodump"><userinput>ybin</userinput></screen>
[3f8be484]143
[7a357d7c]144 <para os="t">Alternatively, if the bootstrap partition has not already been
145 initialized, perhaps because you are using a Live CD, you will need to use
146 a different command to install the bootloader for the first time:</para>
147
148<screen os="u" role="nodump"><userinput>mkofboot</userinput></screen>
149
[3f8be484]150</sect1>
Note: See TracBrowser for help on using the repository browser.