source: BOOK/bootable/ppc/yaboot.xml@ 05f536e

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

r1084@server (orig r1082): jciccone | 2006-01-17 12:17:45 -0800
Fixed type in yaboot configuration

  • Property mode set to 100644
File size: 4.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 LFS 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 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>
21
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>
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 OpenFirmware will boot from
31 it. This is all handled by <command>ybin</command> the yaboot installer.</para>
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
44 full OF path to the device, obtained by running <command>ofpath</command>.</para>
45
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>
51
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>
59
60 <para os="k">Create a <quote>yaboot.conf</quote> file defining yaboot's boot
61 menu:</para>
62
63<screen os="l" role="nodump"><userinput>cat &gt; /etc/yaboot.conf &lt;&lt; "EOF"
64<literal># Begin /etc/yaboot.conf
65
66# By default, yaboot will boot the first menu entry.
67
68# Allow 10 seconds before booting the default.
69# this will also apply to the first-stage os selector
70timeout=100
71
72# These variables are global
73# first, where to put the bootstrap partition
74boot=/dev/hda2
75
76# Which disk to use
77device=hd:
78
79# Default partition for the kernel images
80partition=7
81
82# default root partition
83root=/dev/hda7
84
85# where ybin is to find yaboot and ofboot
86install=/usr/lib/yaboot/yaboot
87magicboot=/usr/lib/yaboot/ofboot
88
89# allow the initial menu to offer CD as an option
90enablecdboot
91
92# allow the initial menu to boot from mac osx
93macosx=/dev/hda4
94
95# The first entry is for LFS.
96# For all images, the pathname is relative to the filesystem
97# on which they are mounted.
98image=/boot/lfskernel-&linux-version;
99 label=&version;
100 read-only</literal>
101EOF</userinput></screen>
102
103
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>
107
108<screen os="o" role="nodump"><userinput>cat &gt;&gt; /etc/yaboot.conf &lt;&lt; "EOF"
109<literal>title Debian
110image=/pci@f4000000/ata-6d/disk@0:6,/vmlinux
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>
116EOF</userinput></screen>
117
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>
122
123<screen os="s" role="nodump"><userinput>ybin</userinput></screen>
124
125</sect1>
Note: See TracBrowser for help on using the repository browser.