Build: Bump __DragonFly_version to 500703
[dragonfly.git] / usr.sbin / boot0cfg / boot0cfg.8
1 .\" Copyright (c) 1999 Robert Nordier
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
17 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
18 .\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
19 .\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
20 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
22 .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23 .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/usr.sbin/boot0cfg/boot0cfg.8,v 1.5.2.6 2003/03/12 22:08:13 trhodes Exp $
26 .\"
27 .Dd June 20, 2009
28 .Dt BOOT0CFG 8
29 .Os
30 .Sh NAME
31 .Nm boot0cfg
32 .Nd boot manager installation/configuration utility
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl Bv
36 .Op Fl b Ar boot0
37 .Op Fl d Ar drive
38 .Op Fl f Ar file
39 .Op Fl m Ar mask
40 .Op Fl o Ar options
41 .Op Fl s Ar slice
42 .Op Fl t Ar ticks
43 .Ar disk
44 .Sh DESCRIPTION
45 The
46 .Dx
47 .Sq boot0
48 boot manager permits the operator to select from which disk and
49 slice a PC is booted.
50 .Pp
51 Note that what are referred to here as
52 .Dq slices
53 are typically called
54 .Dq partitions
55 in
56 .No non- Ns Bx
57 documentation relating to the PC.
58 Typically, only non-removable disks are sliced.
59 .Pp
60 The
61 .Nm
62 utility optionally installs the
63 .Sq boot0
64 boot manager on the specified
65 .Ar disk ;
66 and allows various operational parameters to be configured.
67 .Pp
68 On PCs, a boot manager typically occupies sector 0 of a disk, which is
69 known as the Master Boot Record (MBR).
70 The MBR contains both code (to which control is passed by the PC BIOS)
71 and data (an embedded table of defined slices).
72 .Pp
73 The options are:
74 .Bl -tag -width indent
75 .It Fl B
76 Install the
77 .Sq boot0
78 boot manager.
79 This option causes MBR code to be replaced, without
80 affecting the embedded slice table.
81 .It Fl b Ar boot0
82 Specify which
83 .Sq boot0
84 image to use.
85 The default is
86 .Pa /boot/boot0
87 which will use the video card as output, alternatively
88 .Pa /boot/boot0sio
89 can be used for output to the COM1 port.
90 (Be aware that nothing will be output to the COM1 port unless the
91 modem signals DSR and CTS are active.)
92 .It Fl d Ar drive
93 Specify the drive number used by the PC BIOS in referencing the drive
94 which contains the specified
95 .Ar disk .
96 Typically this will be 0x80 for the first hard drive, 0x81 for the
97 second hard drive, and so on; however any integer between 0 and 0xff
98 is acceptable here.
99 .It Fl f Ar file
100 Specify that a backup copy of the preexisting MBR should be written to
101 .Ar file .
102 This file is created if it does not exist, and replaced if it does.
103 .It Fl m Ar mask
104 Specify slices to be enabled/disabled, where
105 .Ar mask
106 is an integer between 0 (no slices enabled) and 0xf (all four slices
107 enabled).
108 .It Fl o Ar options
109 A comma-separated string of any of the following options may be
110 specified (with
111 .Dq no
112 prepended as necessary):
113 .Bl -tag -width indent
114 .It packet
115 Try to use the disk packet (BIOS INT 0x13 extensions) interface,
116 as opposed to the legacy (CHS) interface, when doing disk I/O.
117 It might be necessary to avoid packet mode for very old systems,
118 which have broken packet mode support.
119 The default is
120 .Sq packet .
121 .It setdrv
122 Forces the drive containing the disk to be referenced using drive
123 number definable by means of the
124 .Fl d
125 option.
126 The default is
127 .Sq nosetdrv .
128 .It update
129 Allow the MBR to be updated by the boot manager.
130 (The MBR may be updated to flag slices as
131 .Sq active ,
132 and to save slice selection information.)
133 This is the default; a
134 .Sq noupdate
135 option causes the MBR to be treated as read-only.
136 .El
137 .It Fl s Ar slice
138 Set the default boot selection to
139 .Ar slice .
140 Values between 1 and 4 refer to slices; a value of 5 refers to the
141 option of booting from a second disk.
142 .It Fl t Ar ticks
143 Set the timeout value to
144 .Ar ticks .
145 (There are approximately 18.2 ticks per second.)
146 .It Fl v
147 Verbose: display information about the slices defined, etc.
148 .El
149 .Sh FILES
150 .Bl -tag -width ".Pa /boot/boot0sio" -compact
151 .It Pa /boot/boot0
152 The default
153 .Sq boot0
154 image
155 .It Pa /boot/boot0sio
156 Image for serial consoles (COM1,9600,8,N,1,MODEM)
157 .El
158 .Sh EXIT STATUS
159 .Ex -std
160 .Sh EXAMPLES
161 To boot slice 2 on the next boot:
162 .Pp
163 .Dl "boot0cfg -s 2 ad0"
164 .Pp
165 To enable just slices 1 and 2 in the menu:
166 .Pp
167 .Dl "boot0cfg -m 0x3 ad0"
168 .Pp
169 To go back to non-interactive booting, use
170 .Xr fdisk 8
171 to install the default MBR:
172 .Pp
173 .Dl "fdisk -B ad0"
174 .Sh SEE ALSO
175 .Xr boot 8 ,
176 .Xr fdisk 8
177 .Sh AUTHORS
178 .An Robert Nordier Aq Mt rnordier@FreeBSD.org .
179 .Sh BUGS
180 Use of the
181 .Sq packet
182 option may cause
183 .Sq boot0
184 to fail, depending on the nature of BIOS support.
185 .Pp
186 Use of the
187 .Sq setdrv
188 option with an incorrect
189 .Fl d
190 operand may cause the MBR to be written to the wrong disk.
191 Be careful!