]> git.ozlabs.org Git - yaboot.git/blob - man/mkofboot.8
Commit yaboot 1.3.0
[yaboot.git] / man / mkofboot.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 MKOFBOOT 8 "28 April 2001" "GNU/Linux PowerPC" "System Manager's Manual"
21 .SH NAME
22 .B mkofboot
23 \- format bootstrap partition and install the yaboot boot loader
24 .SH SYNOPSIS
25 .B mkofboot 
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 [ \ \-\-device\ \fIOF-dev\  ]
38 .RB [ \ \-\-partition\ \fIroot-part-#\  ]
39 .RB [ \ \-\-timeout\ \fItimeout\  ]
40 .RB [ \ \-\-image\ \fIkernel\  ]
41 .RB [ \ \-\-label\ \fIlabel\  ]
42 .RB [ \ \-\-root\ \fIroot-dev\  ]
43 .RB [ \ \-\-force\  ]
44 .RB [ \ \-v | \-\-verbose\  ]
45 .RB [ \ \-\-debug\  ]
46 .RB [ \ \-h | \-\-help\  ]
47 .RB [ \ \-V | \-\-version\  ]
48 .SH DESCRIPTION
49 This manual page explains 
50 .B mkofboot
51 the initial installer for the  
52 .BR yaboot (8) 
53 boot loader enabling GNU/Linux to be booted by OpenFirmware.
54
55 .B mkofboot
56 does exactly the same thing as 
57 .BR ybin (8)
58 except that it erases and creates a new filesystem (specified by
59 \-\-filesystem) on the \fBbootstrap\fR(8) partition before copying the
60 boot loader files to it.  See the
61 .BR ybin (8)
62 man page for more details on the installation process.
63
64 The \fBbootstrap\fR(8) need not and should not be mounted anywhere on
65 your filesystem, especially not on top of /boot.  \fBYaboot\fR(8) is able
66 to load the kernels from the ext2fs root partition so that is where
67 they should be kept. \fBMkofboot\fR will refuse to operate on the
68 \fBbootstrap\fR(8) partition if it is mounted.
69 .SH OPTIONS
70 NOTE:
71 .B mkofboot
72 uses the exact same command line options as
73 .BR ybin (8)
74 so if you have already read the \fBybin\fR(8) man page you can skip this
75 section. 
76 .TP
77 .BR \-b ,\  \-\-boot\ \fIdevice
78 Install the boot loader onto the specified device.  This device should
79 be that of your \fBbootstrap\fR(8) partition. For example, if your
80 \fBbootstrap\fR partition is located on your first primary IDE drive in the 
81 second partition, your device would be: \fI/dev/hda2\fR.
82 .TP
83 .BR \-o ,\  \-\-ofboot\ \fIof-path
84 The OpenFirmware device path to the \fBbootstrap\fR(8) partition. This
85 is needed so the first stage \fIofboot\fR loader can be configured
86 properly.  It should include the OpenFirmware path including the
87 partition number (but not any filename).  Example: if your
88 \fBbootstrap\fR(8) partition is /dev/hda2, the OF path will likely be
89 hd:2.  As of \fBmkofboot\fR 0.18 you no longer are required to specify
90 this option.  If left undefined \fBmkofboot\fR will attempt to figure
91 out the OpenFirmware path automatically using the \fBofpath\fR(8)
92 utility.  You should only need to define this option if
93 \fBofpath\fR(8) fails.
94 .TP
95 .BR \-i ,\  \-\-install\ \fIboot-file
96 Use \fIboot-file\fR as the primary boot loader executable, instead of
97 the default\fI/usr/local/lib/yaboot/yaboot\fR(8).
98 .TP
99 .BR \-C ,\  \-\-config\ \fIconfig-file
100 Use \fIconfig-file\fR as the \fBmkofboot\fR/\fByaboot\fR(8) configuration
101 file instead of the default \fI/etc/yaboot.conf\fR.
102 .TP
103 .BR \-m ,\  \-\-magicboot\ \fIchrp-script
104 Use \fIchrp-script\fR as the boot loader \*(lqwrapper\*(rq. This
105 script is needed to either provide a boot menu for dual boot with
106 MacOS or to load yaboot (due to an OpenFirmware bug).
107 .TP
108 .BR \-\-filesystem\ \fIhfs\fR|\fImsdos\fR|\fIraw\fR
109 Set the filesystem type that \fBmkofboot\fR will create on the
110 \fBbootstrap\fR(8). The \*(lqraw\*(rq filesystem type causes
111 \fBmkofboot\fR to copy the bootloader (the value of \fIinstall=\fR
112 directly to the \fBbootstrap\fR(8) partition without creating a
113 filesystem.  \*(lqraw\*(rq is required on IBM hardware.  CAUTION: this
114 will destroy any data or filesystem on the \fBbootstrap\fR(8)
115 partition (value of \fIboot=\fR) if you specify something like
116 \fIboot=/dev/sda\fR you will destroy the partition table and lose ALL
117 data on the disk.  The default is HFS.
118 .TP
119 .BR \-M ,\  \-\-mount
120 Do not use the userspace
121 .BR hfsutils (1)
122 to modify the \fBbootstrap\fR(8), instead try and mount the filesystem
123 directly.  NOTE: Attributes cannot be set on the filesystem or the
124 boot loader files using this method, your system will NOT be bootable
125 without modifying OpenFirmware's \*(lqboot-device\*(rq variable to something
126 like: \*(lqhd:2,ofboot\*(rq (no quotes).
127 .TP
128 .BR \-\-nobless
129 Do not \*(lqbless\*(rq the root directory of the \fBbootstrap\fR(8)
130 partition's filesystem.  Only use this option if the \fBbootstrap\fR(8)
131 partition is actually a MacOS boot partition.  This option is ignored
132 unless the filesystem is HFS, and is ignored when used with \-\-mount.
133 .TP
134 .BR \-\-hide
135 .br
136 Set the invisible bit on all the boot loader files once copied to the
137 \fBbootstrap\fR(8) partition.  This setting is useful if you must install
138 the boot loader onto a MacOS boot partition and do not with to see the
139 boot loader files cluttering up the MacOS root directory.  This option
140 is ignored unless the filesystem is HFS, and will not work
141 with \-\-mount.
142 .TP
143 .BR \-\-protect
144 Set the read-only bit on all boot loader files once copied to the
145 \fBbootstrap\fR(8) partition.  This setting is useful if you must install
146 the bootloader onto a MacOS boot partition and want to discourage
147 alterations/deletion of the boot loader.  This option works for both
148 HFS and MSDOS filesystems.
149 .TP
150 .BR \-\-nonvram
151 Prevent \fBmkofboot\fR from setting the OpenFirmware boot-device
152 variable with \fBnvsetenv\fR(8).
153 .TP
154 .BR \-\-device\ \fIopenfirmware-dev-path
155 This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
156 specifies the OpenFirmware device of the disk the system will boot
157 from.  The default is \*(lqhd:\*(rq.
158 .TP
159 .BR \-\-partition\ \fIroot-partition-number
160 This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
161 specifies the partition number of the root filesystem.  Mac partition
162 tables are considered a partition themselves, so the first real
163 partition will be 2, usually the \fBbootstrap\fR(8) partition, followed
164 by the root partition, number 3.
165 .TP
166 .BR \-\-timeout\ \fItimeout
167 This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
168 specifies the timeout value in tenths of a second.  The timeout is how
169 long \fByaboot\fR(8) will wait before booting the default (first listed)
170 image.
171 .TP
172 .BR \-\-image\ \fIkernel-image
173 This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
174 specifies the path to the default kernel to be booted.
175 .TP
176 .BR \-\-label\ \fIlabel
177 This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
178 specifies the label used to boot the above kernel image.  The default
179 is Linux.
180 .TP
181 .BR \-\-root\ \fIroot-device
182 This option is used for auto-generation of a \fByaboot.conf\fR(5).  This
183 specifies the Linux device of the root partition.  This is passed to
184 the kernel at boot time.  The default is \fI/dev/hda3\fR.
185 .TP
186 .BR \-v ,\  \-\-verbose
187 This option causes \fBmkofboot\fR to be more verbose as it proceeds.
188 .TP
189 .BR \-f ,\  \-\-force
190 This option suppresses any confirmation questions.
191 .TP
192 .BR \-\-debug
193 This option causes \fBmkofboot\fR to output some boring details useful
194 only for debugging \fBmkofboot\fR itself.
195 .TP
196 .BR \-h ,\  \-\-help
197 Print out usage information and exit.
198 .TP
199 .BR \-V ,\  \-\-version
200 Print out the version number and exit.
201 .SH FILES
202 .nf
203 /usr/local/lib/yaboot/yaboot \- boot loader executable
204 /usr/local/lib/yaboot/ofboot \- OpenFirmware boot script
205 /etc/yaboot.conf \- boot loader/mkofboot configuration file
206 .fi
207 .SH ENVIRONMENT
208 .TP
209 .B TMPDIR
210 .br
211 The temporary directory \fBmkofboot\fR will use.
212 .SH SECURITY
213 The \fByaboot.conf\fR(5) auto generation requires a temporary file, this
214 file is created with
215 .BR mktemp (1)
216 it is important that your system use a secure 
217 .BR mktemp (1)
218 program otherwise \fBmkofboot\fR will be vulnerable to race conditions.
219 The Debian mktemp is derived from OpenBSD and thus should be secure.
220
221 \fI/usr/local/lib/yaboot/ofboot\fR now contains code executed by /bin/sh (by
222 \fBmkofboot\fR) it is thus critical that it not be writable by anyone
223 but root.  It is also critical that \fI/etc/yaboot.conf\fR not be
224 writable by anyone but root since a different \fIofboot\fR script could be
225 specified there.
226 .SH BUGS
227 .B Mkofboot
228 should be able to take care of OpenFirmware variables as needed on IBM
229 hardware.
230 .SH AUTHORS
231 .BR mkofboot (8)
232 , and this man page written by Ethan Benson. 
233 .br
234 .BR yaboot (8)
235 was written by Benjamin Herrenschmidt.
236 .SH REPORTING BUGS
237 Report bugs to <erbenson@alaska.net>
238 .br
239 Report bugs in \fByaboot\fR(8) to <benh@kernel.crashing.org>
240 .SH SEE ALSO
241 .BR bootstrap (8),
242 .BR hfsutils (1),
243 .BR mkofboot (8),
244 .BR mktemp (1),
245 .BR mount (8),
246 .BR nvsetenv (8),
247 .BR ofpath (8),
248 .BR yaboot (8),
249 .BR yaboot.conf (5).