xref: /freebsd/usr.sbin/boot0cfg/boot0cfg.8 (revision daf1cffce2e07931f27c6c6998652e90df6ba87e)
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 boot0cfg
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 t Ar ticks
42.Ar disk
43.Sh DESCRIPTION
44The FreeBSD
45.Sq boot0
46boot manager permits the operator to select from which disk and which
47slice an i386 machine (PC) is booted.
48.Pp
49Note that what are referred to here as
50.Dq slices
51are typically called
52.Dq partitions
53in non-BSD documentation relating to the PC.  Typically, only
54non-removable disks are sliced.
55.Pp
56The
57.Nm
58utility optionally installs the
59.Sq boot0
60boot manager on the specified
61.Ar disk ;
62and allows various operational parameters to be configured.
63.Pp
64On PCs, a boot manager typically occupies sector 0 of a disk, which is
65known as the Master Boot Record (MBR).  The MBR contains both code (to
66which control is passed by the PC BIOS) and data (an embedded table of
67defined slices).
68.Pp
69The options are:
70.Bl -tag -width indent
71.It Fl B
72Install the
73.Sq boot0
74boot manager.  This option causes MBR code to be replaced, but without
75affecting the embedded slice table.
76.It Fl v
77Verbose: display information about the slices defined, etc.
78.It Fl b Ar boot0
79Specify which
80.Sq boot0
81image to use.  The default is /boot/boot0.
82.It Fl d Ar drive
83Specify the drive number used by the PC BIOS in referencing the drive
84which contains the specified
85.Ar disk .
86Typically this will be 0x80 for the first hard drive, 0x81 for the
87second hard drive, and so on; however any integer between 0 and 0xff
88is acceptable here.
89.It Fl f Ar file
90Specify that a backup copy of the preexisting MBR should be written to
91.Ar file .
92This file is created if it does not exist, and truncated if it does.
93.It Fl m Ar mask
94Specify slices to be enabled/disabled, where
95.Ar mask
96is an integer between 0 (no slices enabled) and 0xf (all four slices
97enabled).
98.It Fl o Ar options
99A comma-separated string of any of the following options may be
100specified (with
101.Dq no
102prepended as necessary):
103.Bl -tag -width indent
104.It packet
105Use the disk packet (BIOS Int 0x13 extensions) interface rather than
106the conventional (CHS) interface, when accessing disk-related BIOS
107services.  The default is
108.Sq nopacket .
109.It setdrv
110Forces the drive containing the disk to be referenced using drive
111number definable by means of the -d option.  The default is
112.Sq nosetdrv .
113.It update
114Allow the MBR to be updated by the boot manager.  (The MBR may be
115updated to flag slices as
116.Sq active ,
117and to save slice selection information.)  This is the default; a
118.Sq noupdate
119option causes the MBR to be treated as read-only.
120.El
121.It Fl t Ar ticks
122Set the timeout value to
123.Ar ticks .
124(There are approximately 18.2 ticks per second.)
125.El
126.Sh SEE ALSO
127.Xr boot 8 ,
128.Xr fdisk 8 .
129.Sh DIAGNOSTICS
130Exit status is 0 on success and >0 on error.
131.Sh AUTHORS
132.An Robert Nordier Aq rnordier@FreeBSD.org .
133.Sh BUGS
134Use of the
135.Sq packet
136option may cause
137.Sq boot0
138to fail, depending on the nature of BIOS support.
139.Pp
140Use of the
141.Sq setdrv
142option with an incorrect -d operand may cause the MBR to be written
143to the wrong disk.  Be careful!
144