]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/boot0cfg/boot0cfg.8
Document /boot/mbr (non-interactive boot block)
[FreeBSD/FreeBSD.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$
26 .\"
27 .Dd February 21, 1999
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 .Fx
47 .Sq boot0
48 boot manager permits the operator to select from which disk and
49 slice an i386 machine (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 Use
93 .Pa /boot/mbr
94 to revert to non-interactive boot manager.
95 .It Fl d Ar drive
96 Specify the drive number used by the PC BIOS in referencing the drive
97 which contains the specified
98 .Ar disk .
99 Typically this will be 0x80 for the first hard drive, 0x81 for the
100 second hard drive, and so on; however any integer between 0 and 0xff
101 is acceptable here.
102 .It Fl f Ar file
103 Specify that a backup copy of the preexisting MBR should be written to
104 .Ar file .
105 This file is created if it does not exist, and replaced if it does.
106 .It Fl m Ar mask
107 Specify slices to be enabled/disabled, where
108 .Ar mask
109 is an integer between 0 (no slices enabled) and 0xf (all four slices
110 enabled).
111 .It Fl o Ar options
112 A comma-separated string of any of the following options may be
113 specified (with
114 .Dq no
115 prepended as necessary):
116 .Bl -tag -width indent
117 .It packet
118 Use the disk packet (BIOS INT 0x13 extensions) interface,
119 as opposed to the legacy (CHS) interface, when doing disk I/O.
120 This allows booting above cylinder 1023, but requires specific
121 BIOS support.
122 The default is
123 .Sq packet .
124 .It setdrv
125 Forces the drive containing the disk to be referenced using drive
126 number definable by means of the -d option.
127 The default is
128 .Sq nosetdrv .
129 .It update
130 Allow the MBR to be updated by the boot manager.
131 (The MBR may be updated to flag slices as
132 .Sq active ,
133 and to save slice selection information.)
134 This is the default; a
135 .Sq noupdate
136 option causes the MBR to be treated as read-only.
137 .El
138 .It Fl s Ar slice
139 Set the default boot selection to
140 .Ar slice .
141 Values between 1 and 4 refer to slices; a value of 5 refers to the
142 option of booting from a second disk.
143 .It Fl t Ar ticks
144 Set the timeout value to
145 .Ar ticks .
146 (There are approximately 18.2 ticks per second.)
147 .It Fl v
148 Verbose: display information about the slices defined, etc.
149 .El
150 .Sh FILES
151 .Bl -tag -width /boot/boot0sio -compact
152 .It Pa /boot/boot0
153 The default
154 .Sq boot0
155 image
156 .It Pa /boot/boot0sio
157 Image for serial consoles (COM1,9600,8,N,1,MODEM)
158 .It Pa /boot/mbr
159 Non-interactive boot MBR image
160 .El
161 .Sh EXIT STATUS
162 .Ex -std
163 .Sh EXAMPLES
164 To boot slice 2 on the next boot:
165 .Pp
166 .Dl "boot0cfg -s 2 ad0"
167 .Pp
168 To enable just slices 1 and 2 in the menu:
169 .Pp
170 .Dl "boot0cfg -m 0x3 ad0"
171 .Pp
172 To go back to non-interactive booting:
173 .Pp
174 .Dl "boot0cfg -B -b /boot/mbr ad0"
175 .Pp
176 .Sh SEE ALSO
177 .Xr geom 4 ,
178 .Xr boot 8 ,
179 .Xr fdisk 8
180 .Sh AUTHORS
181 .An Robert Nordier Aq rnordier@FreeBSD.org .
182 .Sh BUGS
183 Protection mechanisms in the
184 .Xr geom 4
185 subsystem might prevent
186 .Nm
187 from being able to update the MBR on a mounted disk.
188 Instructions for temporarily disabling these protection mechanisms
189 can be found in the
190 .Xr geom 4
191 manpage.
192 .Pp
193 Use of the
194 .Sq packet
195 option may cause
196 .Sq boot0
197 to fail, depending on the nature of BIOS support.
198 .Pp
199 Use of the
200 .Sq setdrv
201 option with an incorrect -d operand may cause the MBR to be written
202 to the wrong disk.
203 Be careful!