xref: /openbsd/sys/arch/i386/stand/biosboot/biosboot.8 (revision 133306f0)
1.\"	$OpenBSD: biosboot.8,v 1.12 1999/09/23 04:12:08 alex Exp $
2.\"
3.\" Copyright (c) 1997 Michael Shalayeff
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by Michael Shalayeff.
17.\" 4. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.Dd September 1, 1997
33.Dt BIOSBOOT 8 i386
34.Os
35.Sh NAME
36.Nm biosboot
37.Nd
38i386-specific first-stage system bootstrap
39.Sh DESCRIPTION
40This small program (roughly 256 bytes of code) is responsible for
41loading the second stage
42.Xr boot 8
43program, which in turn, will load the kernel.
44It takes no input or options directly.
45.Pp
46In order for
47.Nm
48to load the second-stage bootstrap, it has a table inside it which
49describes
50.Xr boot 8 's
51location.
52.Nm
53must be installed by, and have its block table filled in by, the
54.Xr installboot 8
55program.  As this data is BIOS dependent, you must re-run
56.Xr installboot 8
57each time you reinstall
58.Xr boot 8
59or move your disk or software between machines and/or controllers.
60.Pp
61When
62.Nm
63receives control from either the BIOS or the MBR it will print the message:
64.Pp
65.Dl loading /boot
66.Pp
67followed by a dot for every successfully loaded block,
68and then put cursor on the next line right before switching into
69protected mode and transferring control to the just loaded /boot program.
70.Sh DIAGNOSTICS
71Diagnostics consist of two error messages:
72.Bl -tag -width read_error_
73.It Er Read error
74Some kind of error returned by the BIOS read call. This might be
75any media error, including bad sectors (common on floppy disks),
76and invalid sectors (can occur with messed up geometry translations).
77.It Er Bad magic
78The just loaded /boot image contains a bad magic in its header.  This
79might indicate some kind of hardware problem, the
80.Ar boot
81argument to the
82.Xr installboot 8
83command was not a valid /boot program, or /boot or has been moved or
84changed.
85.El
86.Pp
87Other common reasons for these errors to appear is that a wrong BIOS geometry
88has been used in
89.Xr installboot 8
90for the device you are booting from.
91.Sh NOTES
92The practice of making OpenBSD use the whole disk (ie: having
93.Nm
94as the MBR) has been deprecated, and will not work on certain BIOS versions.
95There is a lot of strange behaviour with different BIOS's, one of well
96known lobotomy cases is that the BIOS does not pass the right boot drive
97number to the
98.Nm
99program.  This is one of the main reasons that having
100.Nm
101as the MBR has been deprecated.
102.Sh FILES
103.Bl -tag -width /usr/mdec/biosbootxx -compact
104.It Pa /usr/mdec/mbr
105Master Boot Record block
106.It Pa /usr/mdec/biosboot
107primary bootstrap
108.It Pa /boot
109secondary bootstrap
110.It Pa /bsd
111system code
112.El
113.Sh SEE ALSO
114.Xr boot 8 ,
115.Xr boot_i386 8 ,
116.Xr fdisk 8 ,
117.Xr installboot 8
118.Sh BUGS
119It should do a checksum over the loaded /boot image, and check that against
120a value that
121.Xr installboot 8
122has precomputed.
123.Pp
124There is no BIOS error number reported nor is the location of the error
125reported.
126.Pp
127You can pick your motherboard, and you can pick your BIOS,
128but you can't pick your motherboard's BIOS.
129.Sh HISTORY
130This program was written by Michael Shalayeff for
131.Ox 2.1 .
132However it's based on bootstrap code from older versions of this
133operating system, other operating systems, other programs, and
134other people's work.
135