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: src/usr.sbin/boot0cfg/boot0cfg.8,v 1.5.2.6 2003/03/12 22:08:13 trhodes Exp $ 26.\" $DragonFly: src/usr.sbin/boot0cfg/boot0cfg.8,v 1.4 2008/03/24 23:04:19 swildner Exp $ 27.\" 28.Dd January 16, 2009 29.Dt BOOT0CFG 8 30.Os 31.Sh NAME 32.Nm boot0cfg 33.Nd boot manager installation/configuration utility 34.Sh SYNOPSIS 35.Nm 36.Op Fl Bv 37.Op Fl b Ar boot0 38.Op Fl d Ar drive 39.Op Fl f Ar file 40.Op Fl m Ar mask 41.Op Fl o Ar options 42.Op Fl s Ar slice 43.Op Fl t Ar ticks 44.Ar disk 45.Sh DESCRIPTION 46The 47.Dx 48.Sq boot0 49boot manager permits the operator to select from which disk and 50slice an i386 machine (PC) is booted. 51.Pp 52Note that what are referred to here as 53.Dq slices 54are typically called 55.Dq partitions 56in 57.No non- Ns Bx 58documentation relating to the PC. 59Typically, only non-removable disks are sliced. 60.Pp 61The 62.Nm 63utility optionally installs the 64.Sq boot0 65boot manager on the specified 66.Ar disk ; 67and allows various operational parameters to be configured. 68.Pp 69On PCs, a boot manager typically occupies sector 0 of a disk, which is 70known as the Master Boot Record (MBR). 71The MBR contains both code (to which control is passed by the PC BIOS) 72and data (an embedded table of defined slices). 73.Pp 74The options are: 75.Bl -tag -width indent 76.It Fl B 77Install the 78.Sq boot0 79boot manager. 80This option causes MBR code to be replaced, without 81affecting the embedded slice table. 82.It Fl b Ar boot0 83Specify which 84.Sq boot0 85image to use. 86The default is 87.Pa /boot/boot0 . 88.It Fl d Ar drive 89Specify the drive number used by the PC BIOS in referencing the drive 90which contains the specified 91.Ar disk . 92Typically this will be 0x80 for the first hard drive, 0x81 for the 93second hard drive, and so on; however any integer between 0 and 0xff 94is acceptable here. 95.It Fl f Ar file 96Specify that a backup copy of the preexisting MBR should be written to 97.Ar file . 98This file is created if it does not exist, and replaced if it does. 99.It Fl m Ar mask 100Specify slices to be enabled/disabled, where 101.Ar mask 102is an integer between 0 (no slices enabled) and 0xf (all four slices 103enabled). 104.It Fl o Ar options 105A comma-separated string of any of the following options may be 106specified (with 107.Dq no 108prepended as necessary): 109.Bl -tag -width indent 110.It packet 111Try to use the disk packet (BIOS INT 0x13 extensions) interface, 112as opposed to the legacy (CHS) interface, when doing disk I/O. 113It might be necessary to avoid packet mode for very old systems, 114which have broken packet mode support. 115The default is 116.Sq packet . 117.It setdrv 118Forces the drive containing the disk to be referenced using drive 119number definable by means of the -d option. 120The default is 121.Sq nosetdrv . 122.It update 123Allow the MBR to be updated by the boot manager. 124(The MBR may be updated to flag slices as 125.Sq active , 126and to save slice selection information.) 127This is the default; a 128.Sq noupdate 129option causes the MBR to be treated as read-only. 130.El 131.It Fl s Ar slice 132Set the default boot selection to 133.Ar slice . 134Values between 1 and 4 refer to slices; a value of 5 refers to the 135option of booting from a second disk. 136.It Fl t Ar ticks 137Set the timeout value to 138.Ar ticks . 139(There are approximately 18.2 ticks per second.) 140.It Fl v 141Verbose: display information about the slices defined, etc. 142.El 143.Sh FILES 144.Bl -tag -width /boot/boot0 -compact 145.It Pa /boot/boot0 146The default 147.Sq boot0 148image 149.El 150.Sh EXIT STATUS 151.Ex -std 152.Sh EXAMPLES 153To boot slice 2 on the next boot: 154.Pp 155.Dl "boot0cfg -s 2 ad0" 156.Pp 157To enable just slices 1 and 2 in the menu: 158.Pp 159.Dl "boot0cfg -m 0x3 ad0" 160.Pp 161To go back to non-interactive booting, use 162.Xr fdisk 8 163to install the default MBR: 164.Pp 165.Dl "fdisk -B ad0" 166.Sh SEE ALSO 167.Xr boot 8 , 168.Xr fdisk 8 169.Sh AUTHORS 170.An Robert Nordier Aq rnordier@FreeBSD.org . 171.Sh BUGS 172Use of the 173.Sq packet 174option may cause 175.Sq boot0 176to fail, depending on the nature of BIOS support. 177.Pp 178Use of the 179.Sq setdrv 180option with an incorrect -d operand may cause the MBR to be written 181to the wrong disk. 182Be careful! 183