/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ppc64-bootloader.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-ppc64-bootloader.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.33 - (show annotations) (download) (as text)
Sun Aug 17 16:38:13 2014 UTC (4 weeks, 5 days ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.32: +4 -4 lines
File MIME type: application/xml
Fix bugs #519554 and #519488 - Update umount instructions

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/2.5 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc64-bootloader.xml,v 1.32 2014/04/12 06:05:57 swift Exp $ -->
8
9 <sections>
10
11 <abstract>
12 In this chapter we'll describe how to configure a bootloader to our
13 needs.
14 </abstract>
15
16 <version>13</version>
17 <date>2014-08-17</date>
18
19 <section>
20 <title>Making your Choice</title>
21 <subsection>
22 <title>Introduction</title>
23 <body>
24
25 <p>
26 Now that your kernel is configured and compiled and the necessary system
27 configuration files are filled in correctly, it is time to install a
28 program that will fire up your kernel when you start the system. Such a
29 program is called a <e>bootloader</e>.
30 </p>
31
32 <p>
33 On Linux/PPC64 we have yaBoot as a bootloader.
34 </p>
35
36 </body>
37 </subsection>
38 </section>
39 <section id="yaboot">
40 <title>Using yaBoot</title>
41 <subsection>
42 <title>Introduction</title>
43 <body>
44
45 <impo>
46 If you are using a 64-bit userland, you must use the <c>yaboot-static</c>
47 package because yaboot cannot be compiled as a 64-bit application. The 32-bit
48 userlands should use the regular <c>yaboot</c> package.
49 </impo>
50
51 <p>
52 There are two ways to configure yaBoot for your system. You can use the new and
53 improved <c>yabootconfig</c> included with <path>yaboot-1.3.8-r1</path> and
54 later to automatically set up yaboot. If for some reason you do not want to run
55 <c>yabootconfig</c> to automatically set up <path>/etc/yaboot.conf</path> or you
56 are installing Gentoo on a G5 (on which <c>yabootconfig</c> does not always
57 work), you can just edit the sample file already installed on your system.
58 </p>
59
60 <impo>
61 yabootconfig/ybin won't work on IBM. You have to install yaboot another way:
62 <uri link="#yaboot-ibm">Using yaboot on IBM hardware</uri>
63 </impo>
64
65 <note>
66 If your root filesystem uses the JFS filesystem, be sure to add <c>ro</c> as a
67 kernel parameter. JFS must be able to replay its log in read-only mode before it
68 gets mounted read-write.
69 </note>
70
71 <ul>
72 <li><uri link="#yabootconfig">Default: Using yabootconfig</uri></li>
73 <li>
74 <uri link="#manual_yaboot">Alternative: Manual yaBoot Configuration</uri>
75 </li>
76 </ul>
77
78 </body>
79 </subsection>
80 <subsection id="yabootconfig">
81 <title>Default: Using yabootconfig</title>
82 <body>
83
84 <p>
85 <c>yabootconfig</c> will auto-detect the partitions on your machine and will
86 set up dual and triple boot combinations with Linux, Mac OS, and Mac OS
87 X.
88 </p>
89
90 <p>
91 To use <c>yabootconfig</c>, your drive must have a bootstrap partition, and
92 <path>/etc/fstab</path> must be configured with your Linux partitions. Both of
93 these should have been done already in the steps above. To start, ensure that
94 you have the latest version of yaboot installed by running <c>emerge --update
95 yaboot-static</c>. This is necessary as the latest version will be available via
96 Portage, but it may not have made it into the stage files.
97 </p>
98
99 <pre caption = "Installing yaboot-static">
100 <comment>(For 64-bit users)</comment>
101 # <i>emerge --update yaboot-static</i>
102
103 <comment>(For 32-bit users)</comment>
104 # <i>emerge yaboot</i>
105 </pre>
106
107 <p>
108 Now run <c>yabootconfig</c>. The program will run and it will confirm the
109 location of the bootstrap partition. Type <c>Y</c> if it is correct. If not,
110 double check <path>/etc/fstab</path>. yabootconfig will then scan your system
111 setup, create <path>/etc/yaboot.conf</path> and run <c>mkofboot</c> for you.
112 <c>mkofboot</c> is used to format the bootstrap partition, and install the
113 yaboot configuration file into it.
114 </p>
115
116 <p>
117 You might want to verify the contents of <path>/etc/yaboot.conf</path>. If you
118 make changes to <path>/etc/yaboot.conf</path> (like setting the default/boot
119 OS), make sure to rerun <c>ybin -v</c> to apply changes to the bootstrap
120 partition.
121 </p>
122
123 <p>
124 Now continue with <uri link="#reboot">Rebooting your System</uri>.
125 </p>
126
127 </body>
128 </subsection>
129 <subsection id="manual_yaboot">
130 <title>Alternative: Manual yaBoot Configuration</title>
131 <body>
132
133 <p>
134 First make sure you have the latest <c>yaboot-static</c> installed on your
135 system:
136 </p>
137
138 <pre caption = "Installing yaboot">
139 <comment>(For 64-bit users)</comment>
140 # <i>emerge --update yaboot-static</i>
141
142 <comment>(For 32-bit users)</comment>
143 # <i>emerge yaboot</i>
144 </pre>
145
146 <p>
147 Below you find a completed <path>yaboot.conf</path> file. Alter it at
148 will.
149 </p>
150
151 <pre caption = "/etc/yaboot.conf">
152 <comment>## /etc/yaboot.conf
153 ##
154 ## run: "man yaboot.conf" for details. Do not make changes until you have!!
155 ## see also: /usr/share/doc/yaboot/examples for example configurations.
156 ##
157 ## For a dual-boot menu, add one or more of:
158 ## bsd=/dev/sdaX, macos=/dev/sdaY, macosx=/dev/sdaZ
159
160 ## our bootstrap partition:</comment>
161
162 boot=/dev/sda2
163
164 <comment>## ofboot is the Open Firmware way to specify the bootstrap partition.
165 ## If this isn't defined, yaboot fails on the G5 and some G4s (unless
166 ## you pass the necessary arguments to the mkofboot/ybin program).
167 ## hd:X means /dev/sdaX.</comment>
168
169 ofboot=hd:2
170
171 <comment>## hd: is Open Firmware speak for sda</comment>
172 device=hd:
173
174 delay=5
175 defaultos=macosx
176 timeout=30
177 install=/usr/lib/yaboot/yaboot
178 magicboot=/usr/lib/yaboot/ofboot
179
180 <comment>#################
181 ## This section can be duplicated if you have more than one kernel or set of
182 ## boot options - replace <keyval id="kernel-name"/> with your kernel
183 #################</comment>
184 image=/boot/<keyval id="kernel-name"/>
185 label=Linux
186 root=/dev/sda3
187 partition=3
188 read-only
189
190 macos=hd:13
191 macosx=hd:12
192 enablecdboot
193 enableofboot
194 </pre>
195
196 <p>
197 Once <path>yaboot.conf</path> is set up the way you want it, you run <c>mkofboot
198 -v</c> to install the settings in the bootstrap partition. <e>Don't forget
199 this!</e> Confirm when <c>mkofboot</c> asks you to create a new filesystem.
200 </p>
201
202 <p>
203 If all goes well, and you have the same options as the sample above, your next
204 reboot will give you a simple, five-entry boot menu. If you update your yaboot
205 config later on, you'll just need to run <c>ybin -v</c> to update the bootstrap
206 partition - <c>mkofboot</c> is for initial setup only.
207 </p>
208
209 <p>
210 For more information on yaboot, take a look at the <uri
211 link="http://penguinppc.org/projects/yaboot">yaboot project</uri>. For now,
212 continue the installation with <uri link="#reboot">Rebooting your System</uri>.
213 </p>
214
215 </body>
216 </subsection>
217 </section>
218 <section id="yaboot-ibm">
219 <title>Using yaboot on IBM hardware</title>
220 <body>
221
222 <p>
223 On IBM hardware you cannot run <c>yabootconfig</c> or <c>ybin</c>. You must
224 proceed with the following steps:
225 </p>
226
227 <ul>
228 <li>Install yaboot-static</li>
229 <li>
230 Run <c>dd if=/usr/lib/yaboot/yaboot.chrp of=/dev/sdXX</c> (fill in XX with
231 your disk and partition for the PReP partition; this was in our example
232 <path>/dev/sda1</path>)
233 </li>
234 <li>
235 Next construct your own <path>yaboot.conf</path> file and place into
236 <path>/etc</path>. (Take a look at the config above, look into the man page
237 of yaboot.conf or look at the below <path>yaboot.conf</path> example.)
238 </li>
239 <li>
240 Assuming your boot device in OF is pointing to the harddrive you prep boot
241 partition is on then it'll just work, otherwise at IPL time, go into the
242 multiboot menu and set the boot device to the one with your prep boot
243 partition
244 </li>
245 <li>That's it!</li>
246 </ul>
247
248 <pre caption="yaboot.conf for IBM hardware">
249 device=disk:
250 partition=2
251 root=/dev/sda2
252 default=linux
253 timeout=50
254
255 image=/boot/<keyval id="kernel-name"/>
256 label=linux
257 append="console=ttyS0,9600"
258 read-only
259 </pre>
260
261 <p>
262 For POWER4, POWER5, and blade-based hardware where the PReP disk partition and
263 the disk partition that contains your kernel are on the same physical disk, you
264 can use a simplified <path>yaboot.conf</path>. The following should be
265 sufficient:
266 </p>
267
268 <pre caption="yaboot.conf for PReP hardware">
269 default = linux
270 timeout = 100
271 image=/boot/<keyval id="kernel-name"/>
272 label=linux
273 read-only
274 root = /dev/sda2
275 append="root=/dev/sda2"
276 </pre>
277
278 <p>
279 To verify that yaboot has been copied to the PReP partition:
280 </p>
281
282 <pre caption="Verifying the yaboot install on PReP">
283 # <i>dd if=/dev/sda1 count=10 | grep ELF</i>
284 Binary file (standard input) matches
285 10+0 records in
286 10+0 records out
287 </pre>
288
289 <p>
290 A match signifies that yaboot was installed correctly.
291 </p>
292
293 </body>
294 </section>
295 <section id="reboot">
296 <title>Rebooting the System</title>
297 <subsection>
298 <body>
299
300 <p>
301 Exit the chrooted environment and unmount all mounted partitions. Then type in
302 that one magical command you have been waiting for: <c>reboot</c>.
303 </p>
304
305 <pre caption="Exiting the chroot, unmounting all partitions and rebooting">
306 # <i>exit</i>
307 ~# <i>cd</i>
308 ~# <i>umount -l /mnt/gentoo/dev{/shm,/pts,}</i>
309 ~# <i>umount /mnt/gentoo{/proc,/boot,/sys}</i>
310 ~# <i>reboot</i>
311 </pre>
312
313 <p>
314 Of course, don't forget to remove the bootable CD, otherwise the CD will be
315 booted again instead of your new Gentoo system.
316 </p>
317
318 <p>
319 Once rebooted in your Gentoo installation, finish up with <uri
320 link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>.
321 </p>
322
323 </body>
324 </subsection>
325 </section>
326
327 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20