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

Diff of /xml/htdocs/doc/en/handbook/hb-install-ppc-bootloader.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.36 Revision 1.37
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.36 2006/07/25 18:01:45 josejx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ppc-bootloader.xml,v 1.37 2006/08/30 22:52:28 nightmorph Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>2.11</version> 11<version>7.0</version>
12<date>2006-07-25</date> 12<date>2006-08-30</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>
18<body> 18<body>
19 19
20<p> 20<p>
21Now that the kernel is configured and compiled, you'll need a <e>bootloader</e> 21Now that the kernel is configured and compiled, you'll need a <e>bootloader</e>
22to start your new Linux installation. The <e>bootloader</e> that you use will 22to start your new linux installation. The <e>bootloader</e> that you use will
23depend upon the type of PPC machine you have. 23depend upon the type of PPC machine you have.
24</p> 24</p>
25 25
26<p> 26<p>
27If you are using a NewWorld Apple or IBM machine, you need to use 27If you are using a NewWorld Apple or IBM machine, you need to use
39<subsection> 39<subsection>
40<title>Introduction</title> 40<title>Introduction</title>
41<body> 41<body>
42 42
43<impo> 43<impo>
44yaboot can only be used on NewWorld Apple or IBM machines! 44yaboot can only be used on NewWorld Apple and IBM systems!
45</impo> 45</impo>
46 46
47<p> 47<p>
48In order to find the boot devices, yaboot needs access to the device nodes 48In order to find the boot devices, yaboot needs access to the device nodes
49created by udev on startup and the sysfs filesystem. These two filesystems 49created by udev on startup and the sysfs filesystem. These two filesystems
50are found at <path>/dev</path> and <path>sys</path> respectively. To do this, 50are found at <path>/dev</path> and <path>sys</path> respectively. To do this,
51you will need to "bind mount" these filesystems from the Installation CD's root 51you will need to "bind mount" these filesystems from the Installation CD's root
52to the <path>/dev</path> and <path>/sys</path> mount points inside the chroot. 52to the <path>/dev</path> and <path>/sys</path> mount points inside the chroot.
53If you have already bind mounted these filesystems, there is no need to do it 53If you have already bind mounted these filesystems, there is no need to do it
54again. 54again.
55</p> 55</p>
56 56
57<pre caption="Bind-mounting the device and sysfs filesystems"> 57<pre caption="Bind-mounting the device and sysfs filesystems">
58# <i>exit </i> # this will exit the chroot 58# <i>exit </i> # this will exit the chroot
59# <i>mount -o bind /dev /mnt/gentoo/dev</i> 59# <i>mount -o bind /dev /mnt/gentoo/dev</i>
60# <i>mount -o bind /sys /mnt/gentoo/sys</i> 60# <i>mount -o bind /sys /mnt/gentoo/sys</i>
61# <i>chroot /mnt/gentoo /bin/bash</i> 61# <i>chroot /mnt/gentoo /bin/bash</i>
76</note> 76</note>
77 77
78<pre caption="Adding genkernel boot arguments to yaboot.conf"> 78<pre caption="Adding genkernel boot arguments to yaboot.conf">
79<comment>########################################################### 79<comment>###########################################################
80## This section can be duplicated if you have more than one 80## This section can be duplicated if you have more than one
81## kernel or set of boot options - replace kernel-2.6.15 81## kernel or set of boot options - replace kernel-name
82## with the exact filename of your kernel. 82## and initrd-name with the exact filename of your kernel
83## and initrd image.
83###########################################################</comment> 84###########################################################</comment>
84image=/boot/kernel-2.6.15 85image=/boot/kernel-name
85 label=Linux 86 label=Linux
86 root=/dev/ram0 87 root=/dev/ram0
87 partition=3 88 partition=3
89 initrd=/boot/initrd-name
88 append="real_root=/dev/hda3 init=/linuxrc" 90 append="real_root=/dev/hda3 init=/linuxrc"
89 <comment># You can add additional kernel arguments to be appended such as 91 <comment># You can add additional kernel arguments to append such as
90 # rootdelay=10 for a USB/Firewire Boot</comment> 92 # rootdelay=10 for a USB/Firewire Boot</comment>
91 read-only 93 read-only
92<comment>##########################################################</comment> 94<comment>##########################################################</comment>
93</pre> 95</pre>
94 96
107 109
108<p> 110<p>
109<c>yabootconfig</c> will auto-detect the partitions on your machine and will 111<c>yabootconfig</c> will auto-detect the partitions on your machine and will
110set up dual and triple boot combinations with Linux, Mac OS, and Mac OS X. 112set up dual and triple boot combinations with Linux, Mac OS, and Mac OS X.
111</p> 113</p>
112 114
113<p> 115<p>
114To use <c>yabootconfig</c>, your drive must have an Apple_Bootstrap partition, 116To use <c>yabootconfig</c>, your drive must have an Apple_Bootstrap partition,
115and <path>/etc/fstab</path> must be configured to reflect your Linux 117and <path>/etc/fstab</path> must be configured to reflect your Linux
116partitions. These steps should have already been completed before, but check 118partitions. These steps should have already been completed before, but check
117<path>/etc/fstab</path> before proceeding. Now, ensure that you have 119<path>/etc/fstab</path> before proceeding. Now, ensure that you have
118<c>yaboot</c> installed. 120<c>yaboot</c> installed.
119</p> 121</p>
120 122
121<pre caption = "Installing yaboot"> 123<pre caption = "Installing yaboot with GRP">
122# <i>emerge yaboot</i> 124# <i>emerge yaboot</i>
123</pre> 125</pre>
124 126
125<p> 127<p>
126Now exit the chroot and run <c>yabootconfig --chroot /mnt/gentoo</c>. First, 128Now exit the chroot and run <c>yabootconfig --chroot /mnt/gentoo</c>. First,
127the program will confirm the location of the bootstrap partition. If you are 129the program will confirm the location of the bootstrap partition. If you are
128using the suggested disk partitioning scheme, your bootstrap partition should 130using the suggested disk partitioning scheme, your bootstrap partition should
129be /dev/hda2. Type <c>Y</c> if the output is correct. If not, double check your 131be /dev/hda2. Type <c>Y</c> if the output is correct. If not, double check your
137# <i>chroot /mnt/gentoo /bin/bash</i> 139# <i>chroot /mnt/gentoo /bin/bash</i>
138# <i>/usr/sbin/env-update &amp;&amp; source /etc/profile</i> 140# <i>/usr/sbin/env-update &amp;&amp; source /etc/profile</i>
139</pre> 141</pre>
140 142
141<p> 143<p>
142You may want to verify the contents of <path>/etc/yaboot.conf</path>. If you 144You might want to verify the contents of <path>/etc/yaboot.conf</path>. If you
143make changes to <path>/etc/yaboot.conf</path> (like setting the default/boot 145make changes to <path>/etc/yaboot.conf</path> (like setting the default/boot
144OS), make sure to rerun <c>ybin -v</c> to apply changes to the Apple_Bootstrap 146OS), make sure to rerun <c>ybin -v</c> to apply changes to the Apple_Bootstrap
145partition. 147partition.
146</p> 148</p>
147 149
154<subsection id="manual_yaboot"> 156<subsection id="manual_yaboot">
155<title>Alternative: Manual yaboot Configuration</title> 157<title>Alternative: Manual yaboot Configuration</title>
156<body> 158<body>
157 159
158<p> 160<p>
159First, make sure you have <c>yaboot</c> installed. 161First make sure you have <c>yaboot</c> installed on your system:
160</p> 162</p>
161 163
162<pre caption = "Installing yaboot"> 164<pre caption = "Installing yaboot with GRP">
163# <i>emerge yaboot</i> 165# <i>emerge --usepkg yaboot</i>
164</pre> 166</pre>
165 167
166<p> 168<p>
167An example <path>yaboot.conf</path> file is given below, but you will need to 169An example <path>yaboot.conf</path> file is given below, but you will need to
168alter it to fit your needs. G5 users and users booting from firewire and USB 170alter it to fit your needs. G5 users and users booting from firewire and USB
177## see also: /usr/share/doc/yaboot/examples for example configurations. 179## see also: /usr/share/doc/yaboot/examples for example configurations.
178## 180##
179## For a dual-boot menu, add one or more of: 181## For a dual-boot menu, add one or more of:
180## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ 182## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
181 183
182## our bootstrap partition:</comment> 184## The bootstrap partition:</comment>
183 185
184boot=/dev/hda2 186boot=/dev/hda2
185 187
186<comment>## ofboot is the openfirmware way to specify the bootstrap partition. 188<comment>## ofboot is the openfirmware way to specify the bootstrap partition.
187## If this isn't defined, yaboot fails on the G5 and some G4s (unless 189## If this isn't defined, yaboot fails on the G5 and some G4s (unless
188## you pass the necessary arguments to the mkofboot/ybin program). 190## you pass the necessary arguments to the mkofboot/ybin program).
189## hd:X means /dev/sdaX (or /dev/hdaX). 191## hd:X means /dev/sdaX (or /dev/hdaX).
190## 192##
191## G5 users should uncomment this line!! 193## G5 users should uncomment this line!!
194
192#ofboot=hd:2 195#ofboot=hd:2
193 196
194## Users booting from firewire should use something like this line: 197## Users booting from firewire should use something like this line:
195# ofboot=fw/node/sbp-2/disk@0: 198# ofboot=fw/node/sbp-2/disk@0:
196 199
212install=/usr/lib/yaboot/yaboot 215install=/usr/lib/yaboot/yaboot
213magicboot=/usr/lib/yaboot/ofboot 216magicboot=/usr/lib/yaboot/ofboot
214 217
215<comment>################# 218<comment>#################
216## This section can be duplicated if you have more than one kernel or set of 219## This section can be duplicated if you have more than one kernel or set of
217## boot options - replace 2.6.9 with your kernel-version 220## boot options - replace kernel-name with your kernel-version
218#################</comment> 221#################</comment>
219image=/boot/kernel-2.6.9 222image=/boot/kernel-name
220 label=Linux 223 label=Linux
221 root=/dev/hda3 224 root=/dev/hda3
222 partition=3 225 partition=3
223<comment># append="rootdelay=10" # Required for booting USB/Firewire</comment> 226<comment># append="rootdelay=10" # Required for booting USB/Firewire</comment>
224 read-only 227 read-only
291Now that the kernel is copied over, we'll need to reboot to set up BootX. 294Now that the kernel is copied over, we'll need to reboot to set up BootX.
292</p> 295</p>
293 296
294<pre caption="Unmounting all partitions and rebooting"> 297<pre caption="Unmounting all partitions and rebooting">
295cdimage ~# <i>cd /</i> 298cdimage ~# <i>cd /</i>
296cdimage ~# <i>umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo /mnt/mac</i> 299cdimage ~# <i>umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo/sys /mnt/gentoo /mnt/mac</i>
297cdimage ~# <i>reboot</i> 300cdimage ~# <i>reboot</i>
298</pre> 301</pre>
299 302
300<p> 303<p>
301Of course, don't forget to remove all bootable media, since MacOS needs to boot 304Of course, don't forget to remove the bootable CD, otherwise the CD will be
302this time. 305booted again instead of MacOS.
303</p> 306</p>
304 307
305<p> 308<p>
306Once the machine has booted into MacOS, open the BootX control panel. If you're 309Once the machine has booted into MacOS, open the BootX control panel. If you're
307not using genkernel, select <c>Options</c> and uncheck <c>Use specified RAM 310not using genkernel, select <c>Options</c> and uncheck <c>Use specified RAM
311Fill these in with the appropriate values. Depending upon the kernel 314Fill these in with the appropriate values. Depending upon the kernel
312configuration, additional boot arguments may need to be applied. 315configuration, additional boot arguments may need to be applied.
313</p> 316</p>
314 317
315<p> 318<p>
316BootX can be configured to start Linux upon boot. If you chose to do this, the 319BootX can be configured to start Linux upon boot. If you do this, you will first
317computer will boot into MacOS and then, during startup, load BootX which in turn 320see your machine boot into MacOS then, during startup, BootX will load and start
318starts Linux. See the <uri link="http://penguinppc.org/bootloaders/bootx/"> 321Linux. See the <uri link="http://penguinppc.org/bootloaders/bootx/">BootX home
319BootX home page</uri> for more information. 322page</uri> for more information.
320</p> 323</p>
321 324
322<impo> 325<impo>
323Make sure that you have support for HFS and HFS+ filesystems in your kernel, 326Make sure that you have support for HFS and HFS+ filesystems in your kernel,
324otherwise you will not be able to upgrade or change the kernel on your MacOS 327otherwise you will not be able to upgrade or change the kernel on your MacOS
356kernel that we copied to your boot partition. 359kernel that we copied to your boot partition.
357</p> 360</p>
358 361
359<pre caption="Configuring quik.conf"> 362<pre caption="Configuring quik.conf">
360# Example of quik.conf 363# Example of quik.conf
361init-message = "Gentoo 2006.0\n" 364init-message = "Gentoo 2006.1\n"
362partition = 2 <comment># This is the boot partition</comment> 365partition = 2 <comment># This is the boot partition</comment>
363root = /dev/hda4 366root = /dev/hda4
364timeout = 30 367timeout = 30
365default = gentoo 368default = gentoo
366image = /vmlinux-2.6.15 369image = /vmlinux <comment># This is your kernel</comment>
367 label = gentoo 370 label = gentoo
368</pre> 371</pre>
369 372
370<p> 373<p>
371Your quik.conf file <e>must</e> be on the same disk as the quik boot images, 374Your quik.conf file <e>must</e> be on the same disk as the quik boot images,
389# <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> 392# <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>
390# <i>nvsetenv output-device video</i> <comment># Check the quirks page, there are many variations here</comment> 393# <i>nvsetenv output-device video</i> <comment># Check the quirks page, there are many variations here</comment>
391# <i>nvsetenv input-device kbd</i> 394# <i>nvsetenv input-device kbd</i>
392# <i>nvsetenv boot-device scsi/sd@1:0</i> <comment># For SCSI</comment> 395# <i>nvsetenv boot-device scsi/sd@1:0</i> <comment># For SCSI</comment>
393# <i>nvsetenv boot-device ata/ata-disk@0:0</i> <comment># For ATA</comment> 396# <i>nvsetenv boot-device ata/ata-disk@0:0</i> <comment># For ATA</comment>
394# <i>nvsetenv boot-file /boot/vmlinux-2.6.15 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> 397# <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>
395# <i>nvsetenv boot-command boot</i> <comment># Set this to bye for MacOS and boot for Linux</comment> 398# <i>nvsetenv boot-command boot</i> <comment># Set this to bye for MacOS and boot for Linux</comment>
396</pre> 399</pre>
397 400
398<note> 401<note>
399It is also possible to change your boot variables from MacOS. Depending 402It is also possible to change your boot variables from MacOS. Depending
427<section id="bootcreator"> 430<section id="bootcreator">
428<title>Alternative: BootCreator</title> 431<title>Alternative: BootCreator</title>
429<body> 432<body>
430 433
431<impo> 434<impo>
432BootCreator will build a SmartFirmware boot menu written in Forth for the 435BootCreator will build a nice SmartFirmware bootmenu written in Forth for the
433Pegasos. 436Pegasos.
434</impo> 437</impo>
435 438
436<p> 439<p>
437First, ensure that you have <c>bootcreator</c> installed on your system: 440First make sure you have <c>bootcreator</c> installed on your system:
438</p> 441</p>
439 442
440<pre caption = "Installing bootcreator"> 443<pre caption = "Installing bootcreator">
441# <i>emerge bootcreator</i> 444# <i>emerge --usepkg bootcreator</i>
442</pre> 445</pre>
443 446
444<p> 447<p>
445Now copy the file <path>/etc/bootmenu.example</path> into 448Now copy the file <path>/etc/bootmenu.example</path> into
446<path>/etc/bootmenu</path> and edit it to suit your needs: 449<path>/etc/bootmenu</path> and edit it to suit your needs:
450# <i>cp /etc/bootmenu.example /etc/bootmenu</i> 453# <i>cp /etc/bootmenu.example /etc/bootmenu</i>
451# <i>nano -w /etc/bootmenu</i> 454# <i>nano -w /etc/bootmenu</i>
452</pre> 455</pre>
453 456
454<p> 457<p>
455An example <path>/etc/bootmenu</path> config file is included below. 458Below is a complete <path>/etc/bootmenu</path> config file. The kernel-name
459and initrd-name should be replaced by your kernel and initrd image names.
456</p> 460</p>
457 461
458<pre caption = "bootcreator config file"> 462<pre caption = "bootcreator config file">
459<comment># 463<comment>#
460# Example description file for bootcreator 1.1 464# Example description file for bootcreator 1.1
474[SECTION] 478[SECTION]
475Local HD -> Morphos (Normal) 479Local HD -> Morphos (Normal)
476ide:0 boot2.img ramdebug edebugflags="logkprintf" 480ide:0 boot2.img ramdebug edebugflags="logkprintf"
477 481
478[SECTION] 482[SECTION]
479Local HD -> Linux 2.6.15 (Normal) 483Local HD -> Linux (Normal)
480ide:0 linux-2.6.15 video=radeonfb:1024x768@70 root=/dev/hda3 484ide:0 kernel-name video=radeonfb:1024x768@70 root=/dev/hda3
481 485
482[SECTION] 486[SECTION]
483Local HD -> Genkernel (Normal) 487Local HD -> Genkernel (Normal)
484ide:0 kernelz-2.6.15 root=/dev/ram0 real_root=/dev/hda3 init=/linuxrc 488ide:0 kernel-name root=/dev/ram0 real_root=/dev/hda3 init=/linuxrc initrd=initrd-name
485</pre> 489</pre>
486 490
487<p> 491<p>
488Finally, the <path>bootmenu</path> must be transformed into Forth and copied to 492Finally the <path>bootmenu</path> must be transfered into Forth and copied to
489your boot partition so the SmartFirmware can read it. To do this, start 493your boot partition, so that the SmartFirmware can read it. Therefore you have
490<c>bootcreator</c>: 494to call <c>bootcreator</c>:
491</p> 495</p>
492 496
493<pre caption = "Install the bootmenu"> 497<pre caption = "Install the bootmenu">
494# <i>bootcreator /etc/bootmenu /boot/menu</i> 498# <i>bootcreator /etc/bootmenu /boot/menu</i>
495</pre> 499</pre>
496 500
497<note> 501<note>
498Be sure to check the SmartFirmware's settings when you reboot, and ensure that 502Be sure to have a look into the SmartFirmware's settings when you reboot, that
499<path>menu</path> is the file that will be loaded by default. 503<path>menu</path> is the file that will be loaded by default.
500</note> 504</note>
501 505
502<p> 506<p>
503Now, continue the installation with 507For now, continue the installation with <uri link="#reboot">Rebooting the
504<uri link="#reboot">Rebooting the System</uri>. 508System</uri>.
505</p> 509</p>
506 510
507</body> 511</body>
508</section> 512</section>
509<section id="reboot"> 513<section id="reboot">
510<title>Rebooting the System</title> 514<title>Rebooting the System</title>
511<subsection> 515<subsection>
512<body> 516<body>
513 517
514<p> 518<p>
515Exit the chrooted environment and unmount all mounted partitions so we can 519Exit the chrooted environment and unmount all mounted partitions. Then type in
516reboot cleanly, then <c>reboot</c>. 520that one magical command you have been waiting for: <c>reboot</c>.
517</p> 521</p>
518 522
519<pre caption="Exiting the chroot, unmounting all partitions and rebooting"> 523<pre caption="Exiting the chroot, unmounting all partitions and rebooting">
520# <i>exit</i> 524# <i>exit</i>
521livecd ~# <i>umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo</i> 525livecd ~# <i>umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo/sys /mnt/gentoo</i>
522livecd ~# <i>reboot</i> 526livecd ~# <i>reboot</i>
523</pre> 527</pre>
524 528
525<p> 529<p>
526Once your new Gentoo installation has booted, finish up with <uri 530Once rebooted in your Gentoo installation, finish up with <uri
527link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>. 531link="?part=1&amp;chap=11">Finalizing your Gentoo Installation</uri>.
528</p> 532</p>
529 533
530</body> 534</body>
531</subsection> 535</subsection>

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20