]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - usr.sbin/boot0cfg/boot0cfg.8
MFC r227274:
[FreeBSD/releng/9.0.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 November 7, 2011
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 e Ar bell character
39 .Op Fl f Ar file
40 .Op Fl i Ar volume-id
41 .Op Fl m Ar mask
42 .Op Fl o Ar options
43 .Op Fl s Ar slice
44 .Op Fl t Ar ticks
45 .Ar disk
46 .Sh DESCRIPTION
47 The
48 .Fx
49 .Sq boot0
50 boot manager permits the operator to select from which disk and
51 slice an i386 machine (PC) is booted.
52 .Pp
53 Note that what are referred to here as
54 .Dq slices
55 are typically called
56 .Dq partitions
57 in
58 .No non- Ns Bx
59 documentation relating to the PC.
60 Typically, only non-removable disks are sliced.
61 .Pp
62 The
63 .Nm
64 utility optionally installs the
65 .Sq boot0
66 boot manager on the specified
67 .Ar disk ;
68 and allows various operational parameters to be configured.
69 .Pp
70 On PCs, a boot manager typically occupies sector 0 of a disk, which is
71 known as the Master Boot Record (MBR).
72 The MBR contains both code (to which control is passed by the PC BIOS)
73 and data (an embedded table of defined slices).
74 .Pp
75 The options are:
76 .Bl -tag -width indent
77 .It Fl B
78 Install the
79 .Sq boot0
80 boot manager.
81 This option causes MBR code to be replaced, without
82 affecting the embedded slice table.
83 .It Fl b Ar boot0
84 Specify which
85 .Sq boot0
86 image to use.
87 The default is
88 .Pa /boot/boot0
89 which will use the video card as output, alternatively
90 .Pa /boot/boot0sio
91 can be used for output to the COM1 port.
92 (Be aware that nothing will be output to the COM1 port unless the
93 modem signals DSR and CTS are active.)
94 .It Fl d Ar drive
95 Specify the drive number used by the PC BIOS in referencing the drive
96 which contains the specified
97 .Ar disk .
98 Typically this will be 0x80 for the first hard drive, 0x81 for the
99 second hard drive, and so on; however any integer between 0 and 0xff
100 is acceptable here.
101 .It Fl e Ar bell character
102 Set the character to be printed in case of input error.
103 .It Fl f Ar file
104 Specify that a backup copy of the preexisting MBR should be written to
105 .Ar file .
106 This file is created if it does not exist, and replaced if it does.
107 .It Fl i Ar volume-id
108 Specifies a volume-id (in the form XXXX-XXXX) to be saved at location
109 0x1b8 in the MBR. This information is sometimes used by NT, XP and Vista
110 to identify the disk drive. The option is only compatible with version 2.00
111 of the 512-byte boot block.
112 .It Fl m Ar mask
113 Specify slices to be enabled/disabled, where
114 .Ar mask
115 is an integer between 0 (no slices enabled) and 0xf (all four slices
116 enabled).
117 .It Fl o Ar options
118 A comma-separated string of any of the following options may be
119 specified (with
120 .Dq no
121 prepended as necessary):
122 .Bl -tag -width indent
123 .It packet
124 Use the disk packet (BIOS INT 0x13 extensions) interface,
125 as opposed to the legacy (CHS) interface, when doing disk I/O.
126 This allows booting above cylinder 1023, but requires specific
127 BIOS support.
128 The default is
129 .Sq packet .
130 .It setdrv
131 Forces the drive containing the disk to be referenced using drive
132 number definable by means of the -d option.
133 The default is
134 .Sq nosetdrv .
135 .It update
136 Allow the MBR to be updated by the boot manager.
137 (The MBR may be updated to flag slices as
138 .Sq active ,
139 and to save slice selection information.)
140 This is the default; a
141 .Sq noupdate
142 option causes the MBR to be treated as read-only.
143 .El
144 .It Fl s Ar slice
145 Set the default boot selection to
146 .Ar slice .
147 Values between 1 and 4 refer to slices; a value of 5 refers to the
148 option of booting from a second disk.
149 .It Fl t Ar ticks
150 Set the timeout value to
151 .Ar ticks .
152 (There are approximately 18.2 ticks per second.)
153 .It Fl v
154 Verbose: display information about the slices defined, etc.
155 .El
156 .Sh FILES
157 .Bl -tag -width /boot/boot0sio -compact
158 .It Pa /boot/boot0
159 The default
160 .Sq boot0
161 image
162 .It Pa /boot/boot0sio
163 Image for serial consoles (COM1,9600,8,N,1,MODEM)
164 .El
165 .Sh EXIT STATUS
166 .Ex -std
167 .Sh EXAMPLES
168 To boot slice 2 on the next boot:
169 .Pp
170 .Dl "boot0cfg -s 2 ad0"
171 .Pp
172 To enable just slices 1 and 2 in the menu:
173 .Pp
174 .Dl "boot0cfg -m 0x3 ad0"
175 .Pp
176 To go back to non-interactive booting, use
177 .Xr fdisk 8
178 to install the default MBR:
179 .Pp
180 .Dl "fdisk -B ad0"
181 .Pp
182 .Sh SEE ALSO
183 .Xr geom 4 ,
184 .Xr boot 8 ,
185 .Xr fdisk 8 ,
186 .Xr gpart 8
187 .Sh AUTHORS
188 .An Robert Nordier Aq rnordier@FreeBSD.org .
189 .Sh BUGS
190 Use of the
191 .Sq packet
192 option may cause
193 .Sq boot0
194 to fail, depending on the nature of BIOS support.
195 .Pp
196 Use of the
197 .Sq setdrv
198 option with an incorrect -d operand may cause the boot0 code
199 to write the MBR to the wrong disk, thus trashing its previous
200 content.  Be careful.