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