/[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.31 - (hide annotations) (download) (as text)
Mon May 9 19:47:22 2011 UTC (3 years, 6 months ago) by nightmorph
Branch: MAIN
Changes since 1.30: +5 -4 lines
File MIME type: application/xml
update  handbooks for lazy unmount, bug 361561, thanks to swift for the patches

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

  ViewVC Help
Powered by ViewVC 1.1.20