10b654f60SRobert Nordier.\" Copyright (c) 1999 Robert Nordier 20b654f60SRobert Nordier.\" All rights reserved. 30b654f60SRobert Nordier.\" 40b654f60SRobert Nordier.\" Redistribution and use in source and binary forms, with or without 50b654f60SRobert Nordier.\" modification, are permitted provided that the following conditions 60b654f60SRobert Nordier.\" are met: 70b654f60SRobert Nordier.\" 1. Redistributions of source code must retain the above copyright 80b654f60SRobert Nordier.\" notice, this list of conditions and the following disclaimer. 90b654f60SRobert Nordier.\" 2. Redistributions in binary form must reproduce the above copyright 100b654f60SRobert Nordier.\" notice, this list of conditions and the following disclaimer in the 110b654f60SRobert Nordier.\" documentation and/or other materials provided with the distribution. 120b654f60SRobert Nordier.\" 130b654f60SRobert Nordier.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND 140b654f60SRobert Nordier.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 150b654f60SRobert Nordier.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 160b654f60SRobert Nordier.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 170b654f60SRobert Nordier.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 180b654f60SRobert Nordier.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 190b654f60SRobert Nordier.\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 200b654f60SRobert Nordier.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 210b654f60SRobert Nordier.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 220b654f60SRobert Nordier.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 230b654f60SRobert Nordier.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 240b654f60SRobert Nordier.\" 2597d92980SPeter Wemm.\" $FreeBSD$ 260b654f60SRobert Nordier.\" 270b654f60SRobert Nordier.Dd February 21, 1999 280b654f60SRobert Nordier.Dt BOOT0CFG 8 290b654f60SRobert Nordier.Os 300b654f60SRobert Nordier.Sh NAME 310b654f60SRobert Nordier.Nm boot0cfg 320b654f60SRobert Nordier.Nd boot manager installation/configuration utility 330b654f60SRobert Nordier.Sh SYNOPSIS 34e97407b4SRuslan Ermilov.Nm 350b654f60SRobert Nordier.Op Fl Bv 360b654f60SRobert Nordier.Op Fl b Ar boot0 370b654f60SRobert Nordier.Op Fl d Ar drive 380b654f60SRobert Nordier.Op Fl f Ar file 395868a099SRobert Nordier.Op Fl m Ar mask 400b654f60SRobert Nordier.Op Fl o Ar options 4181e309b7SDavid Malone.Op Fl s Ar slice 420b654f60SRobert Nordier.Op Fl t Ar ticks 430b654f60SRobert Nordier.Ar disk 440b654f60SRobert Nordier.Sh DESCRIPTION 45b5c508fbSRuslan ErmilovThe 46b5c508fbSRuslan Ermilov.Fx 470b654f60SRobert Nordier.Sq boot0 480b654f60SRobert Nordierboot manager permits the operator to select from which disk and which 490b654f60SRobert Nordierslice an i386 machine (PC) is booted. 500b654f60SRobert Nordier.Pp 510b654f60SRobert NordierNote that what are referred to here as 520b654f60SRobert Nordier.Dq slices 530b654f60SRobert Nordierare typically called 540b654f60SRobert Nordier.Dq partitions 55753d686dSRuslan Ermilovin 56753d686dSRuslan Ermilov.No non- Ns Bx 57753d686dSRuslan Ermilovdocumentation relating to the PC. 58a9264f3eSSheldon HearnTypically, only non-removable disks are sliced. 590b654f60SRobert Nordier.Pp 600b654f60SRobert NordierThe 610b654f60SRobert Nordier.Nm 620b654f60SRobert Nordierutility optionally installs the 630b654f60SRobert Nordier.Sq boot0 640b654f60SRobert Nordierboot manager on the specified 650b654f60SRobert Nordier.Ar disk ; 660b654f60SRobert Nordierand allows various operational parameters to be configured. 670b654f60SRobert Nordier.Pp 680b654f60SRobert NordierOn PCs, a boot manager typically occupies sector 0 of a disk, which is 69a9264f3eSSheldon Hearnknown as the Master Boot Record (MBR). 70a9264f3eSSheldon HearnThe MBR contains both code (to which control is passed by the PC BIOS) 71a9264f3eSSheldon Hearnand data (an embedded table of defined slices). 720b654f60SRobert Nordier.Pp 730b654f60SRobert NordierThe options are: 740b654f60SRobert Nordier.Bl -tag -width indent 750b654f60SRobert Nordier.It Fl B 760b654f60SRobert NordierInstall the 770b654f60SRobert Nordier.Sq boot0 78a9264f3eSSheldon Hearnboot manager. 79a9264f3eSSheldon HearnThis option causes MBR code to be replaced, but without 800b654f60SRobert Nordieraffecting the embedded slice table. 810b654f60SRobert Nordier.It Fl v 820b654f60SRobert NordierVerbose: display information about the slices defined, etc. 830b654f60SRobert Nordier.It Fl b Ar boot0 840b654f60SRobert NordierSpecify which 850b654f60SRobert Nordier.Sq boot0 86a9264f3eSSheldon Hearnimage to use. 878aab42e1SSheldon HearnThe default is 888aab42e1SSheldon Hearn.Pa /boot/boot0 . 890b654f60SRobert Nordier.It Fl d Ar drive 900b654f60SRobert NordierSpecify the drive number used by the PC BIOS in referencing the drive 910b654f60SRobert Nordierwhich contains the specified 920b654f60SRobert Nordier.Ar disk . 930b654f60SRobert NordierTypically this will be 0x80 for the first hard drive, 0x81 for the 940b654f60SRobert Nordiersecond hard drive, and so on; however any integer between 0 and 0xff 950b654f60SRobert Nordieris acceptable here. 960b654f60SRobert Nordier.It Fl f Ar file 970b654f60SRobert NordierSpecify that a backup copy of the preexisting MBR should be written to 980b654f60SRobert Nordier.Ar file . 990b654f60SRobert NordierThis file is created if it does not exist, and truncated if it does. 1005868a099SRobert Nordier.It Fl m Ar mask 1015868a099SRobert NordierSpecify slices to be enabled/disabled, where 1025868a099SRobert Nordier.Ar mask 1035868a099SRobert Nordieris an integer between 0 (no slices enabled) and 0xf (all four slices 1045868a099SRobert Nordierenabled). 1050b654f60SRobert Nordier.It Fl o Ar options 1060b654f60SRobert NordierA comma-separated string of any of the following options may be 1070b654f60SRobert Nordierspecified (with 1080b654f60SRobert Nordier.Dq no 1090b654f60SRobert Nordierprepended as necessary): 1100b654f60SRobert Nordier.Bl -tag -width indent 1110b654f60SRobert Nordier.It packet 1121d5731beSRobert NordierUse the disk packet (BIOS Int 0x13 extensions) interface, as 1131d5731beSRobert Nordieras opposed to the legacy (CHS) interface, when doing disk I/O. 1141d5731beSRobert NordierThis allows booting above cylinder 1023, but requires specific 1151d5731beSRobert NordierBIOS support. 1161d5731beSRobert NordierThe default is 1171d5731beSRobert Nordier.Sq nopacket . 1180b654f60SRobert Nordier.It setdrv 119ee6fb785SRobert NordierForces the drive containing the disk to be referenced using drive 120a9264f3eSSheldon Hearnnumber definable by means of the -d option. 121a9264f3eSSheldon HearnThe default is 1220b654f60SRobert Nordier.Sq nosetdrv . 1230b654f60SRobert Nordier.It update 124a9264f3eSSheldon HearnAllow the MBR to be updated by the boot manager. 125a9264f3eSSheldon Hearn(The MBR may be updated to flag slices as 1260b654f60SRobert Nordier.Sq active , 127a9264f3eSSheldon Hearnand to save slice selection information.) 128a9264f3eSSheldon HearnThis is the default; a 1290b654f60SRobert Nordier.Sq noupdate 1300b654f60SRobert Nordieroption causes the MBR to be treated as read-only. 1310b654f60SRobert Nordier.El 13281e309b7SDavid Malone.It Fl s Ar slice 13381e309b7SDavid MaloneSet the default boot selection to 13481e309b7SDavid Malone.Ar slice . 13581e309b7SDavid MaloneValues between 1 and 4 refer to slices; a value of 5 refers to the 136a9264f3eSSheldon Hearnoption of booting from a second disk. 137a9264f3eSSheldon HearnThis would normally be used in conjunction with the 13881e309b7SDavid Malone.Sq noupdate 13981e309b7SDavid Maloneoption. 140ed720ec3SRobert Nordier.It Fl t Ar ticks 1410b654f60SRobert NordierSet the timeout value to 1420b654f60SRobert Nordier.Ar ticks . 1430b654f60SRobert Nordier(There are approximately 18.2 ticks per second.) 1440b654f60SRobert Nordier.El 145504dd5eaSRuslan Ermilov.Sh FILES 146504dd5eaSRuslan Ermilov.Bl -tag -width /boot/boot0 -compact 147504dd5eaSRuslan Ermilov.It Pa /boot/boot0 148504dd5eaSRuslan ErmilovThe default 149504dd5eaSRuslan Ermilov.Sq boot0 150504dd5eaSRuslan Ermilovimage 151504dd5eaSRuslan Ermilov.El 1520b654f60SRobert Nordier.Sh SEE ALSO 1530b654f60SRobert Nordier.Xr boot 8 , 15476a06f84SBen Smithurst.Xr fdisk 8 1550b654f60SRobert Nordier.Sh DIAGNOSTICS 1560b654f60SRobert NordierExit status is 0 on success and >0 on error. 1570b654f60SRobert Nordier.Sh AUTHORS 1580b654f60SRobert Nordier.An Robert Nordier Aq rnordier@FreeBSD.org . 1590b654f60SRobert Nordier.Sh BUGS 1600b654f60SRobert NordierUse of the 1610b654f60SRobert Nordier.Sq packet 1620b654f60SRobert Nordieroption may cause 1630b654f60SRobert Nordier.Sq boot0 1640b654f60SRobert Nordierto fail, depending on the nature of BIOS support. 1650b654f60SRobert Nordier.Pp 166ee6fb785SRobert NordierUse of the 1670b654f60SRobert Nordier.Sq setdrv 168ee6fb785SRobert Nordieroption with an incorrect -d operand may cause the MBR to be written 169a9264f3eSSheldon Hearnto the wrong disk. 170a9264f3eSSheldon HearnBe careful! 171