1999-02-21 21:23:42 +00:00
|
|
|
.\" Copyright (c) 1999 Robert Nordier
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
|
|
|
.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
|
|
.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
|
|
.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
|
|
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
|
|
|
.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1999-02-21 21:23:42 +00:00
|
|
|
.\"
|
|
|
|
.Dd February 21, 1999
|
|
|
|
.Dt BOOT0CFG 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm boot0cfg
|
|
|
|
.Nd boot manager installation/configuration utility
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1999-02-21 21:23:42 +00:00
|
|
|
.Op Fl Bv
|
|
|
|
.Op Fl b Ar boot0
|
|
|
|
.Op Fl d Ar drive
|
|
|
|
.Op Fl f Ar file
|
1999-06-19 21:44:43 +00:00
|
|
|
.Op Fl m Ar mask
|
1999-02-21 21:23:42 +00:00
|
|
|
.Op Fl o Ar options
|
2000-08-17 18:42:13 +00:00
|
|
|
.Op Fl s Ar slice
|
1999-02-21 21:23:42 +00:00
|
|
|
.Op Fl t Ar ticks
|
|
|
|
.Ar disk
|
|
|
|
.Sh DESCRIPTION
|
2000-11-14 11:20:58 +00:00
|
|
|
The
|
|
|
|
.Fx
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sq boot0
|
|
|
|
boot manager permits the operator to select from which disk and which
|
|
|
|
slice an i386 machine (PC) is booted.
|
|
|
|
.Pp
|
|
|
|
Note that what are referred to here as
|
|
|
|
.Dq slices
|
|
|
|
are typically called
|
|
|
|
.Dq partitions
|
2001-08-14 10:01:54 +00:00
|
|
|
in
|
|
|
|
.No non- Ns Bx
|
|
|
|
documentation relating to the PC.
|
2000-09-11 10:19:15 +00:00
|
|
|
Typically, only non-removable disks are sliced.
|
1999-02-21 21:23:42 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility optionally installs the
|
|
|
|
.Sq boot0
|
|
|
|
boot manager on the specified
|
|
|
|
.Ar disk ;
|
|
|
|
and allows various operational parameters to be configured.
|
|
|
|
.Pp
|
|
|
|
On PCs, a boot manager typically occupies sector 0 of a disk, which is
|
2000-09-11 10:19:15 +00:00
|
|
|
known as the Master Boot Record (MBR).
|
|
|
|
The MBR contains both code (to which control is passed by the PC BIOS)
|
|
|
|
and data (an embedded table of defined slices).
|
1999-02-21 21:23:42 +00:00
|
|
|
.Pp
|
|
|
|
The options are:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl B
|
|
|
|
Install the
|
|
|
|
.Sq boot0
|
2000-09-11 10:19:15 +00:00
|
|
|
boot manager.
|
|
|
|
This option causes MBR code to be replaced, but without
|
1999-02-21 21:23:42 +00:00
|
|
|
affecting the embedded slice table.
|
|
|
|
.It Fl v
|
|
|
|
Verbose: display information about the slices defined, etc.
|
|
|
|
.It Fl b Ar boot0
|
|
|
|
Specify which
|
|
|
|
.Sq boot0
|
2000-09-11 10:19:15 +00:00
|
|
|
image to use.
|
2000-09-11 10:21:10 +00:00
|
|
|
The default is
|
|
|
|
.Pa /boot/boot0 .
|
1999-02-21 21:23:42 +00:00
|
|
|
.It Fl d Ar drive
|
|
|
|
Specify the drive number used by the PC BIOS in referencing the drive
|
|
|
|
which contains the specified
|
|
|
|
.Ar disk .
|
|
|
|
Typically this will be 0x80 for the first hard drive, 0x81 for the
|
|
|
|
second hard drive, and so on; however any integer between 0 and 0xff
|
|
|
|
is acceptable here.
|
|
|
|
.It Fl f Ar file
|
|
|
|
Specify that a backup copy of the preexisting MBR should be written to
|
|
|
|
.Ar file .
|
|
|
|
This file is created if it does not exist, and truncated if it does.
|
1999-06-19 21:44:43 +00:00
|
|
|
.It Fl m Ar mask
|
|
|
|
Specify slices to be enabled/disabled, where
|
|
|
|
.Ar mask
|
|
|
|
is an integer between 0 (no slices enabled) and 0xf (all four slices
|
|
|
|
enabled).
|
1999-02-21 21:23:42 +00:00
|
|
|
.It Fl o Ar options
|
|
|
|
A comma-separated string of any of the following options may be
|
|
|
|
specified (with
|
|
|
|
.Dq no
|
|
|
|
prepended as necessary):
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It packet
|
2000-10-02 23:16:58 +00:00
|
|
|
Use the disk packet (BIOS Int 0x13 extensions) interface, as
|
|
|
|
as opposed to the legacy (CHS) interface, when doing disk I/O.
|
|
|
|
This allows booting above cylinder 1023, but requires specific
|
|
|
|
BIOS support.
|
|
|
|
The default is
|
|
|
|
.Sq nopacket .
|
1999-02-21 21:23:42 +00:00
|
|
|
.It setdrv
|
1999-02-26 14:57:17 +00:00
|
|
|
Forces the drive containing the disk to be referenced using drive
|
2000-09-11 10:19:15 +00:00
|
|
|
number definable by means of the -d option.
|
|
|
|
The default is
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sq nosetdrv .
|
|
|
|
.It update
|
2000-09-11 10:19:15 +00:00
|
|
|
Allow the MBR to be updated by the boot manager.
|
|
|
|
(The MBR may be updated to flag slices as
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sq active ,
|
2000-09-11 10:19:15 +00:00
|
|
|
and to save slice selection information.)
|
|
|
|
This is the default; a
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sq noupdate
|
|
|
|
option causes the MBR to be treated as read-only.
|
|
|
|
.El
|
2000-08-17 18:42:13 +00:00
|
|
|
.It Fl s Ar slice
|
|
|
|
Set the default boot selection to
|
|
|
|
.Ar slice .
|
|
|
|
Values between 1 and 4 refer to slices; a value of 5 refers to the
|
2000-09-11 10:19:15 +00:00
|
|
|
option of booting from a second disk.
|
|
|
|
This would normally be used in conjunction with the
|
2000-08-17 18:42:13 +00:00
|
|
|
.Sq noupdate
|
|
|
|
option.
|
1999-02-22 09:36:54 +00:00
|
|
|
.It Fl t Ar ticks
|
1999-02-21 21:23:42 +00:00
|
|
|
Set the timeout value to
|
|
|
|
.Ar ticks .
|
|
|
|
(There are approximately 18.2 ticks per second.)
|
|
|
|
.El
|
2001-07-18 07:12:46 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /boot/boot0 -compact
|
|
|
|
.It Pa /boot/boot0
|
|
|
|
The default
|
|
|
|
.Sq boot0
|
|
|
|
image
|
|
|
|
.El
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr boot 8 ,
|
2000-11-15 17:27:54 +00:00
|
|
|
.Xr fdisk 8
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
Exit status is 0 on success and >0 on error.
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An Robert Nordier Aq rnordier@FreeBSD.org .
|
|
|
|
.Sh BUGS
|
|
|
|
Use of the
|
|
|
|
.Sq packet
|
|
|
|
option may cause
|
|
|
|
.Sq boot0
|
|
|
|
to fail, depending on the nature of BIOS support.
|
|
|
|
.Pp
|
1999-02-26 14:57:17 +00:00
|
|
|
Use of the
|
1999-02-21 21:23:42 +00:00
|
|
|
.Sq setdrv
|
1999-02-26 14:57:17 +00:00
|
|
|
option with an incorrect -d operand may cause the MBR to be written
|
2000-09-11 10:19:15 +00:00
|
|
|
to the wrong disk.
|
|
|
|
Be careful!
|