2004-07-04 00:04:03 +04:00
|
|
|
.\" $NetBSD: boot_console.8,v 1.13 2004/07/03 20:04:03 mycroft Exp $
|
2003-03-20 20:27:05 +03:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1997
|
|
|
|
.\" Matthias Drochner. 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.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 AUTHOR 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.
|
1998-01-09 11:03:16 +03:00
|
|
|
.\"
|
2004-07-04 00:04:03 +04:00
|
|
|
.Dd July 3, 2004
|
1997-10-07 21:38:57 +04:00
|
|
|
.Os
|
|
|
|
.Dt BOOT_CONSOLE 8 i386
|
|
|
|
.Sh NAME
|
|
|
|
.Nm boot_console
|
|
|
|
.Nd selection of a console device in the i386 bootloader
|
1999-02-21 18:59:18 +03:00
|
|
|
.\"
|
1997-10-07 21:38:57 +04:00
|
|
|
.Sh DESCRIPTION
|
1999-02-21 18:59:18 +03:00
|
|
|
The
|
|
|
|
.Nx
|
|
|
|
i386 bootloader selects a console device for its user interaction and
|
|
|
|
passes information about it to the
|
1997-10-07 21:38:57 +04:00
|
|
|
.Nx
|
2003-05-14 16:19:15 +04:00
|
|
|
kernel.
|
2003-08-14 13:55:29 +04:00
|
|
|
When booting from the system BIOS, the console device and properties
|
|
|
|
are saved in the primary bootstrap by
|
|
|
|
.Xr installboot 8 .
|
2004-07-04 00:04:03 +04:00
|
|
|
For other boot procedures (such as
|
|
|
|
.Xr dosboot 8 )
|
2003-08-14 13:55:29 +04:00
|
|
|
the selection process is controlled by bootloader compile-time
|
|
|
|
options and system setup at the bootloader startup time.
|
|
|
|
The selection may be changed on-the-fly from within the bootloader.
|
1999-02-21 18:59:18 +03:00
|
|
|
.\"
|
|
|
|
.Ss Serial Console Options
|
|
|
|
The compile-time options (to be set in the booter's
|
|
|
|
.Dq Makefile )
|
|
|
|
are:
|
1997-10-07 21:38:57 +04:00
|
|
|
.Bl -ohang
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Sy SUPPORT_SERIAL= Ns Fa policy
|
2003-05-14 16:19:15 +04:00
|
|
|
enables support for serial input/output.
|
|
|
|
By default this option is
|
1999-02-21 18:59:18 +03:00
|
|
|
not set and the standard PC keyboard and display are always used as the
|
2003-05-14 16:19:15 +04:00
|
|
|
console device.
|
|
|
|
See
|
|
|
|
.Sx Console Selection Policy
|
1999-02-21 18:59:18 +03:00
|
|
|
below for valid values of
|
|
|
|
.Fa policy .
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Sy DIRECT_SERIAL
|
1997-10-07 21:38:57 +04:00
|
|
|
causes direct hardware access to be used for serial input / output.
|
1999-02-21 18:59:18 +03:00
|
|
|
With this option, software handshake (XON/XOFF) is used for flow
|
2003-05-14 16:19:15 +04:00
|
|
|
control.
|
|
|
|
Without this option, BIOS functions are employed for serial
|
1999-02-21 18:59:18 +03:00
|
|
|
port handling, which require hardware handshake lines to be completely
|
|
|
|
wired.
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Sy CONSPEED= Ns Fa integer
|
2003-05-14 16:19:15 +04:00
|
|
|
sets the baud-rate for the serial console.
|
|
|
|
This option has only an effect when used in combination with the
|
1999-02-21 18:59:18 +03:00
|
|
|
.Dq Dv DIRECT_SERIAL
|
2003-05-14 16:19:15 +04:00
|
|
|
option above, otherwise, the default setting of 9600 baud is used.
|
|
|
|
The value of
|
1999-02-21 18:59:18 +03:00
|
|
|
.Fa integer
|
|
|
|
must be something that makes sense as a serial port baud rate.
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Sy COMCONS_KEYPRESS
|
2000-11-07 08:44:17 +03:00
|
|
|
Require a character input within seven (7) seconds from serial console
|
1999-02-21 18:59:18 +03:00
|
|
|
device to be selected.
|
1997-10-07 21:38:57 +04:00
|
|
|
.El
|
1999-02-21 18:59:18 +03:00
|
|
|
.\"
|
|
|
|
.Ss Console Selection Policy
|
|
|
|
The actual policy for the console selection is determined by the value
|
|
|
|
of
|
2003-06-26 16:00:15 +04:00
|
|
|
.Dq Dv SUPPORT_SERIAL
|
1999-02-21 18:59:18 +03:00
|
|
|
The following options are available:
|
1997-10-07 21:38:57 +04:00
|
|
|
.Bl -ohang
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Em CONSDEV_PC
|
1999-02-21 18:59:18 +03:00
|
|
|
Force use of the standard PC keyboard and display as the console.
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Em CONSDEV_COM0 Li ... Em CONSDEV_COM3
|
1999-02-21 18:59:18 +03:00
|
|
|
Use the serial port with the corresponding BIOS number as the console.
|
2004-07-04 00:04:03 +04:00
|
|
|
No attempt is made to verify connectivity on the selected port.
|
2003-05-14 16:19:15 +04:00
|
|
|
If the port is not known to the BIOS, it falls back to
|
1999-02-21 18:59:18 +03:00
|
|
|
.Dq Dv CONSDEV_PC .
|
|
|
|
(Note: This feature can be deliberately used for console selection if
|
|
|
|
the serial ports have been disabled in the BIOS.)
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Em CONSDEV_COM0KBD Li ... Em CONSDEV_COM3KBD
|
1999-02-21 18:59:18 +03:00
|
|
|
If the port is known to the BIOS, and output of a character to the port
|
|
|
|
succeeds (and if
|
|
|
|
.Dq Dv DIRECT_SERIAL
|
|
|
|
is defined the RS-232
|
|
|
|
.Dq "modem ready"
|
2000-04-18 01:28:49 +04:00
|
|
|
status is on after the character is output), the port is used as
|
2003-05-14 16:19:15 +04:00
|
|
|
console.
|
2004-07-04 00:04:03 +04:00
|
|
|
If the port is not known to the BIOS, or the test output fails, it falls back
|
|
|
|
to
|
1999-02-21 18:59:18 +03:00
|
|
|
.Dq Dv CONSDEV_PC .
|
2003-06-26 16:00:15 +04:00
|
|
|
.It Em CONSDEV_AUTO
|
2003-05-14 16:19:15 +04:00
|
|
|
Auto-select the console.
|
|
|
|
All serial ports known to the BIOS are probed in sequence.
|
|
|
|
If output of a character to the port succeeds (and if
|
1999-02-21 18:59:18 +03:00
|
|
|
.Dq Dv DIRECT_SERIAL
|
|
|
|
is defined the RS-232
|
|
|
|
.Dq "modem ready"
|
2001-09-06 03:53:22 +04:00
|
|
|
status is on after the character is output), the port is used as console.
|
2000-04-18 01:28:49 +04:00
|
|
|
If no serial port passes the check,
|
1999-02-21 18:59:18 +03:00
|
|
|
.Dq Dv CONSDEV_PC
|
2003-05-14 16:19:15 +04:00
|
|
|
is used.
|
|
|
|
The progress of the selection process is shown at the PC display as
|
|
|
|
digits corresponding to the serial port number currently probed.
|
1997-10-07 21:38:57 +04:00
|
|
|
.El
|
1999-02-21 18:59:18 +03:00
|
|
|
.\"
|
1997-10-07 21:38:57 +04:00
|
|
|
.Sh FILES
|
1999-02-21 18:59:18 +03:00
|
|
|
.Bl -tag -width /sys/arch/i386/stand/{bios,dos,net}boot/Makefile
|
|
|
|
.It Pa /sys/arch/i386/stand/{bios,dos,net}boot/Makefile
|
|
|
|
compile time options for the boot programs.
|
1997-10-07 21:38:57 +04:00
|
|
|
.El
|
1999-02-21 18:59:18 +03:00
|
|
|
.\"
|
1997-10-07 21:38:57 +04:00
|
|
|
.Sh SEE ALSO
|
1998-02-25 15:30:13 +03:00
|
|
|
.Xr console 4 ,
|
2003-08-14 13:55:29 +04:00
|
|
|
.Xr boot 8 ,
|
|
|
|
.Xr installboot 8
|
1999-02-21 18:59:18 +03:00
|
|
|
.\"
|
1997-10-07 21:38:57 +04:00
|
|
|
.Sh BUGS
|
1999-02-21 18:59:18 +03:00
|
|
|
The value of
|
|
|
|
.Dv SERIAL_POLICY
|
2003-05-14 16:19:15 +04:00
|
|
|
should be settable through a boot configuration option.
|
|
|
|
However traditionally there was no non-volatile storage available on the
|
|
|
|
PC platform.
|
|
|
|
This requires console auto-selection methods which can be
|
|
|
|
inconvenient and/or unstable in some situations.
|
|
|
|
The selection policy should be adapted to the local hardware configuration,
|
|
|
|
which might require code changes.
|
|
|
|
(Some BIOS versions, particularly those used on
|
1999-02-21 18:59:18 +03:00
|
|
|
large servers and in embedded and single-board industrial computers,
|
2003-05-14 16:19:15 +04:00
|
|
|
have integrated support for serial consoles.
|
|
|
|
The boot loader should query for these settings if possible.)
|
1999-02-21 18:59:18 +03:00
|
|
|
.Pp
|
|
|
|
The serial communication parameters (byte-size, parity, stop-bits) are
|
2003-05-14 16:19:15 +04:00
|
|
|
not settable (either at compile time or run time).
|
|
|
|
The default parameters are
|
1999-02-21 18:59:18 +03:00
|
|
|
.Dq "8 N 1" .
|
1997-10-07 21:38:57 +04:00
|
|
|
.Pp
|
2003-05-14 16:19:15 +04:00
|
|
|
The baud rate is not settable when using BIOS I/O.
|
|
|
|
It should be settable at compile time with
|
2003-06-26 16:00:15 +04:00
|
|
|
.Dq Dv CONSPEED
|
1999-02-21 18:59:18 +03:00
|
|
|
just as it is when using
|
2003-06-26 16:00:15 +04:00
|
|
|
.Dq Dv DIRECT_SERIAL .
|
1999-02-21 18:59:18 +03:00
|
|
|
The default speed is 9600 baud (the maximum for BIOS I/O).
|