]> git.ozlabs.org Git - yaboot.git/blob - doc/yaboot-howto.sgml
96c350f7ef6a78118de358a952117285a99ec3fa
[yaboot.git] / doc / yaboot-howto.sgml
1 <!DOCTYPE debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN" [
2  <!-- 
3         document conventions:
4           file, directory, device == file
5           program, command == prgn
6           variable == var
7           package == package
8           program output == tt
9           key input == em, example for longer ones
10           command input == tt
11    -->
12 ]>
13
14 <debiandoc>
15   <book>
16     <titlepag>
17       <title>
18         HOWTO-Booting with Yaboot on PowerPC
19       </title>
20       <author>
21         <name>Chris Tillman</name>
22       </author>
23       <version>Version 1.01, Feb 24 2002</version>
24       <abstract>
25 This document contains installation and usage instructions for
26 <prgn>yaboot</prgn>, the GNU/Linux PowerPC bootloader.
27       </abstract>
28       <copyright>
29         <copyrightsummary>
30 This document may be distributed and modified under the terms of the
31 GNU General Public License.
32 &copy; 1998&ndash;2002 Chris Tillman
33         </copyrightsummary>
34         <p>
35 This document is maintained in the upstream yaboot source.  Patches
36 and translations should be sent to erbenson (at) alaska.net.  The most
37 recent version of this document is available via the yaboot rsync
38 tree: rsync://penguinppc.org/yaboot, and <url
39 id="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml"
40 name="http://penguinppc.org/projects/yaboot/doc/yaboot-howto.shtml">.
41         <p>
42 This document is free software; you may redistribute it and/or modify it
43 under the terms of the GNU General Public License as published by the
44 Free Software Foundation; either version 2, or (at your option) any
45 later version.
46         <p>
47 This document is distributed in the hope that it will be useful, but
48 <em>without any warranty</em>; without even the implied warranty of
49 merchantability or fitness for a particular purpose. See the GNU
50 General Public License for more details.
51         <p>
52
53 A copy of the GNU General Public License is available as
54 <file>/usr/share/common-licenses/GPL</file> in the Debian GNU/Linux
55 distribution or on the World Wide Web at the <url
56 id="http://www.gnu.org/copyleft/gpl.html" name="GNU website">. You can also
57 obtain it by writing to the Free Software Foundation, Inc., 59 Temple Place
58 - Suite 330, Boston, MA 02111-1307, USA.
59
60     <toc detail="sect">
61 <chapt>Yaboot's Purpose
62 <p>
63
64 Yaboot is a bootloader for PowerPC computers (NewWorld PowerMacs and IBM
65 CHRP). It loads a Linux operating system kernel from an
66 OpenFirmware-accessible filesystem and initiates operation of the kernel. On
67 PowerMacs, an included CHRP script can display a multi-OS boot menu which
68 can launch <prgn>yaboot</prgn> or other operating systems. Utilities are
69 included to place <prgn>yaboot</prgn> and the associated script on a
70 non-mountable bootstrap partition.
71
72
73 <chapt>System Requirements
74 <p>
75 Motorola PowerPC processors have been used on at least three different
76 kinds of systems: NuBus, OldWorld PCI, and NewWorld PCI. Nubus systems
77 include the 6100/7100/8100 line of Power Macintoshes. OldWorld systems
78 are most Power Macintoshes with a floppy drive and a PCI bus. Most
79 603, 603e, 604, and 604e based Power Macintoshes, including the 7200,
80 7300, 7500, 7600, 8500, 8600, 9500, and 9600 are OldWorld
81 machines. The beige colored G3 systems are also OldWorld.
82 <p>
83
84 <em><prgn>yaboot</prgn> will not work on NuBus or OldWorld machines</em>,
85 those will require <prgn>quik</prgn> or (for MacOS Pre-9.0.4 only)
86 <prgn>BootX/miboot</prgn>.
87
88 <p>
89 The NewWorld PowerMacs, for which <prgn>yaboot</prgn> is designed, are
90 any PowerMacs in translucent colored plastic cases. That includes all
91 iMacs, iBooks, G4 systems, blue colored G3 systems, and most
92 PowerBooks manufactured in and after 1999. 
93
94
95 <chapt>Obtaining Yaboot
96 <p>
97
98 Yaboot is included with Debian GNU/Linux installation for PowerPC computers.
99 Updates for Debian may be downloaded via the normal methods, such as
100 <prgn>apt-get</prgn>, <prgn>dselect</prgn>, or <prgn>dpkg</prgn>.
101 Installation of an updated version of <prgn>yaboot</prgn> on your system
102 does not change your boot configuration; you must use the included
103 <prgn>ybin</prgn> utility to do that.
104
105 <p>
106
107 You can also download <prgn>yaboot</prgn> directly from the
108 <prgn>yaboot</prgn> home page at <url
109 id="http://penguinppc.org/projects/yaboot/">. If you download it using MacOS,
110 be sure to download using <em>binary</em> (not text) format, and don't let
111 Stuffit Expander or another utility expand the archive in MacOS.
112
113 <p>
114
115 You can download the precompiled <file>yaboot-binary-X.Y.tar.gz</file>, or
116 the source tarball <file>yaboot-X.Y.tar.gz</file>. To unpack the binary
117 distribution, use the command <tt>tar -zxvpf yaboot-X.Y.tar.gz</tt>. The
118 components are unpacked into a <file>usr/local/</file> directory inside the
119 directory where the command was executed.
120
121 <p>
122
123 To make and install from source, first make sure you have a working compiler
124 (<prgn>gcc</prgn>) and the <prgn>make</prgn> program installed. (If
125 not, download the binary yaboot tarball instead of the source.) Then run the
126 following commands (substitute the actual revision numbers for X and Y):
127
128 <p>
129 <example>
130      tar -zxvpf yaboot-X.Y.tar.gz
131      cd yaboot-X.Y
132      make
133      su
134      make install
135 </example>
136
137 <chapt>Creating the Bootstrap Partition
138 <p>
139
140 Be sure you have reviewed the <prgn>mac-fdisk</prgn> Basics page at <url
141 id="http://penguinppc.org/projects/yaboot/doc/mac-fdisk-basics.shtml">. If
142 you are creating a new Linux installation, the first partition you create
143 with <prgn>mac-fdisk</prgn> should be the bootstrap partition. Just use the
144 <prgn>mac-fdisk</prgn> <tt>b</tt> command to automatically create a
145 bootstrap partition of the proper size and type. If your version of
146 <prgn>mac-fdisk</prgn> doesn't include the <tt>b</tt> command, use: 
147
148 <p>
149 <example>
150      Command (? for help): C xxxx 800k bootstrap Apple_Bootstrap 
151 </example>
152 <p>
153
154 (Replace xxxx with the starting block number.) A working tarball of a
155 bootstrap-capable version of mac-fdisk (Debian users already have this
156 version) is also distributed at <url
157 id="http://penguinppc.org/~eb/files/">. To install this, use
158
159 <example>
160      su -
161      cd /
162      gzip -dc mac-fdisk.tar.gz | tar -xvp
163 </example>
164  
165 <p>
166 The bootstrap partition only takes 800k of space. If you are adding a
167 bootstrap partition to your existing setup, you may have enough free
168 space on your existing drive without changing other partitions. If
169 not, you could avoid re-partitioning the entire disk by stealing a
170 little space from your swap partition. Or <prgn>parted</prgn> would allow
171 you to resize partitions.
172
173 <p>
174
175 The bootstrap partition should end up being partition #2, after the
176 partition map itself but before any other partitions on the disk. You can
177 easily change the order of the partitions in the partition map using the
178 <tt>r</tt> command (see the <prgn>mac-fdisk</prgn> tutorial). In other
179 words, it's not the physical placement of the bootstrap partition that
180 counts, it's the logical order within the partition map. Note, though, if
181 you have an existing system and you shift the partition numbers around, you
182 will need to make the appropriate changes in <file>/etc/fstab</file>.
183
184 <p>
185
186 The reason you want the bootstrap partition as partition #2, is so
187 that it precedes all other partitions in the boot sequence. This helps
188 tremendously to make the entire system more stable, since some OS's
189 are very intrusive in their use of partitions.
190
191 <p>
192
193 When you're finished partitioning, use the <tt>p</tt> command and make note
194 of the final partition numbers. You will need to know the partition
195 number for the bootstrap partition, the location of your kernel, and
196 if you intend to set up <prgn>yaboot</prgn> for multiple OS booting, partition
197 numbers for your alternate OS's.
198
199 <p>
200
201 While it's possible to install <prgn>yaboot</prgn> on a mountable HFS
202 <file>/boot</file> partition, that configuration is deprecated, discouraged
203 and completely unsupported.
204
205 <chapt>Yabootconfig: Make It Easy
206 <p>
207
208 For initial installation on a machine, you can use <prgn>yabootconfig</prgn>
209 to first create a <file>yaboot.conf</file> file and then install everything
210 on your bootstrap partition. Yabootconfig reads the running system's
211 <file>/etc/fstab</file> to determine the kernel location, and detects the
212 location of the 800k Apple_Bootstrap partition. The Debian installer uses
213 <prgn>yabootconfig</prgn> behind the scenes in the Make Hard Disk Bootable
214 step.
215
216 <p>
217
218 Normally, the initial boot configuration is created while in a ramdisk
219 installer environment, with the system being installed being mounted under
220 <file>/target</file> or <file>/mnt</file>. To run <prgn>yabootconfig</prgn>
221 under these conditions, supply the path to the target system with -t or
222 --chroot option. For example: <tt>yabootconfig --chroot /target</tt>
223
224 <p>
225
226 The <file>yaboot.conf</file> automatically created by
227 <prgn>yabootconfig</prgn> will just control booting of the linux system
228 under which it was created. To boot additional OS's or add other options,
229 you will need to edit the <file>yaboot.conf</file> file.
230
231
232 <chapt>Customizing Your Boot Configuration
233 <p>
234
235 To customize your <prgn>yaboot</prgn> installation, use any text editor such
236 as <prgn>vi</prgn> or <prgn>nano</prgn> (or <prgn>nano-tiny</prgn> in the
237 Debian installer) to edit the <file>yaboot.conf</file> file. If you used
238 <prgn>yabootconfig</prgn> to create the initial <file>yaboot.conf</file>, it
239 will already contain a basic configuration to boot the linux system.
240
241 <p>
242
243 The <file>yaboot.conf</file> has numerous options; see the
244 <file>yaboot.conf</file> man page for details. I will briefly cover the most
245 popular items here. The file controls both <prgn>yaboot</prgn> operation
246 during tha actual boot, and <prgn>ybin</prgn> operation while saving the
247 configuration to the boot partition.
248
249 <p>
250
251 Lines in the file beginning with <tt>#</tt> are interpreted as comments. Each
252 option or parameter must be specified on a separate line. Don't use
253 any extra spaces within or following parameter definitions. Also, the
254 file must have unix newlines; be sure to save as a unix type file
255 if you create or edit it within MacOS.
256
257
258 <sect>Linux Style Device Paths 
259 <p>
260
261 For those unfamiliar with Linux device naming, partition paths are in
262 the form of <tt>/dev/xxx#</tt> where xxx is the Linux device name and #
263 represents the partition number. Typical Linux device names are:
264
265 <example>
266   Name   Device Type
267   ----   --------------------------------------------------
268   hda    internal ide drive (primary controller, master disk)
269   hdb    internal ide drive (primary controller, slave disk)
270   hdc    secondary controller, master disk (often used for CD-ROM)
271   hdd    secondary controller, slave disk (often used for Zip drive)
272   sda    first SCSI disk (SCSI ID address-wise)
273   sdb    second SCSI disk 
274   scd0   first CD-ROM (or sr0)
275   fd0    first floppy drive
276   fd1    second floppy drive
277 </example>
278
279
280 <sect>OpenFirmware Device Paths
281 <p>
282 A utility for finding the OpenFirmware device path corresponding to a
283 given Linux device path is provided: <prgn>ofpath</prgn>. <prgn>ybin</prgn>
284 uses <prgn>ofpath</prgn>
285 internally to convert Linux device names you use in <file>yaboot.conf</file> to
286 OpenFirmware equivalents. Example: <tt>ofpath /dev/hda</tt> (should return hd:). 
287 You can also figure out OpenFirmware device paths yourself, see 
288 Recovering From Misconfiguration below.
289
290 <sect>Required Settings
291 <p>
292
293 The bootstrap partition is identified with <tt>boot=boot-partition</tt>,
294 where boot-partition is the Linux-style path to the bootstrap partition. If
295 you followed our partitioning recommendations on your internal hard disk,
296 that would be <tt>boot=/dev/hda2</tt>.
297
298 <p>
299
300 For PowerMacs, a magicboot line such as 
301 <tt>magicboot=/usr/local/lib/yaboot/ofboot</tt> is also required. Several
302 models cannot execute a straight ELF, and need a CHRP script (which this
303 line in the <file>yaboot.conf</file> makes available).
304
305 <p>
306
307 The <tt>partition=</tt>, <tt>image=</tt>, and <tt>root=</tt> settings (under
308 kernel image settings below) are also required.
309
310 <sect>Boot Menu Options
311 <p>
312
313 A CHRP script (<file>ofboot</file>) has been provided which
314 <prgn>ybin</prgn> will modify using <file>yaboot.conf</file> settings, to
315 display a very handy multi-OS boot menu. 
316
317 <p> 
318
319 If you are setting up a multi-OS boot menu, you'll need to identify the
320 partitions where each OS lives. You can use Linux-style or OpenFirmware
321 partition paths. Here are some examples illustrating the possibilities:
322
323 <example>
324      macos=/dev/hda10
325      macosx=/dev/hda12
326      darwin=hd:9
327      bsd=zip:1
328 </example>
329
330 When using <tt>macosx=</tt>, if you have OSX installed on a UFS partition,
331 then point the macosx to the OSX bootstrap partition, not the UFS root.
332 Don't be tempted to use the OSX bootstrap partition for <prgn>ybin</prgn>,
333 however &mdash; you still need a separate Apple_Bootstrap partition.
334
335 <p>
336
337 When using <tt>bsd=</tt>, on the other hand, point to the BSD root
338 partition, not a bsd bootstrap partition. To use <tt>bsd=</tt>, you also
339 need to have the bsd bootloader (ofwboot) available in
340 <file>/usr/local/lib/yaboot/</file> when running <prgn>ybin</prgn>.
341
342 <p>
343
344 If nothing is selected from the boot menu when it appears, the system
345 launches <prgn>yaboot</prgn> to start Linux. To launch another OS when no
346 key is pressed, add a <tt>defaultos=</tt> line, for example
347 <tt>defaultos=macos</tt> or <tt>defaultos=bsd</tt>.
348
349
350 <sect>Kernel Image Settings
351 <p>
352 Kernel images to be launched by yaboot can be kept on any partition,
353 in an ext2, ext3, XFS, ReiserFS, or HFS/HFS+ filesystem. Yaboot will
354 need to know the kernel partition number and filesystem path.
355
356 <p>
357
358 The <file>yaboot.conf</file> file has two sections; most options are in the
359 global section at the top of the file, and options pertaining to separate
360 kernel images are grouped together below. Most kernel image options may be
361 specified either globally or locally; a global option is overridden if it is
362 re-specified in a kernel image section. Each kernel image section begins
363 with an <tt>image=/</tt> line specifying the filesystem path to that kernel
364 image; the first <tt>image=/</tt> line marks the end of the global section.
365
366 <p>
367
368 Yaboot must know the device, partition number, and filesystem path for the
369 kernel image that is to be loaded and started. However, <tt>device=</tt> is
370 usually not necessary, because if you don't specify it <prgn>yaboot</prgn>
371 assumes it will find the kernel on the same device it was booted from, which
372 is quite often true. You should always supply the kernel partition number,
373 for example <tt>partition=3</tt>, and of course the image path (for example
374 <tt>image=/boot/vmlinux</tt> ). If your kernel image is at the root level of
375 the partition, don't forget to include the leading slash when specifying the
376 image path (<tt>image=vmlinux</tt> will probably fail).
377
378 <p>
379
380 It's worth noting that <prgn>yaboot</prgn> locates the kernel image within a
381 partition's filesystem without regard to where that partition will
382 eventually be mounted within the Linux root filesystem. So, for example, if
383 you've placed a kernel image or symlink at /boot/vmlinux, but /boot is
384 actually a separate partition on your system, then the image path for
385 <prgn>yaboot</prgn> will just be <tt>image=/vmlinux</tt>.
386
387 <p>
388
389 You must also specify the Linux partition path for the root partition, for
390 example <tt>root=/dev/hda3</tt>. This parameter is passed to the kernel when
391 it starts up to let it know where its root filesystem is located. Many other
392 options are available to pass additional boot parameters to the kernel
393 (<tt>append=</tt>), specify initial ramdisk size (<tt>ramdisk=</tt>), load a
394 ramdisk image (<tt>initrd=</tt>), and others. Refer to the yaboot.conf man
395 page for details on kernel image options.  
396
397 <p>
398
399 Here's a simple but complete example <file>yaboot.conf</file> with one
400 kernel image section:
401
402 <example>
403   # Where's the bootstrap partition
404   boot=/dev/hda2
405   # CHRP script spec
406   magicboot=/usr/lib/yaboot/ofboot
407   # Dual boot with MacOS
408   macos=hd:14
409   # How long to wait at the OS boot menu (seconds)
410   delay=5
411
412   # How long to wait at the boot: prompt (tenths of a second)
413   timeout=50
414   # Globally identified root partition
415   root=/dev/hda3 
416   # The device where the kernel lives
417   device=hd:
418
419   # Kernel image section begins here
420   # Specify the filesystem path to the kernel image, symlinks are OK
421   image=/vmlinux
422       # Specify the partition number where this path is valid
423       partition=3
424       # Add a label, you can type this at the boot: prompt to load this kernel
425       label=Linux
426       # Specify the type of root fs mounting, read-only allows fsck to run
427       read-only
428
429   ## You must run ybin for changes to take effect!!!!!!!
430 </example>
431 <p>
432
433 To netboot a kernel image via tftp, use <tt>image=/tftpboot/vmlinux</tt> (the
434 path on the tftp server) and <tt>device=enet:10.0.0.1</tt>
435 (substituting the tftp boot server IP address).
436
437 <p> 
438
439 Normally the first image specified in the <file>yaboot.conf</file> will be the
440 image booted if no entry is made at the boot: prompt. To have another
441 image loaded by default, add a <tt>default=label</tt> line in the global
442 section. 
443
444
445 <sect>Optional and Cool Settings
446 <p>
447
448 Yaboot and your multiboot menu can throw a splash of color into your life!
449 Use <tt>fgcolor=</tt> and <tt>bgcolor=</tt> lines to set your screen to wake
450 you up in the morning with black, blue, light-blue, green, light-green,
451 cyan, light-cyan, red, light-red, purple, light-purple, brown, light-gray,
452 dark-gray, yellow, and white. Make fgcolor and bgcolor the same if you'd
453 really like a challenge.
454
455 <p>
456
457 Add any or all of enableofboot, enablenetboot, or enablecdboot to add
458 the respective options to your OS boot menu: boot from OpenFirmware,
459 the network, or CDROM.
460
461 <p>
462
463 Use Set delay= (in seconds) to determine how long the multiboot OS menu
464 should wait before booting the default OS. <tt>timeout=</tt> (in tenths of
465 seconds) to set how long yaboot should wait at the boot: prompt for
466 you to choose a kernel image before booting the first image in the
467 file or the <tt>default=</tt> image.
468
469 <p>
470
471 Booting password protection is available using a <tt>password=</tt> line. 
472 When you add <tt>password=</tt>, a password will be required for all booting.
473 Automatic booting is not possible unless a <tt>restricted</tt> line is added.
474
475 <p>
476
477 If <tt>restricted</tt> is added in the global section, kernel images defined
478 in <file>yaboot.conf</file> may be booted as long as no arguments are added
479 at the boot: prompt. This is useful for unattended booting, while preventing
480 the instant rootshell problems of console access (though OpenFirmare
481 passwords are also needed to make this really secure, along with locking the
482 case). To boot an undefined image, or any image with additional arguments, a
483 password will be required.
484
485 <p>
486
487 The <tt>password=</tt> line may either be a plaintext password or an MD5
488 hash (the same format as the Linux <file>/etc/shadow</file> file). To make an
489 md5 hash use the following perl snippet:
490
491 <example>
492     $ perl -e 'printf("%s\n", crypt("secret", "\$1\$saltstrg"))'
493 </example> 
494 The saltstrg should be a random string, for example one generated by 
495
496 <example>
497     makepasswd --chars=8
498 </example>
499
500
501 <chapt>Saving Boot Configuration Changes
502 <p>
503
504 There are currently three utilities provided to save your boot configuration
505 changes to the boot partition: <prgn>ybin</prgn>, <prgn>mkofboot</prgn>, and
506 <prgn>yabootconfig</prgn>. Ybin copies <prgn>yaboot</prgn>,
507 <file>yaboot.conf</file>, and the CHRP script to the boot partition, and
508 then performs the necessary blessing. Mkofboot initializes the bootstrap
509 partition, then runs <prgn>ybin</prgn>. And <prgn>yabootconfig</prgn>
510 creates a working <file>yaboot.conf</file> and then runs
511 <prgn>mkofboot</prgn>. For details and options of these utilities, see the
512 associated man pages or type the utility name followed by --help on the
513 command line.
514
515
516 <chapt>Common Mistakes
517 <p>
518
519 The most common mistake made in the usage of <prgn>yaboot</prgn> is trying
520 to use it to boot from a mountable partition on a permanent basis. When a
521 PowerPC first starts up, the booting process is started by locating a
522 so-called `blessed' folder. The MacOS places the blessing so that multiple
523 system folders may exist on a partition, but only one of them will be valid
524 for starting up. If the computer is set up to dual boot Linux and MacOS,
525 when MacOS is booted it will unbless any folders which do not contain a
526 valid MacOS system. Then the next time the machine boots, the partition
527 containing the formerly blessed folder will not be bootable.
528
529 <p>
530
531 The utilities provided with <prgn>yaboot</prgn> should always be used to set
532 it up on its own bootstrap partition for regular booting needs. The only
533 time you should place <prgn>yaboot</prgn> on a mountable partition is for
534 initial installation of Linux and rescue operations. In those cases you can
535 intervene in the normal bootloading process to request a specific file to be
536 executed, and blessed folders are not an issue since this type of booting is
537 not automatic.
538
539 <p>
540
541 After <prgn>yaboot</prgn> has been installed, another common mistake is
542 changing the boot configuration file or updating the <prgn>yaboot</prgn>
543 software and then failing to re-run the <prgn>ybin</prgn> utility to
544 transfer the changed configuration to the boot partition. Booting functions
545 will not be changed unless the changes are saved to the bootstrap partition.
546 If you change your <file>yaboot.conf</file> often, you might want to add a
547 comment line inside the <file>yaboot.conf</file> file to remind yourself to
548 run <prgn>ybin</prgn> after making changes.
549
550
551 <chapt>Recovering From Misconfiguration
552 <p>
553
554 If you have a problem booting, don't panic. Yaboot can boot any
555 installed Linux kernel and system from the boot: prompt. 
556
557 <sect>Resetting the NVRAM
558 <p>
559
560 Hold the Command-Option-p-r keys all together at startup to reset all nvram
561 parameters to their factory defaults. Hold the keys until you hear the
562 startup chime two or three times. If the setup recommendations were
563 followed, the <prgn>yaboot</prgn> installation will be be the first bootable
564 partition and OpenFirmware will boot it automatically. It should be noted
565 that MacOS settings such as virtual memory, startup disk, and screen
566 resolution will also be reset to their defaults.
567
568
569 <sect>Loading Yaboot
570 <p>
571
572 If a <tt>boot:</tt> prompt isn't presented, then <prgn>yaboot</prgn> isn't
573 being loaded. You can load it manually from
574 OpenFirmware. Holding the Command-Option-o-f keys all together after
575 pressing the power-on key will give you an OpenFirmware prompt 
576
577 <example>
578     0 >
579 </example>
580 (Command is the key with the cloverleaf and/or apple engraved on it). 
581
582 <p>
583
584 At the OF prompt, you will need to use OpenFirmware paths for most of
585 the boot configuration items. You can determine most OpenFirmware
586 paths from the OF prompt using a few OF commands, then construct an OF
587 boot command to directly boot your kernel.
588
589 <p>
590
591 The full OpenFirmware path consists of three parts in the format 
592
593 <example>
594     device-name:partition-number,/filesystem-path
595 </example>
596
597 <p>
598
599 The OF command devalias will list all the device aliases effective on
600 your system. You may see some of these:
601 <example>
602   Name      Device Type
603   ----      --------------------------------------------------
604   hd        internal ide drive (primary controller, master disk)
605   ultra1    internal ide drive (primary controller, slave disk)
606   ide0      ide drive (secondary controller, master disk)
607   ide1      ide drive (secondary controller, slave disk)
608   cd        CD-ROM 
609   zip       Zip drive
610   fw        FireWire interface
611   fd        Floppy drive
612   enet      Ethernet interface
613 </example>
614
615 Append the partition number of the boot partition (in our recommendation, 2)
616 and then follow that with <tt>,yaboot</tt> to boot the <prgn>yaboot</prgn>
617 file on the boot partition.
618
619 <example>
620     0 > boot hd:2,yaboot 
621 </example>
622 <p>
623
624 Hit return, and <prgn>yaboot</prgn> should be loaded and display its
625 <file>boot:</file> prompt. If you don't know the partition number, just
626 start at 2 and work your way up until you hit it.
627
628 <sect>Manually Loading a Kernel Image 
629 <p>
630
631 Once you have the boot: prompt, you can enter a label defined in your
632 <file>yaboot.conf</file> to boot that kernel image. Or instead of a label,
633 you can enter a full OpenFirmware path. A typical kernel path might be
634
635 <example>
636     boot: hd:3,/vmlinux
637 </example>
638
639 To pass parameters to the kernel, add them on to the <tt>boot:</tt> prompt
640 line after the kernel label or path. You'll need to specify <tt>root=</tt>
641 as a minimum, but you can add any kernel parameters desired. Here's an
642 example; 
643
644 <example>
645     boot: hd:3,/vmlinux root=/dev/hda3 ro
646 </example>
647
648
649 <chapt>Yaboot as a Temporary Bootloader 
650 <p>
651 It's very convenient for certain tasks like installing a new system
652 the first time without a CD, or rescuing an existing system, to boot a
653 ramdisk system such as an installer directly from files placed on an
654 existing partition.
655
656 <p>
657
658 An example is the Debian installer. It is contained in a floppy-image
659 root.bin file which <prgn>yaboot</prgn> can boot directly. A simple
660 <file>yaboot.conf</file> to initialize the ramdisk, yaboot, root.bin, and a
661 kernel image (named linux in this example) are all that is needed. All files
662 are placed at the root level on an existing partition.
663
664 <p>
665
666 The <file>yaboot.conf</file> file for this purpose contains just 
667 four lines:
668 <example>
669     image=linux
670     label=install
671     initrd=root.bin
672     initrd-size=8192
673 </example>
674 <p>
675
676 If you create <file>yaboot.conf</file> in the MacOS, you must convert
677 it to use Unix newlines (linefeeds only). If you use MacOS newlines
678 (just carriage returns), <prgn>yaboot</prgn> will be unable to read the file.
679
680 <p>
681 Boot into OpenFirmware, and type at the prompt:
682 <example>
683     0 > boot hd:xx,yaboot
684 </example>
685
686 replacing xx with the partition number of the partition where the
687 kernel and <prgn>yaboot</prgn> files were placed, followed by a return. At the
688 boot: prompt, type <em>install</em> followed by a return.
689
690
691 <chapt>For More Information
692 <p>
693
694 Where's home?
695 <list>
696 <item>    <url id="http://penguinppc.org/projects/yaboot/" name="Yaboot Home">
697 </list>
698
699 <p>
700
701 How do I install Debian?
702 <list>
703 <item>    <url id="http://mirrors.kernel.org/debian/dists/woody/main/disks-powerpc/current/doc/install.en.html"
704     name="Installing Debian GNU/Linux 3.0 For PowerPC">
705 <item>    <url id="http://www.debian.org/releases/potato/powerpc/install" name="Installing Debian GNU/Linux 2.2 For PowerPC">
706 </list>
707
708 <p>
709
710 What's Open Firmware?
711 <list>
712 <item>    <url id="http://developer.apple.com/technotes/tn/tn1044.html">
713 <item>    <url id="http://developer.apple.com/technotes/tn/tn1061.html">
714 <item>    <url id="http://developer.apple.com/technotes/tn/tn1062.html">
715 <item>    <url id="http://developer.apple.com/technotes/tn/tn1167.html">
716 </list>
717
718
719 </chapt>
720   </book>
721 </debiandoc>
722
723
724 <!-- Keep this comment at the end of the file
725 Local variables:
726 mode: sgml
727 sgml-omittag:t
728 sgml-shorttag:t
729 sgml-namecase-general:t
730 sgml-general-insert-case:lower
731 sgml-minimize-attributes:max
732 sgml-always-quote-attributes:t
733 sgml-indent-step:2
734 sgml-indent-data:nil
735 sgml-parent-document:nil
736 sgml-declaration:nil
737 sgml-exposed-tags:nil
738 sgml-local-catalogs:nil
739 sgml-local-ecat-files:nil
740 End:
741 -->