1995-02-16 07:37:35 +00:00
|
|
|
|
1995-01-20 07:48:27 +00:00
|
|
|
SERIAL CONSOLE USAGE NOTES
|
1995-02-16 07:37:35 +00:00
|
|
|
Written by
|
|
|
|
Bill Paul <wpaul@ctr.columbia.edu>
|
1997-06-09 05:10:56 +00:00
|
|
|
Revised for 3.0-CURRENT by
|
|
|
|
Kazutaka Yokota <yokota@zodiac.mech.utsunomiya-u.ac.jp>
|
1995-01-20 07:48:27 +00:00
|
|
|
|
|
|
|
The FreeBSD boot block can now be used to boot FreeBSD on a system with
|
1997-06-09 05:10:56 +00:00
|
|
|
only a dumb terminal on a serial port as a console. This feature
|
1995-01-20 07:48:27 +00:00
|
|
|
is provided for the benefit of people who wish to install FreeBSD on
|
|
|
|
dedicated file/compute/terminal server machines that have no keyboard
|
|
|
|
(or monitor) attached, just as is possible with Sun workstations and
|
|
|
|
servers. People who don't need this extra functionality shouldn't notice
|
|
|
|
the changes at all (unless I've screwed something up horribly).
|
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
To boot FreeBSD in serial console mode, you must do the following:
|
1995-01-20 07:48:27 +00:00
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
- UNPLUG YOUR KEYBOARD. Most PC systems probe for the keyboard during the
|
1995-01-20 07:48:27 +00:00
|
|
|
Power-On Self-Test (POST) and will generate an error if the keyboard
|
1997-06-09 05:10:56 +00:00
|
|
|
isn't detected. Some BIOSes may be set to ignore this error. Many other
|
|
|
|
machines will pause the boot process and wait for you to reattach the
|
|
|
|
keyboard and press a key before proceeding any further. Consult the manual
|
|
|
|
of your motherboard to see how it responds to the error and how to
|
|
|
|
set the BIOS to ignore the error. If your computer complains about
|
|
|
|
the lack of a keyboard but boots anyway, then you don't have to do
|
|
|
|
anything special. (One machine with a PHOENIX BIOS that I have here
|
|
|
|
merely says 'Keyboard failed' then continues to boot normally.) If your
|
|
|
|
machine complains loudly about the lack of a keyboard and won't continue
|
|
|
|
to boot until you plug it back in, you'll have to go into your CMOS
|
|
|
|
configuration menu and change the 'Keyboard' setting to 'Not installed'
|
|
|
|
in order to bypass the keyboard probe.
|
1995-01-20 07:48:27 +00:00
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
NOTE #1:
|
|
|
|
Setting the keyboard to 'Not installed' in the CMOS configuration
|
1995-01-20 07:48:27 +00:00
|
|
|
does *NOT* mean that you won't be able to use your keyboard. All this
|
|
|
|
does is tell the BIOS not to probe for a keyboard at power-on so that
|
|
|
|
it won't bitch and moan if the keyboard isn't plugged in. You can leave the
|
|
|
|
keyboard plugged in even with this flag set to 'Not installed' and the
|
|
|
|
keyboard will still work. I repeat: changing the CMOS 'keyboard' setting
|
|
|
|
to 'Not installed' only disables the BIOS's keyboard probe; it does
|
|
|
|
*NOT* actually disable the keyboard.
|
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
NOTE #2:
|
|
|
|
If your system has a PS/2 mouse, chances are very good that you will
|
|
|
|
need to unplug your mouse as well as your keyboard. This is because
|
|
|
|
PS/2 mice share some hardware with the keyboard, and leaving the mouse
|
|
|
|
plugged in can fool the keyboard probe into thinking the keyboard is
|
|
|
|
still there. I have access to a Gateway 2000 Pentium 90Mhz system with
|
|
|
|
an AMI BIOS that behaves this way. In general this is not a problem
|
|
|
|
since the mouse isn't much good without the keyboard anyway.
|
|
|
|
|
|
|
|
- PLUG A DUMB TERMINAL INTO COM1. If you don't have a dumb terminal, you
|
1995-01-20 07:48:27 +00:00
|
|
|
can use an old PC/XT with a modem program, or the serial port on
|
|
|
|
another UNIX box. If you don't have a COM1, get one. At this time,
|
1997-06-09 05:10:56 +00:00
|
|
|
there is no way to select a port other than COM1 for the boot blocks
|
|
|
|
without recompiling the boot blocks. If you're already using COM1 for
|
1995-01-20 07:48:27 +00:00
|
|
|
another device, you'll have to temporarily remove that device and
|
|
|
|
install a new boot block and kernel once you get FreeBSD up and running.
|
|
|
|
(It is assumed that COM1 will be available on a file/compute/terminal
|
|
|
|
server anyway; if you really need COM1 for something else (and you can't
|
1995-02-16 07:37:35 +00:00
|
|
|
switch that something else to COM2), then you probably shouldn't even
|
|
|
|
be bothering with all this in the first place.)
|
1995-01-20 07:48:27 +00:00
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
NOTE #1:
|
1995-01-20 07:48:27 +00:00
|
|
|
The serial port settings are hardcoded to 9600 baud, 8 bits, no parity,
|
1997-06-09 05:10:56 +00:00
|
|
|
1 stop bit, by default. If you wish to change the speed, you need to
|
|
|
|
recompile at least the boot blocks. Add the following line to
|
|
|
|
/etc/make.conf and compile new boot blocks:
|
|
|
|
|
|
|
|
BOOT_COMCONSOLE_SPEED=115200
|
|
|
|
|
|
|
|
If the serial console is configured in some other way than by booting with
|
|
|
|
-h, or if the serial console used by the kernel is different from the one
|
|
|
|
used by the boot blocks, then you must also add the following option to the
|
|
|
|
kernel configuration file and compile a new kernel:
|
|
|
|
|
|
|
|
options CONSPEED=115200
|
1995-01-20 07:48:27 +00:00
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
NOTE #2:
|
|
|
|
In addition to a serial cable, you will need a null modem adapter
|
1995-01-20 07:48:27 +00:00
|
|
|
in order to connect the terminal to the PC's serial port. If you don't
|
|
|
|
have one, go to Radio Shack and buy one: they're cheap.
|
|
|
|
|
1996-04-13 11:57:18 +00:00
|
|
|
NOTE #3:
|
|
|
|
If you wish to drop into the kernel debugger from the serial console
|
|
|
|
(useful for remote diagnostics, but also dangerous if you generate a
|
|
|
|
spurious BREAK on the serial port!) then you should compile your kernel
|
|
|
|
with the following options:
|
|
|
|
|
|
|
|
options BREAK_TO_DEBUGGER
|
|
|
|
options DDB
|
|
|
|
|
1995-01-20 07:48:27 +00:00
|
|
|
|
1997-06-09 05:10:56 +00:00
|
|
|
- MAKE SURE THE CONFIGURATION FILE OF YOUR KERNEL HAS APPROPRIATE FLAGS
|
|
|
|
SET FOR COM1.
|
|
|
|
|
|
|
|
Relevant `flags' are:
|
|
|
|
0x10 enable console support for this unit. The other console flags
|
|
|
|
are ignored unless this is set. Currently, at most one unit can
|
|
|
|
have console support; the first one (in config file order) with
|
|
|
|
this flag set is preferred. This option alone will not make
|
|
|
|
the serial port the console. Set the following flag or use the -h
|
|
|
|
option described below, together with this flag.
|
|
|
|
0x20 force this unit to be the console (unless there is another
|
|
|
|
higher priority console). This replaces the COMCONSOLE option.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4 vector siointr
|
|
|
|
|
|
|
|
If the flags were not set, you need to run UserConfig (on a different
|
|
|
|
console) or recompile the kernel.
|
|
|
|
|
|
|
|
- CREATE THE FILE "boot.config" IN THE ROOT DIRECTORY of the `a' partition
|
|
|
|
on the boot drive. Put the kernel name and options in one line. The
|
|
|
|
kernel name is optional. Options are subset of those described in boot(8):
|
|
|
|
-h toggle internal and serial consoles. You can use this to switch
|
|
|
|
console devices. For instance, if you boot from the VGA console,
|
|
|
|
you can use -h to force the kernel to use the serial port as its
|
|
|
|
console device. Alternatively, if you boot from the serial port,
|
|
|
|
you can use the -h to force the kernel to use the VGA display
|
|
|
|
as the console instead. (Can you say 'toggle' boys and girls?
|
|
|
|
I knew you could. :)
|
|
|
|
-D toggle single and dual console configurations. In the single
|
|
|
|
configuraion the console will be either the VGA display (internal
|
|
|
|
console) or the serial port, depending on the state of the -h option
|
|
|
|
above. In the dual console configuration, both the VGA display
|
|
|
|
and the serial port will become the console at the same time,
|
|
|
|
regardless of the state of the -h option.
|
|
|
|
However, the dual console configuration takes effect only during
|
|
|
|
the boot prompt. Once the kernel is loaded, the console specified
|
|
|
|
by the -h option becomes the only console.
|
|
|
|
-P probe the keyboard. If no keyboard is found, the -D and -h options
|
|
|
|
are automatically set.
|
|
|
|
|
|
|
|
Use either the -P option to select the console automatically, or the -h
|
|
|
|
option to force the serial console.
|
|
|
|
|
|
|
|
- BOOT THE MACHINE. You'll see a prompt appear on the terminal that looks
|
|
|
|
something like this:
|
|
|
|
|
|
|
|
No keyboard found
|
|
|
|
|
|
|
|
>> FreeBSD BOOT @ 0x10000: 640/7168 k of memory, serial console
|
|
|
|
Boot default: 0:wd(0,a)kernel
|
|
|
|
|
|
|
|
boot:
|
1995-01-20 07:48:27 +00:00
|
|
|
|
|
|
|
This is identical to the prompt that normally appears on the VGA console,
|
|
|
|
except for the 'No keyboard found' message that indicates a keyboard
|
1997-06-09 05:10:56 +00:00
|
|
|
couldn't be detected, if the -P option is in `boot.conf'.
|
1995-01-20 07:48:27 +00:00
|
|
|
|
|
|
|
From here you can boot the system (or let it autoboot by itself) just
|
|
|
|
like you can from the VGA console and the kernel will automatically
|
1997-06-09 05:10:56 +00:00
|
|
|
use COM1 as the console device. This is done by passing a special flag
|
|
|
|
to the kernel in the 'boothowto' word. (The curious can refer to
|
|
|
|
<sys/reboot.h> and the sio driver sources for details.)
|
1995-04-20 23:15:10 +00:00
|
|
|
|
|
|
|
|
1995-01-20 07:48:27 +00:00
|
|
|
CAVEATS:
|
|
|
|
|
|
|
|
- The idea here is to allow people to set up dedicated servers that require
|
|
|
|
no graphics hardware or attached keyboards. Unfortunately, while (most?)
|
|
|
|
every system will let you boot without a keyboard, there are quite a few
|
|
|
|
that will not let you boot without a graphics adapter. Machines with
|
|
|
|
AMI BIOSes can be configured to boot with no graphics adapter installed
|
|
|
|
simply by changing the 'graphics adapter' setting in the CMOS configuration
|
|
|
|
to 'Not installed.' However, many machines do not support this option
|
1995-02-16 07:37:35 +00:00
|
|
|
and will refuse to boot if you have no display hardware in the system. With
|
|
|
|
these machines, you'll have to leave some kind of graphics card plugged in,
|
|
|
|
(even if it's just a junky mono board) although you won't have to attach
|
|
|
|
a monitor into it. You might also try installing an AMI BIOS. :)
|
1995-01-20 07:48:27 +00:00
|
|
|
|
|
|
|
- Using a port other than COM1 as the console requires some recompiling.
|
|
|
|
Again, it's usually assumed that COM1 will be available for use as a
|
|
|
|
console device on a dedicated file/compute/terminal server, so hopefully
|
1995-02-16 07:37:35 +00:00
|
|
|
you'll never need to do this. But if you feel you must change the console
|
1995-01-20 07:48:27 +00:00
|
|
|
to a different port, here's how:
|
|
|
|
|
1997-06-09 05:10:56 +00:00
|
|
|
o Get the kernel source package.
|
|
|
|
o Edit /etc/make.conf and set BOOT_COMCONSOLE_PORT to the
|
1995-02-16 07:37:35 +00:00
|
|
|
address of the port you want to use (0x3F8, 0x2F8, 0x3E8 or
|
1995-01-20 07:48:27 +00:00
|
|
|
0x2E8). Only COM1 through COM4 can be used; multiport serial
|
|
|
|
cards will not work. No interrupt setting is needed.
|
1997-06-09 05:10:56 +00:00
|
|
|
o Create a custom kernel configuration file and add appropriate
|
|
|
|
`flags' for the serial port you want to use. For example, if you
|
|
|
|
want to make COM2 the console:
|
|
|
|
|
|
|
|
device sio1 at isa? port "IO_COM2" tty flags 0x10 irq 3 vector siointr
|
|
|
|
|
|
|
|
The console flags for the other serial ports should not be set.
|
1995-01-20 07:48:27 +00:00
|
|
|
o Recompile both the boot blocks and the kernel.
|
|
|
|
o Install the boot blocks with the disklabel command and boot
|
|
|
|
from the new kernel.
|
|
|
|
|
1995-02-16 07:37:35 +00:00
|
|
|
|
1997-06-09 05:10:56 +00:00
|
|
|
$Id: README.serial,v 1.7 1997/02/22 09:30:03 peter Exp $
|