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