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 4835213a76SDaniel Harrisboot manager permits the operator to select from which disk and 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. 7935213a76SDaniel HarrisThis option causes MBR code to be replaced, without 800b654f60SRobert Nordieraffecting the embedded slice table. 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 . 9735213a76SDaniel HarrisThis file is created if it does not exist, and replaced 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 13612b51ad0SDavid E. O'Brien.Sq update 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.) 14212b51ad0SDavid E. O'Brien.It Fl v 14312b51ad0SDavid E. O'BrienVerbose: display information about the slices defined, etc. 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 15212b51ad0SDavid E. O'Brien.Sh EXAMPLES 15312b51ad0SDavid E. O'BrienThe following is an example of a typical usage 15412b51ad0SDavid E. O'Brienof the 15512b51ad0SDavid E. O'Brien.Nm 15612b51ad0SDavid E. O'Briencommand to affect the next boot: 15712b51ad0SDavid E. O'Brien.Pp 15812b51ad0SDavid E. O'Brien.Dl "boot0cfg -o update -s 2 ad0" 15912b51ad0SDavid E. O'Brien.Sh DIAGNOSTICS 16012b51ad0SDavid E. O'Brien.Ex -std 1610b654f60SRobert Nordier.Sh SEE ALSO 1620b654f60SRobert Nordier.Xr boot 8 , 16376a06f84SBen Smithurst.Xr fdisk 8 1640b654f60SRobert Nordier.Sh AUTHORS 1650b654f60SRobert Nordier.An Robert Nordier Aq rnordier@FreeBSD.org . 1660b654f60SRobert Nordier.Sh BUGS 1670b654f60SRobert NordierUse of the 1680b654f60SRobert Nordier.Sq packet 1690b654f60SRobert Nordieroption may cause 1700b654f60SRobert Nordier.Sq boot0 1710b654f60SRobert Nordierto fail, depending on the nature of BIOS support. 1720b654f60SRobert Nordier.Pp 173ee6fb785SRobert NordierUse of the 1740b654f60SRobert Nordier.Sq setdrv 175ee6fb785SRobert Nordieroption with an incorrect -d operand may cause the MBR to be written 176a9264f3eSSheldon Hearnto the wrong disk. 177a9264f3eSSheldon HearnBe careful! 178