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 55a9264f3eSSheldon Hearnin non-BSD documentation relating to the PC. 56a9264f3eSSheldon HearnTypically, only non-removable disks are sliced. 570b654f60SRobert Nordier.Pp 580b654f60SRobert NordierThe 590b654f60SRobert Nordier.Nm 600b654f60SRobert Nordierutility optionally installs the 610b654f60SRobert Nordier.Sq boot0 620b654f60SRobert Nordierboot manager on the specified 630b654f60SRobert Nordier.Ar disk ; 640b654f60SRobert Nordierand allows various operational parameters to be configured. 650b654f60SRobert Nordier.Pp 660b654f60SRobert NordierOn PCs, a boot manager typically occupies sector 0 of a disk, which is 67a9264f3eSSheldon Hearnknown as the Master Boot Record (MBR). 68a9264f3eSSheldon HearnThe MBR contains both code (to which control is passed by the PC BIOS) 69a9264f3eSSheldon Hearnand data (an embedded table of defined slices). 700b654f60SRobert Nordier.Pp 710b654f60SRobert NordierThe options are: 720b654f60SRobert Nordier.Bl -tag -width indent 730b654f60SRobert Nordier.It Fl B 740b654f60SRobert NordierInstall the 750b654f60SRobert Nordier.Sq boot0 76a9264f3eSSheldon Hearnboot manager. 77a9264f3eSSheldon HearnThis option causes MBR code to be replaced, but without 780b654f60SRobert Nordieraffecting the embedded slice table. 790b654f60SRobert Nordier.It Fl v 800b654f60SRobert NordierVerbose: display information about the slices defined, etc. 810b654f60SRobert Nordier.It Fl b Ar boot0 820b654f60SRobert NordierSpecify which 830b654f60SRobert Nordier.Sq boot0 84a9264f3eSSheldon Hearnimage to use. 858aab42e1SSheldon HearnThe default is 868aab42e1SSheldon Hearn.Pa /boot/boot0 . 870b654f60SRobert Nordier.It Fl d Ar drive 880b654f60SRobert NordierSpecify the drive number used by the PC BIOS in referencing the drive 890b654f60SRobert Nordierwhich contains the specified 900b654f60SRobert Nordier.Ar disk . 910b654f60SRobert NordierTypically this will be 0x80 for the first hard drive, 0x81 for the 920b654f60SRobert Nordiersecond hard drive, and so on; however any integer between 0 and 0xff 930b654f60SRobert Nordieris acceptable here. 940b654f60SRobert Nordier.It Fl f Ar file 950b654f60SRobert NordierSpecify that a backup copy of the preexisting MBR should be written to 960b654f60SRobert Nordier.Ar file . 970b654f60SRobert NordierThis file is created if it does not exist, and truncated if it does. 985868a099SRobert Nordier.It Fl m Ar mask 995868a099SRobert NordierSpecify slices to be enabled/disabled, where 1005868a099SRobert Nordier.Ar mask 1015868a099SRobert Nordieris an integer between 0 (no slices enabled) and 0xf (all four slices 1025868a099SRobert Nordierenabled). 1030b654f60SRobert Nordier.It Fl o Ar options 1040b654f60SRobert NordierA comma-separated string of any of the following options may be 1050b654f60SRobert Nordierspecified (with 1060b654f60SRobert Nordier.Dq no 1070b654f60SRobert Nordierprepended as necessary): 1080b654f60SRobert Nordier.Bl -tag -width indent 1090b654f60SRobert Nordier.It packet 1101d5731beSRobert NordierUse the disk packet (BIOS Int 0x13 extensions) interface, as 1111d5731beSRobert Nordieras opposed to the legacy (CHS) interface, when doing disk I/O. 1121d5731beSRobert NordierThis allows booting above cylinder 1023, but requires specific 1131d5731beSRobert NordierBIOS support. 1141d5731beSRobert NordierThe default is 1151d5731beSRobert Nordier.Sq nopacket . 1160b654f60SRobert Nordier.It setdrv 117ee6fb785SRobert NordierForces the drive containing the disk to be referenced using drive 118a9264f3eSSheldon Hearnnumber definable by means of the -d option. 119a9264f3eSSheldon HearnThe default is 1200b654f60SRobert Nordier.Sq nosetdrv . 1210b654f60SRobert Nordier.It update 122a9264f3eSSheldon HearnAllow the MBR to be updated by the boot manager. 123a9264f3eSSheldon Hearn(The MBR may be updated to flag slices as 1240b654f60SRobert Nordier.Sq active , 125a9264f3eSSheldon Hearnand to save slice selection information.) 126a9264f3eSSheldon HearnThis is the default; a 1270b654f60SRobert Nordier.Sq noupdate 1280b654f60SRobert Nordieroption causes the MBR to be treated as read-only. 1290b654f60SRobert Nordier.El 13081e309b7SDavid Malone.It Fl s Ar slice 13181e309b7SDavid MaloneSet the default boot selection to 13281e309b7SDavid Malone.Ar slice . 13381e309b7SDavid MaloneValues between 1 and 4 refer to slices; a value of 5 refers to the 134a9264f3eSSheldon Hearnoption of booting from a second disk. 135a9264f3eSSheldon HearnThis would normally be used in conjunction with the 13681e309b7SDavid Malone.Sq noupdate 13781e309b7SDavid Maloneoption. 138ed720ec3SRobert Nordier.It Fl t Ar ticks 1390b654f60SRobert NordierSet the timeout value to 1400b654f60SRobert Nordier.Ar ticks . 1410b654f60SRobert Nordier(There are approximately 18.2 ticks per second.) 1420b654f60SRobert Nordier.El 143504dd5eaSRuslan Ermilov.Sh FILES 144504dd5eaSRuslan Ermilov.Bl -tag -width /boot/boot0 -compact 145504dd5eaSRuslan Ermilov.It Pa /boot/boot0 146504dd5eaSRuslan ErmilovThe default 147504dd5eaSRuslan Ermilov.Sq boot0 148504dd5eaSRuslan Ermilovimage 149504dd5eaSRuslan Ermilov.El 1500b654f60SRobert Nordier.Sh SEE ALSO 1510b654f60SRobert Nordier.Xr boot 8 , 15276a06f84SBen Smithurst.Xr fdisk 8 1530b654f60SRobert Nordier.Sh DIAGNOSTICS 1540b654f60SRobert NordierExit status is 0 on success and >0 on error. 1550b654f60SRobert Nordier.Sh AUTHORS 1560b654f60SRobert Nordier.An Robert Nordier Aq rnordier@FreeBSD.org . 1570b654f60SRobert Nordier.Sh BUGS 1580b654f60SRobert NordierUse of the 1590b654f60SRobert Nordier.Sq packet 1600b654f60SRobert Nordieroption may cause 1610b654f60SRobert Nordier.Sq boot0 1620b654f60SRobert Nordierto fail, depending on the nature of BIOS support. 1630b654f60SRobert Nordier.Pp 164ee6fb785SRobert NordierUse of the 1650b654f60SRobert Nordier.Sq setdrv 166ee6fb785SRobert Nordieroption with an incorrect -d operand may cause the MBR to be written 167a9264f3eSSheldon Hearnto the wrong disk. 168a9264f3eSSheldon HearnBe careful! 169