| … | |
… | |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-bootloader.xml,v 1.40 2006/11/13 09:56:55 nightmorph Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-bootloader.xml,v 1.41 2007/05/07 18:11:41 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>7.2</version> |
11 | <version>8.0</version> |
| 12 | <date>2006-11-13</date> |
12 | <date>2007-05-07</date> |
| 13 | |
13 | |
| 14 | <section> |
14 | <section> |
| 15 | <title>Choosing a Bootloader</title> |
15 | <title>Choosing a Bootloader</title> |
| 16 | <subsection> |
16 | <subsection> |
| 17 | <title>Introduction</title> |
17 | <title>Introduction</title> |
| … | |
… | |
| 26 | <p> |
26 | <p> |
| 27 | If you are using a NewWorld Apple or IBM machine, you need to use |
27 | If you are using a NewWorld Apple or IBM machine, you need to use |
| 28 | <uri link="#yaboot">yaboot</uri>. OldWorld Apple machines have two options, |
28 | <uri link="#yaboot">yaboot</uri>. OldWorld Apple machines have two options, |
| 29 | <uri link="#bootx">BootX</uri> (recommended) and <uri link="#quik">quik</uri>. |
29 | <uri link="#bootx">BootX</uri> (recommended) and <uri link="#quik">quik</uri>. |
| 30 | The Pegasos does not require a bootloader, but you will need to emerge |
30 | The Pegasos does not require a bootloader, but you will need to emerge |
| 31 | <uri link="#bootcreator">BootCreator</uri> to create SmartFirmware bootmenus. |
31 | <uri link="#bootcreator">bootcreator</uri> to create SmartFirmware boot menus. |
| 32 | </p> |
32 | </p> |
| 33 | |
33 | |
| 34 | </body> |
34 | </body> |
| 35 | </subsection> |
35 | </subsection> |
| 36 | </section> |
36 | </section> |
| … | |
… | |
| 70 | </p> |
70 | </p> |
| 71 | |
71 | |
| 72 | <note> |
72 | <note> |
| 73 | You will need to manually edit the yaboot.conf when using genkernel, even if |
73 | You will need to manually edit the yaboot.conf when using genkernel, even if |
| 74 | yabootconfig is used. The kernel image section of yaboot.conf should be |
74 | yabootconfig is used. The kernel image section of yaboot.conf should be |
| 75 | modified as follows: |
75 | modified as follows (using vmlinux and initrd as the name of kernel and |
|
|
76 | initrd image): |
| 76 | </note> |
77 | </note> |
| 77 | |
78 | |
| 78 | <pre caption="Adding genkernel boot arguments to yaboot.conf"> |
79 | <pre caption="Adding genkernel boot arguments to yaboot.conf"> |
| 79 | <comment>########################################################### |
80 | <comment>########################################################### |
| 80 | ## This section can be duplicated if you have more than one |
81 | ## This section can be duplicated if you have more than one |
| 81 | ## kernel or set of boot options - replace kernel-name |
82 | ## kernel or set of boot options - replace the image and initrd |
| 82 | ## and initrd-name with the exact filename of your kernel |
83 | ## with the exact filename of your kernel and initrd image. |
| 83 | ## and initrd image. |
|
|
| 84 | ###########################################################</comment> |
84 | ###########################################################</comment> |
| 85 | image=/boot/kernel-name |
85 | image=/boot/kenrel-genkernel-ppc-<keyval id="kernel-gentoo"/> |
| 86 | label=Linux |
86 | label=Linux |
| 87 | root=/dev/ram0 |
87 | root=/dev/ram0 |
| 88 | partition=3 |
88 | partition=3 |
| 89 | initrd=/boot/initrd-name |
89 | initrd=/boot/initramfs-genkernel-ppc-<keyval id="kernel-gentoo"/> |
| 90 | append="real_root=/dev/hda3 init=/linuxrc" |
|
|
| 91 | <comment># You can add additional kernel arguments to append such as |
90 | <comment># You can add additional kernel arguments to append such as |
| 92 | # rootdelay=10 for a USB/Firewire Boot</comment> |
91 | # rootdelay=10 for a USB/Firewire Boot</comment> |
|
|
92 | append="real_root=/dev/hda3 init=/linuxrc" |
| 93 | read-only |
93 | read-only |
| 94 | <comment>##########################################################</comment> |
94 | <comment>##########################################################</comment> |
| 95 | </pre> |
95 | </pre> |
| 96 | |
96 | |
| 97 | <ul> |
97 | <ul> |
| … | |
… | |
| 113 | </p> |
113 | </p> |
| 114 | |
114 | |
| 115 | <p> |
115 | <p> |
| 116 | To use <c>yabootconfig</c>, your drive must have an Apple_Bootstrap partition, |
116 | To use <c>yabootconfig</c>, your drive must have an Apple_Bootstrap partition, |
| 117 | and <path>/etc/fstab</path> must be configured to reflect your Linux |
117 | and <path>/etc/fstab</path> must be configured to reflect your Linux |
|
|
118 | partitions (note that the Bootstrap partition should <e>not</e> be in your |
| 118 | partitions. These steps should have already been completed before, but check |
119 | fstab). These steps should have already been completed before, but check |
| 119 | <path>/etc/fstab</path> before proceeding. Now, ensure that you have |
120 | <path>/etc/fstab</path> before proceeding. Now, install <c>yaboot</c>. |
| 120 | <c>yaboot</c> installed. |
|
|
| 121 | </p> |
121 | </p> |
| 122 | |
122 | |
| 123 | <pre caption = "Installing yaboot"> |
123 | <pre caption = "Installing yaboot"> |
| 124 | # <i>emerge yaboot</i> |
124 | # <i>emerge yaboot</i> |
| 125 | </pre> |
125 | </pre> |
| … | |
… | |
| 139 | # <i>chroot /mnt/gentoo /bin/bash</i> |
139 | # <i>chroot /mnt/gentoo /bin/bash</i> |
| 140 | # <i>/usr/sbin/env-update && source /etc/profile</i> |
140 | # <i>/usr/sbin/env-update && source /etc/profile</i> |
| 141 | </pre> |
141 | </pre> |
| 142 | |
142 | |
| 143 | <p> |
143 | <p> |
| 144 | You might want to verify the contents of <path>/etc/yaboot.conf</path>. If you |
144 | You should verify the contents of <path>/etc/yaboot.conf</path>. If you make |
| 145 | make changes to <path>/etc/yaboot.conf</path> (like setting the default/boot |
145 | changes to <path>/etc/yaboot.conf</path> (like setting the default/boot OS), |
| 146 | OS), make sure to rerun <c>ybin -v</c> to apply changes to the Apple_Bootstrap |
146 | make sure to rerun <c>ybin -v</c> to apply changes to the Apple_Bootstrap |
|
|
147 | partition. Whenever you make a change to yaboot.conf, like when testing a new |
|
|
148 | kernel, always remember to run <c>ybin -v</c> to update the bootstrap |
| 147 | partition. |
149 | partition. |
| 148 | </p> |
150 | </p> |
| 149 | |
151 | |
| 150 | <p> |
152 | <p> |
| 151 | Now continue with <uri link="#reboot">Rebooting the System</uri>. |
153 | Now continue with <uri link="#reboot">Rebooting the System</uri>. |
| … | |
… | |
| 156 | <subsection id="manual_yaboot"> |
158 | <subsection id="manual_yaboot"> |
| 157 | <title>Alternative: Manual yaboot Configuration</title> |
159 | <title>Alternative: Manual yaboot Configuration</title> |
| 158 | <body> |
160 | <body> |
| 159 | |
161 | |
| 160 | <p> |
162 | <p> |
| 161 | First make sure you have <c>yaboot</c> installed on your system: |
163 | First, install <c>yaboot</c> on your system: |
| 162 | </p> |
164 | </p> |
| 163 | |
165 | |
| 164 | <pre caption = "Installing yaboot with GRP"> |
166 | <pre caption="Installing yaboot"> |
| 165 | # <i>emerge --usepkg yaboot</i> |
167 | # <i>emerge yaboot</i> |
| 166 | </pre> |
168 | </pre> |
| 167 | |
169 | |
| 168 | <p> |
170 | <p> |
| 169 | An example <path>yaboot.conf</path> file is given below, but you will need to |
171 | An example <path>yaboot.conf</path> file is given below, but you will need to |
| 170 | alter it to fit your needs. G5 users and users booting from firewire and USB |
172 | alter it to fit your needs. G5 users and users booting from firewire and USB |
| … | |
… | |
| 213 | defaultos=macosx |
215 | defaultos=macosx |
| 214 | timeout=30 |
216 | timeout=30 |
| 215 | install=/usr/lib/yaboot/yaboot |
217 | install=/usr/lib/yaboot/yaboot |
| 216 | magicboot=/usr/lib/yaboot/ofboot |
218 | magicboot=/usr/lib/yaboot/ofboot |
| 217 | |
219 | |
| 218 | <comment>################# |
220 | <comment>############################################################ |
| 219 | ## This section can be duplicated if you have more than one kernel or set of |
221 | ## This section can be duplicated if you have more than one |
| 220 | ## boot options - replace kernel-name with your kernel-version |
222 | ## kernel or set of boot options - replace the image variable |
| 221 | #################</comment> |
223 | ## with the exact filename of your kernel. |
|
|
224 | ###########################################################</comment> |
| 222 | image=/boot/kernel-name |
225 | image=/boot/<keyval id="kernel-name"/> |
| 223 | label=Linux |
226 | label=Linux |
| 224 | root=/dev/hda3 |
227 | root=/dev/hda3 |
| 225 | partition=3 |
228 | partition=3 |
| 226 | <comment># append="rootdelay=10" # Required for booting USB/Firewire</comment> |
229 | <comment># append="rootdelay=10" # Required for booting USB/Firewire</comment> |
| 227 | read-only |
230 | read-only |
| 228 | <comment>################## |
231 | <comment>################## |
| 229 | |
232 | |
| 230 | ## G5 users and some G4 users should set |
233 | ## G5 users and some G4 users should set |
| 231 | ## macos=hd:13 |
234 | ## macos=hd:13/ |
| 232 | ## macosx=hd:12 |
235 | ## macosx=hd:12 |
| 233 | ## instead of the example values.</comment> |
236 | ## instead of the example values.</comment> |
| 234 | macos=/dev/hda13 |
237 | macos=/dev/hda13 |
| 235 | macosx=/dev/hda12 |
238 | macosx=/dev/hda12 |
| 236 | enablecdboot |
239 | enablecdboot |
| … | |
… | |
| 276 | |
279 | |
| 277 | <pre caption="Copying the kernel to the MacOS partition"> |
280 | <pre caption="Copying the kernel to the MacOS partition"> |
| 278 | # <i>exit</i> |
281 | # <i>exit</i> |
| 279 | cdimage ~# <i>mkdir /mnt/mac</i> |
282 | cdimage ~# <i>mkdir /mnt/mac</i> |
| 280 | cdimage ~# <i>mount /dev/sda6 /mnt/mac -t hfs</i> |
283 | cdimage ~# <i>mount /dev/sda6 /mnt/mac -t hfs</i> |
| 281 | cdimage ~# <i>cp /mnt/gentoo/usr/src/linux/vmlinux "/mnt/mac/System Folder/Linux Kernels"</i> |
284 | cdimage ~# <i>cp /mnt/gentoo/usr/src/linux/vmlinux "/mnt/mac/System Folder/Linux Kernels/<keyval id="kernel-name"/>"</i> |
| 282 | </pre> |
285 | </pre> |
| 283 | |
286 | |
| 284 | <p> |
287 | <p> |
| 285 | If genkernel is used, both the kernel and initrd will need to be copied to the |
288 | If genkernel is used, both the kernel and initrd will need to be copied to the |
| 286 | MacOS partition. |
289 | MacOS partition. |
| … | |
… | |
| 288 | |
291 | |
| 289 | <pre caption="Copying the Genkernel kernel and initrd to the MacOS partition"> |
292 | <pre caption="Copying the Genkernel kernel and initrd to the MacOS partition"> |
| 290 | # <i>exit</i> |
293 | # <i>exit</i> |
| 291 | cdimage ~# <i>mkdir /mnt/mac</i> |
294 | cdimage ~# <i>mkdir /mnt/mac</i> |
| 292 | cdimage ~# <i>mount /dev/sda6 /mnt/mac -t hfs</i> |
295 | cdimage ~# <i>mount /dev/sda6 /mnt/mac -t hfs</i> |
| 293 | cdimage ~# <i>cp /mnt/gentoo/boot/kernel-* "/mnt/mac/System Folder/Linux Kernels"</i> |
296 | cdimage ~# <i>cp /mnt/gentoo/boot/kernel-genkernel-ppc-<keyval id="kernel-gentoo"/> "/mnt/mac/System Folder/Linux Kernels"</i> |
| 294 | cdimage ~# <i>cp /mnt/gentoo/boot/initramfs-* "/mnt/mac/System Folder"</i> |
297 | cdimage ~# <i>cp /mnt/gentoo/boot/initramfs-genkernel-ppc-<keyval id="kernel-gentoo"/> "/mnt/mac/System Folder"</i> |
| 295 | </pre> |
298 | </pre> |
| 296 | |
299 | |
| 297 | <p> |
300 | <p> |
| 298 | Now that the kernel is copied over, we'll need to reboot to set up BootX. |
301 | Now that the kernel is copied over, we'll need to reboot to set up BootX. |
| 299 | </p> |
302 | </p> |
| … | |
… | |
| 357 | <pre caption="Emerge quik"> |
360 | <pre caption="Emerge quik"> |
| 358 | # <i>emerge quik</i> |
361 | # <i>emerge quik</i> |
| 359 | </pre> |
362 | </pre> |
| 360 | |
363 | |
| 361 | <p> |
364 | <p> |
| 362 | Next, we'll need to set it up. Edit /etc/quik.conf and set your image to the |
365 | Next, we'll need to set it up. Edit <path>/etc/quik.conf</path> and set your |
| 363 | kernel that we copied to your boot partition. |
366 | image to the kernel that we copied to your boot partition. |
| 364 | </p> |
367 | </p> |
| 365 | |
368 | |
| 366 | <pre caption="Configuring quik.conf"> |
369 | <pre caption="Configuring quik.conf"> |
| 367 | # Example of quik.conf |
370 | # Example of quik.conf |
| 368 | init-message = "Gentoo 2006.1\n" |
371 | init-message = "Gentoo 2007.0\n" |
| 369 | partition = 2 <comment># This is the boot partition</comment> |
372 | <comment># This is the boot partition</comment> |
|
|
373 | partition = 2 |
| 370 | root = /dev/hda4 |
374 | root = /dev/hda4 |
| 371 | timeout = 30 |
375 | timeout = 30 |
| 372 | default = gentoo |
376 | default = gentoo |
| 373 | image = /vmlinux <comment># This is your kernel</comment> |
377 | <comment># This is your kernel</comment> |
|
|
378 | image = /<keyval id="kernel-name"/> |
| 374 | label = gentoo |
379 | label = gentoo |
| 375 | </pre> |
380 | </pre> |
| 376 | |
381 | |
| 377 | <p> |
382 | <p> |
| 378 | Your quik.conf file <e>must</e> be on the same disk as the quik boot images, |
383 | Your quik.conf file <e>must</e> be on the same disk as the quik boot images, |
| 379 | however it can be on a different partition on the same disk, although it is |
384 | however it can be on a different partition on the same disk, although it is |
| … | |
… | |
| 396 | # <i>nvsetenv auto-boot true</i> <comment># Set to false if you want to boot into OF, not all models can display the OF output</comment> |
401 | # <i>nvsetenv auto-boot true</i> <comment># Set to false if you want to boot into OF, not all models can display the OF output</comment> |
| 397 | # <i>nvsetenv output-device video</i> <comment># Check the quirks page, there are many variations here</comment> |
402 | # <i>nvsetenv output-device video</i> <comment># Check the quirks page, there are many variations here</comment> |
| 398 | # <i>nvsetenv input-device kbd</i> |
403 | # <i>nvsetenv input-device kbd</i> |
| 399 | # <i>nvsetenv boot-device scsi/sd@1:0</i> <comment># For SCSI</comment> |
404 | # <i>nvsetenv boot-device scsi/sd@1:0</i> <comment># For SCSI</comment> |
| 400 | # <i>nvsetenv boot-device ata/ata-disk@0:0</i> <comment># For ATA</comment> |
405 | # <i>nvsetenv boot-device ata/ata-disk@0:0</i> <comment># For ATA</comment> |
| 401 | # <i>nvsetenv boot-file /boot/vmlinux-2.6.17 root=/dev/hda4</i> <comment>First item is the path to the kernel, the second is the root partition. You may append any kernel options to the end of this line.</comment> |
406 | # <i>nvsetenv boot-file /boot/<keyval id="kernel-name"/> root=/dev/hda4</i> <comment>First item is the path to the kernel, the second is the root partition. You may append any kernel options to the end of this line.</comment> |
| 402 | # <i>nvsetenv boot-command boot</i> <comment># Set this to bye for MacOS and boot for Linux</comment> |
407 | # <i>nvsetenv boot-command boot</i> <comment># Set this to bye for MacOS and boot for Linux</comment> |
| 403 | </pre> |
408 | </pre> |
| 404 | |
409 | |
| 405 | <note> |
410 | <note> |
| 406 | It is also possible to change your boot variables from MacOS. Depending |
411 | It is also possible to change your boot variables from MacOS. Depending upon |
| 407 | upon the model, either |
412 | the model, either <uri |
| 408 | <uri link="http://penguinppc.org/bootloaders/quik/BootVars.sit.hqx">bootvars</uri> or |
413 | link="http://penguinppc.org/bootloaders/quik/BootVars.sit.hqx">bootvars</uri> or |
|
|
414 | <uri |
| 409 | <uri link="ftp://ftp.apple.com/developer/macosxserver/utilities/SystemDisk2.3.1.smi.bin"> |
415 | link="ftp://ftp.apple.com/developer/macosxserver/utilities/SystemDisk2.3.1.smi.bin"> |
| 410 | Apple System Disk</uri> should be used. Please see the quik quirks page |
416 | Apple System Disk</uri> should be used. Please see the quik quirks page above |
| 411 | above for more information. |
417 | for more information. |
| 412 | </note> |
418 | </note> |
| 413 | |
419 | |
| 414 | <p> |
420 | <p> |
| 415 | Now that we've set up our machine to boot, we'll need to make sure the boot |
421 | Now that we've set up our machine to boot, we'll need to make sure the boot |
| 416 | images are installed correctly. Run <c>quik -v -C /boot/quik.conf</c>. It |
422 | images are installed correctly. Run <c>quik -v -C /boot/quik.conf</c>. It |
| … | |
… | |
| 443 | <p> |
449 | <p> |
| 444 | First make sure you have <c>bootcreator</c> installed on your system: |
450 | First make sure you have <c>bootcreator</c> installed on your system: |
| 445 | </p> |
451 | </p> |
| 446 | |
452 | |
| 447 | <pre caption = "Installing bootcreator"> |
453 | <pre caption = "Installing bootcreator"> |
| 448 | # <i>emerge --usepkg bootcreator</i> |
454 | # <i>emerge bootcreator</i> |
| 449 | </pre> |
455 | </pre> |
| 450 | |
456 | |
| 451 | <p> |
457 | <p> |
| 452 | Now copy the file <path>/etc/bootmenu.example</path> into |
458 | Now copy the file <path>/etc/bootmenu.example</path> into |
| 453 | <path>/etc/bootmenu</path> and edit it to suit your needs: |
459 | <path>/etc/bootmenu</path> and edit it to suit your needs: |
| … | |
… | |
| 457 | # <i>cp /etc/bootmenu.example /etc/bootmenu</i> |
463 | # <i>cp /etc/bootmenu.example /etc/bootmenu</i> |
| 458 | # <i>nano -w /etc/bootmenu</i> |
464 | # <i>nano -w /etc/bootmenu</i> |
| 459 | </pre> |
465 | </pre> |
| 460 | |
466 | |
| 461 | <p> |
467 | <p> |
| 462 | Below is a complete <path>/etc/bootmenu</path> config file. The kernel-name |
468 | Below is a complete <path>/etc/bootmenu</path> config file. vmlinux and |
| 463 | and initrd-name should be replaced by your kernel and initrd image names. |
469 | initrd should be replaced by your kernel and initrd image names. |
| 464 | </p> |
470 | </p> |
| 465 | |
471 | |
| 466 | <pre caption = "bootcreator config file"> |
472 | <pre caption = "bootcreator config file"> |
| 467 | <comment># |
473 | <comment># |
| 468 | # Example description file for bootcreator 1.1 |
474 | # Example description file for bootcreator 1.1 |
| … | |
… | |
| 483 | Local HD -> Morphos (Normal) |
489 | Local HD -> Morphos (Normal) |
| 484 | ide:0 boot2.img ramdebug edebugflags="logkprintf" |
490 | ide:0 boot2.img ramdebug edebugflags="logkprintf" |
| 485 | |
491 | |
| 486 | [SECTION] |
492 | [SECTION] |
| 487 | Local HD -> Linux (Normal) |
493 | Local HD -> Linux (Normal) |
| 488 | ide:0 kernel-name video=radeonfb:1024x768@70 root=/dev/hda3 |
494 | ide:0 <keyval id="kernel-name"/> video=radeonfb:1024x768@70 root=/dev/hda3 |
| 489 | |
495 | |
| 490 | [SECTION] |
496 | [SECTION] |
| 491 | Local HD -> Genkernel (Normal) |
497 | Local HD -> Genkernel (Normal) |
| 492 | ide:0 kernel-name root=/dev/ram0 real_root=/dev/hda3 init=/linuxrc initrd=initrd-name |
498 | ide:0 kernel-genkernel-ppc-<keyval id="kernel-gentoo"/> root=/dev/ram0 real_root=/dev/hda3 init=/linuxrc initrd=initramfs-genkernel-ppc<keyval id="kernel-gentoo"/> |
| 493 | </pre> |
499 | </pre> |
| 494 | |
500 | |
| 495 | <p> |
501 | <p> |
| 496 | Finally the <path>bootmenu</path> must be transfered into Forth and copied to |
502 | Finally the <path>bootmenu</path> must be transferred into Forth and copied to |
| 497 | your boot partition, so that the SmartFirmware can read it. Therefore you have |
503 | your boot partition, so that the SmartFirmware can read it. Therefore you have |
| 498 | to call <c>bootcreator</c>: |
504 | to call <c>bootcreator</c>: |
| 499 | </p> |
505 | </p> |
| 500 | |
506 | |
| 501 | <pre caption = "Install the bootmenu"> |
507 | <pre caption = "Install the bootmenu"> |