1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
.\" $OpenBSD: boot.8,v 1.4 1997/09/06 00:37:34 deraadt Exp $
.\"
.\" Copyright (c) 1997 Michael Shalayeff
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by Michael Shalayeff.
.\" 4. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd September 1, 1997
.Dt BOOT 8 i386
.Os
.Sh NAME
.Nm boot
.Nd
secondary system bootstrap program
.Sh DESCRIPTION
The main purpose of this program is to load the system kernel, dealing with
all the bugs and bottlenecks of the PC BIOS ``architecture'' and philosophy.
.Pp
As described in
.Xr boot_i386 8
this program is loaded by the
.Xr biosboot 8
primary bootstrap loader and will give you a convinient way to load the kernel.
This program acts as an enhanced boot monitor or ROM for PC systems, providing
a buffer or common interface for the kernel to start from.
.Pp
Basic operations include:
.Bl -bullet -compact
.It
Detecting and switching between multiple console types.
.It
Loading kernels from any device supported by your system BIOS.
.It
Loading kernels compressed by
.Xr gzip 1
program or
.Xr zlib 3
routines.
.It
Passing system parameters queried from the BIOS to the kernel.
.It
Providing an interactive command line.
.El
.Pp
The sequences of its operation consist of initialization
followed by an interactive command line. While at the command
line you have a timeout of 5 seconds (initially, then increasing
by one second on every subsequent kernel load failure)
to type any commands, if needed. Upon timeout expiration, the
kernel will be loaded according to the current variables
settings (See the
.Nm set
command for details).
The sequence of
.Nm
operations is as follows:
.Bl -enum
.It
Setup protected mode involving IDT setup for processor exceptions to
be caught and reported, and setup a simple real-mode BIOS interface.
.It
Probe for console devices, which includes the PC VGA+Keyboard console
and up to four serial consoles connected to the serial ports.
Corresponding messages report about the found devices to the default
console device, which is pc0, if present.
.It
Probe for memory. Conventional memory is probed by quering the BIOS.
Extended memory is probed by running through the memory probing
for present pages, which eliminates the BIOS restriction of 64M of memory.
All the memory found is reported to the default console device.
.It
Probe for APM support in the BIOS. Message printed if support is present.
.It
Open, and if successfull process
.Pa /etc/boot.conf
file on the same filesystem
.Nm
was loaded from. This file may contain any commands
.Nm
accepts at the interactive prompt.
Usually they are commands that change boot parameters according to your
environment, although default values are usable in most cases.
.It
The header line
.Pp
.Dl OpenBSD BOOT [x.xx]
.Pp
is displayed to the active console, where
.Ar x.xx
is a version number of the
.Nm
program, followed by the
.Pp
.Dl boot>
.Pp
prompt, which means you are in the interactive mode and may enter
commands. If you do not,
.Nm
will proceed loading kernel with the current parameters after the
timeout period has expired.
.El
.Sh COMMANDS
The following commands are accepted at the
.Nm
prompt:
.Bl -tag -width machine_diskinfo_boot_
.It boot Op Ar image Op Fl abcds
Boots kernel image specified by the
.Ar image
with options if any. Image specification consists of a pair
.Nm device : Nm filename ,
either of each maybe omitted (':' is not needed if both)
in which case values from
.Nm
variables will be used.
.It echo
Prints it's arguments.
.It help
Prints a list of available commands and machine dependant
commands, if any.
.It machine Op Ar subcommand
Issues machine-dependant commands. These are defined for i386 architecture:
.Bl -tag -width diskinfo_
.It diskinfo
Prints list of hard disks installed on your system including:
BIOS device number, and the BIOS geometry.
.El
.It ls Op Ar directory
Prints contents of the specified
.Ar directory
in long format including: attributes and file type, owner, group,
size, filename.
.It regs
Prints contents of processor registers, if defind for this architecture.
.It reboot
Reboots machine by initiating a warm boot procedure.
.It set Op varname Op value
If invoked without arguments will print a list of variables with values.
If
.Ar varname
and
.Ar value
present will set variable with that name to the given value.
Variables include:
.Pp
.Bl -tag -compact -width boothow
.It addr
Address at wich to load the kernel.
.It howto
Options to pass to the loaded kernel.
.It debug
Debug flag if
.Nm
was compiled with DEBUG defined.
.It device
Boot device name (ie fd0a, sd0a).
.It tty
Active console device name.
.It image
File name containing the kernel image.
.El
.It time
Displays system time and date.
.El
.Sh FILES
.Bl -tag -width /usr/mdec/biosbootxx -compact
.It Pa /usr/mdec/biosboot
primary bootstrap
.It Pa /boot
system bootstrap
.It Pa /etc/boot.conf
system bootstrap's startup file
.It Pa /bsd
system code
.El
.Sh SEE ALSO
.Xr boot_i386 8 ,
.Xr fdisk 8 ,
.Xr installboot 8 ,
.Xr boot 8 ,
.Xr gzip 1 ,
.%B http://quest.jpl.nasa.gov/zlib/ .
.Sh BUGS
Well, nobody is perfect.
.Sh HISTORY
This program was written by Michael Shalayeff for
.Ox 2.1 .
|