| 1 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
| 4 |
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
|
| 6 |
|
| 7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-ppc64-bootloader.xml,v 1.2 2004/07/30 11:59:45 swift Exp $ -->
|
| 8 |
|
| 9 |
<sections>
|
| 10 |
<section>
|
| 11 |
<title>Making your Choice</title>
|
| 12 |
<subsection>
|
| 13 |
<title>Introduction</title>
|
| 14 |
<body>
|
| 15 |
|
| 16 |
<p>
|
| 17 |
Now that your kernel is configured and compiled and the necessary system
|
| 18 |
configuration files are filled in correctly, it is time to install a
|
| 19 |
program that will fire up your kernel when you start the system. Such a
|
| 20 |
program is called a <e>bootloader</e>.
|
| 21 |
</p>
|
| 22 |
|
| 23 |
<p>
|
| 24 |
On Linux/PPC64 we have only yaBoot as a bootloader untill grub2 is
|
| 25 |
finished.
|
| 26 |
</p>
|
| 27 |
|
| 28 |
</body>
|
| 29 |
</subsection>
|
| 30 |
</section>
|
| 31 |
<section id="yaboot">
|
| 32 |
<title>Using yaBoot</title>
|
| 33 |
<subsection>
|
| 34 |
<title>Introduction</title>
|
| 35 |
<body>
|
| 36 |
|
| 37 |
<impo>
|
| 38 |
You have to use yaboot-static instead of yaboot, because yaboot won't
|
| 39 |
compile on PPC64.
|
| 40 |
</impo>
|
| 41 |
|
| 42 |
<p>
|
| 43 |
There are two ways to configure yaBoot for your system. You can use the
|
| 44 |
new and improved <c>yabootconfig</c> included with
|
| 45 |
<path>yaboot-1.3.8-r1</path> and later to automatically setup yaboot. If
|
| 46 |
for some reason you do not want to run <c>yabootconfig</c> to
|
| 47 |
automatically setup <path>/etc/yaboot.conf</path> or you are installing Gentoo
|
| 48 |
on a G5 (on which <c>yabootconfig</c> does not always work), you can just edit
|
| 49 |
the sample file already installed on your system.
|
| 50 |
</p>
|
| 51 |
|
| 52 |
<impo>
|
| 53 |
yabootconfig/ybin won't work on IBM. You have to install yaboot another way:
|
| 54 |
<uri link="#yaboot-ibm">Using yaboot on IBM</uri>
|
| 55 |
</impo>
|
| 56 |
|
| 57 |
<ul>
|
| 58 |
<li><uri link="#yabootconfig">Default: Using yabootconfig</uri></li>
|
| 59 |
<li>
|
| 60 |
<uri link="#manual_yaboot">Alternative: Manual yaBoot Configuration</uri>
|
| 61 |
</li>
|
| 62 |
</ul>
|
| 63 |
|
| 64 |
</body>
|
| 65 |
</subsection>
|
| 66 |
<subsection id="yabootconfig">
|
| 67 |
<title>Default: Using yabootconfig</title>
|
| 68 |
<body>
|
| 69 |
|
| 70 |
<p>
|
| 71 |
<c>yabootconfig</c> will auto-detect the partitions on your machine and will
|
| 72 |
setup dual and triple boot combinations with Linux, Mac OS, and Mac OS
|
| 73 |
X.
|
| 74 |
</p>
|
| 75 |
|
| 76 |
<p>
|
| 77 |
To use <c>yabootconfig</c>, your drive must have a bootstrap partition, and
|
| 78 |
<path>/etc/fstab</path> must be configured with your Linux partitions. Both of
|
| 79 |
these should have been done already in the steps above. To start, ensure that
|
| 80 |
you have the latest version of yaboot installed by running <c>emerge --update
|
| 81 |
yaboot-static</c>. This is necessary as the latest version will be available via
|
| 82 |
Portage, but it may not have made it into the stage files.
|
| 83 |
</p>
|
| 84 |
|
| 85 |
<pre caption = "Installing yaboot-static">
|
| 86 |
# <i>emerge --update yaboot-static</i>
|
| 87 |
</pre>
|
| 88 |
|
| 89 |
<p>
|
| 90 |
Now run <c>yabootconfig</c>. The program will run and it will confirm
|
| 91 |
the location of the bootstrap partition. Type <c>Y</c> if it is correct. If
|
| 92 |
not, double check <path>/etc/fstab</path>. yabootconfig will then scan your
|
| 93 |
system setup, create <path>/etc/yaboot.conf</path> and run <c>mkofboot</c> for
|
| 94 |
you. <c>mkofboot</c> is used to format the bootstrap partition, and install
|
| 95 |
the yaboot configuration file into it.
|
| 96 |
</p>
|
| 97 |
|
| 98 |
<p>
|
| 99 |
You might want to verify the contents of <path>/etc/yaboot.conf</path>. If
|
| 100 |
you make changes to <path>/etc/yaboot.conf</path> (like setting the
|
| 101 |
default/boot OS), make sure to rerun <c>ybin -v</c> to apply changes to the
|
| 102 |
bootstrap partition.
|
| 103 |
</p>
|
| 104 |
|
| 105 |
<p>
|
| 106 |
Now continue with <uri link="#reboot">Rebooting your System</uri>.
|
| 107 |
</p>
|
| 108 |
|
| 109 |
</body>
|
| 110 |
</subsection>
|
| 111 |
<subsection id="manual_yaboot">
|
| 112 |
<title>Alternative: Manual yaBoot Configuration</title>
|
| 113 |
<body>
|
| 114 |
|
| 115 |
<p>
|
| 116 |
First make sure you have the latest <c>yaboot-static</c> installed on your
|
| 117 |
system:
|
| 118 |
</p>
|
| 119 |
|
| 120 |
<pre caption = "Installing yaboot">
|
| 121 |
# <i>emerge --update yaboot-static</i>
|
| 122 |
</pre>
|
| 123 |
|
| 124 |
<p>
|
| 125 |
Below you find a completed <path>yaboot.conf</path> file. Alter it at
|
| 126 |
will.
|
| 127 |
</p>
|
| 128 |
|
| 129 |
<pre caption = "/etc/yaboot.conf">
|
| 130 |
<comment>## /etc/yaboot.conf
|
| 131 |
##
|
| 132 |
## run: "man yaboot.conf" for details. Do not make changes until you have!!
|
| 133 |
## see also: /usr/share/doc/yaboot/examples for example configurations.
|
| 134 |
##
|
| 135 |
## For a dual-boot menu, add one or more of:
|
| 136 |
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
|
| 137 |
|
| 138 |
## our bootstrap partition:</comment>
|
| 139 |
|
| 140 |
boot=/dev/sda2
|
| 141 |
|
| 142 |
<comment>## ofboot is the openfirmware way to specify the bootstrap partition.
|
| 143 |
## If this isn't defined, yaboot fails on the G5 (unless you pass the necessary
|
| 144 |
## arguments to the mkofboot/ybin program).
|
| 145 |
## hd:X means /dev/sdaX (or /dev/hdaX).
|
| 146 |
##
|
| 147 |
## G5 users should uncomment this line!!</comment>
|
| 148 |
|
| 149 |
ofboot=hd:2
|
| 150 |
|
| 151 |
<comment>##hd: is open firmware speak for sda</comment>
|
| 152 |
device=hd:
|
| 153 |
partition=4
|
| 154 |
|
| 155 |
delay=5
|
| 156 |
defaultos=macosx
|
| 157 |
timeout=30
|
| 158 |
install=/usr/lib/yaboot/yaboot
|
| 159 |
magicboot=/usr/lib/yaboot/ofboot
|
| 160 |
|
| 161 |
<comment>#################
|
| 162 |
## This section can be duplicated if you have more than one kernel or set of
|
| 163 |
## boot options
|
| 164 |
#################</comment>
|
| 165 |
image=/boot/kernel-2.6.7-gentoo-r8
|
| 166 |
label=Linux
|
| 167 |
root=/dev/sda4
|
| 168 |
sysmap=/boot/System.map-2.6.7
|
| 169 |
read-only
|
| 170 |
<comment>##################</comment>
|
| 171 |
|
| 172 |
macos=hd:5
|
| 173 |
macosx=hd:6
|
| 174 |
enablecdboot
|
| 175 |
enableofboot
|
| 176 |
</pre>
|
| 177 |
|
| 178 |
<p>
|
| 179 |
Once <path>yaboot.conf</path> is set up the way you want it, you run
|
| 180 |
<c>mkofboot -v</c> to install the settings in the bootstrap partition.
|
| 181 |
<e>Don't forget this!</e> If all goes well, and you have the same
|
| 182 |
options as the sample above, your next reboot will give you a simple,
|
| 183 |
five-entry boot menu. If you update your yaboot config later on, you'll
|
| 184 |
just need to run <c>ybin -v</c> to update the bootstrap partition -
|
| 185 |
<c>mkofboot</c> is for initial setup only.
|
| 186 |
</p>
|
| 187 |
|
| 188 |
<p>
|
| 189 |
For more information on yaboot, take a look at the <uri
|
| 190 |
link="http://penguinppc.org/projects/yaboot">yaboot project</uri>. For
|
| 191 |
now, continue the installation with <uri link="#reboot">Rebooting your
|
| 192 |
System</uri>.
|
| 193 |
</p>
|
| 194 |
|
| 195 |
</body>
|
| 196 |
</subsection>
|
| 197 |
</section>
|
| 198 |
<section id="yaboot-ibm">
|
| 199 |
<title>Using yaboot on IBM</title>
|
| 200 |
<body>
|
| 201 |
|
| 202 |
<p>
|
| 203 |
On IBM hardware you cannot run yabootconfig or ybin. You have to proceed
|
| 204 |
the folowing steps:
|
| 205 |
</p>
|
| 206 |
|
| 207 |
<ul>
|
| 208 |
<li>Install yaboot-static</li>
|
| 209 |
<li>Run 'dd if=/usr/lib/yaboot/yaboot.chrp of=/dev/sdXX' (fill in XX
|
| 210 |
with your disk and partition for the RPeP partition; this was in our
|
| 211 |
example /dev/sda1)</li>
|
| 212 |
<li>Next construct your own yaboot.conf file and place into /etc.
|
| 213 |
(Take a look at the config above or look into the man page of
|
| 214 |
yaboot.conf)</li>
|
| 215 |
<li>Assuming your boot device in OF is pointing to the harddrive you
|
| 216 |
prep boot partition is on then it'll just work, otherwise at IPL time,
|
| 217 |
go into the multiboot menu and set the boot device to the one with
|
| 218 |
your prep boot partition.</li>
|
| 219 |
<li>That's it!</li>
|
| 220 |
</ul>
|
| 221 |
|
| 222 |
</body>
|
| 223 |
</section>
|
| 224 |
<section id="rebooting">
|
| 225 |
<title>Rebooting the System</title>
|
| 226 |
<subsection>
|
| 227 |
<body>
|
| 228 |
|
| 229 |
<p>
|
| 230 |
Exit the chrooted environment and unmount all mounted partitions. Then type in
|
| 231 |
that one magical command you have been waiting for: <c>reboot</c>.
|
| 232 |
</p>
|
| 233 |
|
| 234 |
<pre caption="Exiting the chroot, unmounting all partitions and rebooting">
|
| 235 |
# <i>exit</i>
|
| 236 |
cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo</i>
|
| 237 |
cdimage ~# <i>reboot</i>
|
| 238 |
</pre>
|
| 239 |
|
| 240 |
<p>
|
| 241 |
Of course, don't forget to remove the bootable CD, otherwise the CD will be
|
| 242 |
booted again instead of your new Gentoo system.
|
| 243 |
</p>
|
| 244 |
|
| 245 |
<p>
|
| 246 |
Once rebooted in your Gentoo installation, finish up with <uri
|
| 247 |
link="?part=1&chap=11">Finalizing your Gentoo Installation</uri>.
|
| 248 |
</p>
|
| 249 |
|
| 250 |
</body>
|
| 251 |
</subsection>
|
| 252 |
</section>
|
| 253 |
|
| 254 |
</sections>
|