]> git.ozlabs.org Git - yaboot.git/blob - man/ybin.8
Fix ofpath for G5 with multiple drives
[yaboot.git] / man / ybin.8
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" ybin (YaBoot INstaller) installs/updates the yaboot boot loader.
4 .\" Copyright (C) 2000, 2001 Ethan Benson
5 .\"
6 .\" This program is free software; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License
8 .\" as published by the Free Software Foundation; either version 2
9 .\" of the License, or (at your option) any later version.
10 .\"
11 .\" This program is distributed in the hope that it will be useful,
12 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 .\" GNU General Public License for more details.
15 .\"
16 .\" You should have received a copy of the GNU General Public License          
17 .\" along with this program; if not, write to the Free Software                
18 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 .\"
20 .TH YBIN 8 "21 November 2001" "GNU/Linux PowerPC" "System Manager's Manual"
21 .SH NAME
22 .B ybin
23 \- install the yaboot boot loader to a bootstrap partition.
24 .SH SYNOPSIS
25 .B ybin 
26 .RB [ \ \-b | \-\-boot\ \fIdevice\  ]
27 .RB [ \ \-o | \-\-ofboot\ \fIof-path\  ]
28 .RB [ \ \-i | \-\-install\ \fIboot-file\  ]
29 .RB [ \ \-C | \-\-config\ \fIconfig-file\  ]
30 .RB [ \ \-m | \-\-magicboot\ \fIchrp-file\  ]
31 .RB [ \ \-\-filesystem\ \fIhfs | \fImsdos | \fIraw\  ]
32 .RB [ \ \-\-nobless\  ]
33 .RB [ \ \-M | \-\-mount\  ]
34 .RB [ \ \-\-hide\  ]
35 .RB [ \ \-\-protect\  ]
36 .RB [ \ \-\-nonvram\  ]
37 .RB [ \ \-\-force\  ]
38 .RB [ \ \-v | \-\-verbose\  ]
39 .RB [ \ \-\-debug\  ]
40 .RB [ \ \-h | \-\-help\  ]
41 .RB [ \ \-V | \-\-version\  ]
42 .SH DESCRIPTION
43 This manual page explains 
44 .B ybin 
45 the installer for the  
46 .BR yaboot (8) 
47 boot loader enabling GNU/Linux to be booted by OpenFirmware.
48 Specifically it copies the 
49 .B yaboot
50 binary and 
51 .BR yaboot.conf (5)
52 and usually a \*(lqmagicboot\*(rq script to a 
53 .BR bootstrap (8)
54 partition.  
55
56 .B Ybin
57 will set attributes on the boot loader files and to the
58 .BR bootstrap (8)
59 partition itself to allow OpenFirmware to recognise it as bootable,
60 [usually] without requiring alterations to OpenFirmware's configuration.
61
62 .B Ybin
63 will also set the OpenFirmware boot-device variable to the device path
64 of the \fBbootstrap\fR(8) partition using \fBnvsetenv\fR(8) when a
65 NewWorld compatible version of \fBnvsetenv\fR(8) is available.
66
67 .B Ybin 
68 requires that the 
69 .BR bootstrap (8)
70 partition have an HFS filesystem already on it.  For IBM
71 hardware there is no filesystem on the \fBbootstrap\fR(8) partition,
72 in this case use fstype=raw.  When using the raw filesystem type
73 \fBybin\fR requires that an ELF binary have already been installed on
74 the \fBbootstrap\fR(8) partition.  Use the companion
75 .BR mkofboot (8) 
76 utility to install the boot loader onto a new 
77 .BR bootstrap (8)
78 partition. 
79
80 The \fBbootstrap\fR(8) need not and should not be mounted anywhere on
81 your filesystem, especially not on top of /boot.  \fBYaboot\fR is able
82 to load the kernels from the ext2fs root partition so that is where
83 they should be kept. \fBYbin\fR will refuse to operate on the
84 \fBbootstrap\fR(8) partition if it is mounted.
85 .SH OPTIONS
86 .TP
87 .BR \-b ,\  \-\-boot\ \fIdevice
88 Install the boot loader onto the specified device, this device should
89 be that of your \fBbootstrap\fR(8) partition. For example, if your
90 \fBbootstrap\fR partition is located on your first primary IDE drive in the 
91 second partition, your device would be: \fI/dev/hda2\fR.
92 .TP
93 .BR \-o ,\  \-\-ofboot\ \fIof-path
94 The OpenFirmware device path to the \fBbootstrap\fR(8) partition. This
95 is needed so the first stage \fIofboot\fR loader can be configured
96 properly.  It should include the OpenFirmware path including the
97 partition number (but not any filename).  Example: if your
98 \fBbootstrap\fR(8) partition is /dev/hda2 the OF path will likely be
99 hd:2.  As of \fBybin\fR 0.18 you no longer are required to specify this
100 option, if left undefined ybin will attempt to figure out the
101 OpenFirmware path automatically using the \fBofpath\fR(8) utility.
102 You should only need to define this option if \fBofpath\fR(8) fails.
103 .TP
104 .BR \-i ,\  \-\-install\ \fIboot-file
105 Use \fIboot-file\fR as the primary boot loader executable, instead of
106 the default \fI/usr/local/lib/yaboot/yaboot\fR.
107 .TP
108 .BR \-C ,\  \-\-config\ \fIconfig-file
109 Use \fIconfig-file\fR as the \fBybin\fR/\fByaboot\fR(8) configuration
110 file instead of the default \fI/etc/yaboot.conf\fR.
111 .TP
112 .BR \-m ,\  \-\-magicboot\ \fIchrp-script
113 Use \fIchrp-script\fR as the boot loader \*(lqwrapper\*(rq.  This
114 script is needed to either provide a boot menu for dual boot with
115 MacOS or to load yaboot (due to an OpenFirmware bug).
116 .TP
117 .BR \-\-filesystem\ \fIhfs\fR|\fImsdos\fR|\fIraw
118 Set the filesystem type that \fBybin\fR expects to find on the
119 \fBbootstrap\fR(8).  The \*(lqraw\*(rq filesystem type causes \fBybin\fR
120 to copy the bootloader (the value of \fIinstall=\fR directly to the
121 \fBbootstrap\fR(8) partition without creating a filesystem.
122 \*(lqraw\*(rq is required on IBM hardware.  CAUTION: this will destroy any data or
123 filesystem on the bootstrap partition (value of \fIboot=\fR) if you
124 specify something like \fIboot=/dev/sda\fR you will destroy the
125 partition table and lose ALL data on the disk.  The default is HFS.
126 .TP
127 .BR \-M ,\  \-\-mount
128 Do not use the userspace
129 .BR hfsutils (1)
130 to modify the \fBbootstrap\fR(8), instead try and mount the filesystem
131 directly.  NOTE: Attributes cannot be set on the filesystem or the
132 boot loader files using this method, your system will NOT be bootable
133 without modifying OpenFirmware's \*(lqboot-device\*(rq variable to
134 something like: \*(lqhd:2,ofboot\*(rq (no quotes).
135 .TP
136 .BR \-\-nobless
137 Do not \*(lqbless\*(rq the root directory of the \fBbootstrap\fR(8)
138 partition's filesystem.  Only use this option if the \fBbootstrap\fR(8)
139 partition is actually a MacOS boot partition.  This option is ignored
140 unless the filesystem is HFS, and is ignored when used with \-\-mount.
141 .TP
142 .BR \-\-hide
143 .br
144 Set the invisible bit on all the boot loader files once copied to the
145 \fBbootstrap\fR(8) partition.  This setting is useful if you must install
146 the boot loader onto a MacOS boot partition and do not with to see the
147 boot loader files cluttering up the MacOS root directory.  This option
148 is ignored unless the filesystem is HFS, and will not work with
149 \-\-mount.
150 .TP
151 .BR \-\-protect
152 Set the read-only bit on all boot loader files once copied to the
153 \fBbootstrap\fR(8) partition.  This setting is useful if you must install
154 the bootloader onto a MacOS boot partition and want to discourage
155 alterations/deletion of the boot loader.  This option works for both
156 HFS and MSDOS filesystems.
157 .TP
158 .BR \-\-nonvram
159 Prevent \fBybin\fR from setting the OpenFirmware boot-device
160 variable with \fBnvsetenv\fR(8).
161 .TP
162 .BR \-v ,\  \-\-verbose
163 This option causes \fBybin\fR to be more verbose as it proceeds.
164 .TP
165 .BR \-f ,\  \-\-force
166 This option suppresses any confirmation questions.
167 .TP
168 .BR \-\-debug
169 This option causes \fBybin\fR to output some boring details useful
170 only for debugging \fBybin\fR itself.
171 .TP
172 .BR \-h ,\  \-\-help
173 Print out usage information and exit.
174 .TP
175 .BR \-V ,\  \-\-version
176 Print out the version number and exit.
177 .SH FILES
178 .nf
179 /usr/local/lib/yaboot/yaboot \- boot loader executable
180 /usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
181 /etc/yaboot.conf \- boot loader/ybin configuration file
182 .fi
183 .SH ENVIRONMENT
184 .TP
185 .B TMPDIR
186 .br
187 The temporary directory \fBybin\fR will use.
188 .SH SECURITY
189 Temporary files are created with
190 .BR mktemp (1).
191 It is important that your system use a secure 
192 .BR mktemp (1)
193 program, otherwise \fBybin\fR will be vulnerable to race conditions.
194 The Debian mktemp is derived from OpenBSD and thus should be secure.
195
196 \fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
197 \fBybin\fR). It is thus critical that it not be writable by anyone but
198 root.  It is also critical that \fI/etc/yaboot.conf\fR not be writable
199 by anyone but root since a different \fIofboot\fR script could be
200 specified there.
201 .SH BUGS
202 .B Ybin 
203 should be able to take care of OpenFirmware variables as needed on IBM
204 hardware.
205 .SH AUTHORS
206 .B ybin
207 and this man page was written by Ethan Benson. 
208 .br
209 .B yaboot
210 was written by Benjamin Herrenschmidt.
211 .SH REPORTING BUGS
212 Report bugs to <erbenson@alaska.net>
213 .SH SEE ALSO
214 .BR bootstrap (8),
215 .BR hfsutils (1),
216 .BR mkofboot (8),
217 .BR mktemp (1),
218 .BR nvsetenv (8),
219 .BR ofpath (8),
220 .BR yaboot (8),
221 .BR yaboot.conf (5),