4dc53ff8abd4f552936cdedeb79417e389a7c8d7
[dragonfly.git] / sys / i386 / boot / biosboot / README.serial
1
2                          SERIAL CONSOLE USAGE NOTES
3                                 Written by
4                       Bill Paul <wpaul@ctr.columbia.edu>
5                           Revised for 3.0-CURRENT by
6             Kazutaka Yokota <yokota@zodiac.mech.utsunomiya-u.ac.jp>
7
8 The FreeBSD boot block can now be used to boot FreeBSD on a system with
9 only a dumb terminal on a serial port as a console. This feature
10 is provided for the benefit of people who wish to install FreeBSD on
11 dedicated file/compute/terminal server machines that have no keyboard
12 (or monitor) attached, just as is possible with Sun workstations and
13 servers. People who don't need this extra functionality shouldn't notice
14 the changes at all (unless I've screwed something up horribly).
15
16 To boot FreeBSD in serial console mode, you must do the following:
17
18 - UNPLUG YOUR KEYBOARD. Most PC systems probe for the keyboard during the
19   Power-On Self-Test (POST) and will generate an error if the keyboard
20   isn't detected. Some BIOSes may be set to ignore this error.  Many other 
21   machines will pause the boot process and wait for you to reattach the 
22   keyboard and press a key before proceeding any further. Consult the manual
23   of your motherboard to see how it responds to the error and how to
24   set the BIOS to ignore the error. If your computer complains about 
25   the lack of a keyboard but boots anyway, then you don't have to do 
26   anything special. (One machine with a PHOENIX BIOS that I have here 
27   merely says 'Keyboard failed' then continues to boot normally.) If your 
28   machine complains loudly about the lack of a keyboard and won't continue 
29   to boot until you plug it back in, you'll have to go into your CMOS 
30   configuration menu and change the 'Keyboard' setting to 'Not installed' 
31   in order to bypass the keyboard probe.
32
33   NOTE #1:
34   Setting the keyboard to 'Not installed' in the CMOS configuration
35   does *NOT* mean that you won't be able to use your keyboard. All this 
36   does is tell the BIOS not to probe for a keyboard at power-on so that
37   it won't bitch and moan if the keyboard isn't plugged in. You can leave the
38   keyboard plugged in even with this flag set to 'Not installed' and the
39   keyboard will still work. I repeat: changing the CMOS 'keyboard' setting
40   to 'Not installed' only disables the BIOS's keyboard probe; it does 
41   *NOT* actually disable the keyboard.
42
43   NOTE #2:
44   If your system has a PS/2 mouse, chances are very good that you will
45   need to unplug your mouse as well as your keyboard. This is because
46   PS/2 mice share some hardware with the keyboard, and leaving the mouse
47   plugged in can fool the keyboard probe into thinking the keyboard is
48   still there. I have access to a Gateway 2000 Pentium 90Mhz system with
49   an AMI BIOS that behaves this way. In general this is not a problem
50   since the mouse isn't much good without the keyboard anyway.
51
52 - PLUG A DUMB TERMINAL INTO COM1. If you don't have a dumb terminal, you
53   can use an old PC/XT with a modem program, or the serial port on
54   another UNIX box. If you don't have a COM1, get one. At this time,
55   there is no way to select a port other than COM1 for the boot blocks
56   without recompiling the boot blocks. If you're already using COM1 for
57   another device, you'll have to temporarily remove that device and
58   install a new boot block and kernel once you get FreeBSD up and running.
59   (It is assumed that COM1 will be available on a file/compute/terminal
60   server anyway; if you really need COM1 for something else (and you can't
61   switch that something else to COM2), then you probably shouldn't even
62   be bothering with all this in the first place.)
63
64   NOTE #1:
65   The serial port settings are hardcoded to 9600 baud, 8 bits, no parity,
66   1 stop bit, by default. If you wish to change the speed, you need to 
67   recompile at least the boot blocks.  Add the following line to
68   /etc/make.conf and compile new boot blocks:
69
70         BOOT_COMCONSOLE_SPEED=115200
71
72   If the serial console is configured in some other way than by booting with
73   -h, or if the serial console used by the kernel is different from the one
74   used by the boot blocks, then you must also add the following option to the
75   kernel configuration file and compile a new kernel:
76
77         options CONSPEED=115200
78
79   NOTE #2:
80   In addition to a serial cable, you will need a null modem adapter
81   in order to connect the terminal to the PC's serial port. If you don't
82   have one, go to Radio Shack and buy one: they're cheap.
83
84   NOTE #3:
85   If you wish to drop into the kernel debugger from the serial console
86   (useful for remote diagnostics, but also dangerous if you generate a
87   spurious BREAK on the serial port!) then you should compile your kernel
88   with the following options:
89
90         options BREAK_TO_DEBUGGER
91         options DDB
92
93
94 - MAKE SURE THE CONFIGURATION FILE OF YOUR KERNEL HAS APPROPRIATE FLAGS
95   SET FOR COM1.
96
97   Relevant `flags' are:
98   0x10  enable console support for this unit.  The other console flags
99         are ignored unless this is set.  Currently, at most one unit can 
100         have console support; the first one (in config file order) with
101         this flag set is preferred. This option alone will not make
102         the serial port the console. Set the following flag or use the -h
103         option described below, together with this flag.
104   0x20  force this unit to be the console (unless there is another
105         higher priority console). This replaces the COMCONSOLE option.
106
107   Example:
108   device sio0 at isa? port "IO_COM1" tty flags 0x10 irq 4
109
110   If the flags were not set, you need to run UserConfig (on a different
111   console) or recompile the kernel.
112
113 - CREATE THE FILE "boot.config" IN THE ROOT DIRECTORY of the `a' partition
114   on the boot drive.  Put the kernel name and options in one line.   The
115   kernel name is optional.  Options are subset of those described in boot(8): 
116   -h    toggle internal and serial consoles. You can use this to switch 
117         console devices. For instance, if you boot from the VGA console, 
118         you can use -h to force the kernel to use the serial port as its 
119         console device. Alternatively, if you boot from the serial port, 
120         you can use the -h to force the kernel to use the VGA display 
121         as the console instead. (Can you say 'toggle' boys and girls? 
122         I knew you could. :)
123   -D    toggle single and dual console configurations. In the single
124         configuration the console will be either the VGA display (internal 
125         console) or the serial port, depending on the state of the -h option
126         above. In the dual console configuration, both the VGA display 
127         and the serial port will become the console at the same time, 
128         regardless of the state of the -h option.
129         However, the dual console configuration takes effect only during
130         the boot prompt. Once the kernel is loaded, the console specified 
131         by the -h option becomes the only console.
132   -P    probe the keyboard. If no keyboard is found, the -D and -h options
133         are automatically set.
134
135   Use either the -P option to select the console automatically, or the -h
136   option to force the serial console.
137
138 - BOOT THE MACHINE. You'll see a prompt appear on the terminal that looks 
139   something like this:
140
141   No keyboard found
142
143   >> FreeBSD BOOT @ 0x10000: 640/7168 k of memory, serial console
144   Boot default: 0:wd(0,a)kernel
145
146   boot:
147
148   This is identical to the prompt that normally appears on the VGA console,
149   except for the 'No keyboard found' message that indicates a keyboard
150   couldn't be detected, if the -P option is in `boot.config'. 
151
152   From here you can boot the system (or let it autoboot by itself) just
153   like you can from the VGA console and the kernel will automatically
154   use COM1 as the console device. This is done by passing a special flag 
155   to the kernel in the 'boothowto' word. (The curious can refer to 
156   <sys/reboot.h> and the sio driver sources for details.)
157
158
159 CAVEATS:
160
161 - The idea here is to allow people to set up dedicated servers that require
162   no graphics hardware or attached keyboards. Unfortunately, while (most?)
163   every system will let you boot without a keyboard, there are quite a few
164   that will not let you boot without a graphics adapter. Machines with
165   AMI BIOSes can be configured to boot with no graphics adapter installed
166   simply by changing the 'graphics adapter' setting in the CMOS configuration
167   to 'Not installed.' However, many machines do not support this option
168   and will refuse to boot if you have no display hardware in the system. With
169   these machines, you'll have to leave some kind of graphics card plugged in,
170   (even if it's just a junky mono board) although you won't have to attach
171   a monitor into it. You might also try installing an AMI BIOS. :)
172
173 - Using a port other than COM1 as the console requires some recompiling.
174   Again, it's usually assumed that COM1 will be available for use as a
175   console device on a dedicated file/compute/terminal server, so hopefully
176   you'll never need to do this. But if you feel you must change the console
177   to a different port, here's how:
178
179         o Get the kernel source package.
180         o Edit /etc/make.conf and set BOOT_COMCONSOLE_PORT to the
181           address of the port you want to use (0x3F8, 0x2F8, 0x3E8 or
182           0x2E8). Only COM1 through COM4 can be used; multiport serial
183           cards will not work. No interrupt setting is needed.
184         o Create a custom kernel configuration file and add appropriate
185           `flags' for the serial port you want to use. For example, if you
186           want to make COM2 the console:
187
188           device sio1 at isa? port "IO_COM2" tty flags 0x10 irq 3
189
190           The console flags for the other serial ports should not be set.
191         o Recompile both the boot blocks and the kernel.
192         o Install the boot blocks with the disklabel command and boot
193           from the new kernel.
194
195
196 $FreeBSD: src/sys/i386/boot/biosboot/README.serial,v 1.11 1999/08/28 00:43:10 peter Exp $
197 $DragonFly: src/sys/i386/boot/biosboot/Attic/README.serial,v 1.2 2003/06/17 04:28:34 dillon Exp $