freebsd-nq/sys/i386/boot/biosboot
1995-01-24 00:41:50 +00:00
..
asm.h Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some 1993-10-16 19:17:18 +00:00
asm.S 1. BOOTSEG and BOOTSTACK are now set from the Makefile, the boot code has 1994-10-06 09:41:05 +00:00
bios.S Ask the BIOS about the geometry, and tell the kernel about it. 1994-11-18 05:02:14 +00:00
boot2.S Conditionalize support for my debugger. This normally saves 304 bytes. 1994-08-30 01:38:04 +00:00
boot.c Submitted by: Bill Paul (wpaul@ctr.columbia.edu) 1995-01-20 07:48:27 +00:00
boot.h Pass the slice number of the boot device to the kernel in the previously 1994-12-18 19:14:19 +00:00
disk.c Pass the slice number of the boot device to the kernel in the previously 1994-12-18 19:14:19 +00:00
io.c Submitted by: Bill Paul (wpaul@ctr.columbia.edu) 1995-01-20 07:48:27 +00:00
Makefile Y.A.B.M (Yet Another Bogus Makefile) 1995-01-24 00:41:50 +00:00
probe_keyboard.c Submitted by: Bill Paul (wpaul@ctr.columbia.edu) 1995-01-20 07:48:27 +00:00
README.386BSD Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some 1993-10-16 19:17:18 +00:00
README.MACH Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some 1993-10-16 19:17:18 +00:00
README.serial Submitted by: Bill Paul (wpaul@ctr.columbia.edu) 1995-01-20 07:48:27 +00:00
serial.S Submitted by: Bill Paul (wpaul@ctr.columbia.edu) 1995-01-20 07:48:27 +00:00
start.S 1. BOOTSEG and BOOTSTACK are now set from the Makefile, the boot code has 1994-10-06 09:41:05 +00:00
sys.c Save 16 bytes of data by not explicitly initializing to 0. 1994-12-30 07:48:07 +00:00
table.c Conditionalize support for my debugger. This normally saves 304 bytes. 1994-08-30 01:38:04 +00:00

	$Id$
                         SERIAL CONSOLE USAGE NOTES
                      Bill Paul (wpaul@ctr.columbia.edu)

The FreeBSD boot block can now be used to boot FreeBSD on a system with
only a dumb terminal on a serial port (COM1) as a console. This feature
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).

Note that 'options COMCONSOLE' can still be used to force the kernel to
boot in 'serial console' mode regardless of what boot options you use.

To boot FreeBSD in serial console mode, you must to the following:

- Unplug your keyboard. Most PC systems probe for the keyboard during the
  Power-On Self-Test (POST) and will generate an error if the keyboard
  isn't detected. Additionally, many machines will pause the boot process
  and wait for you to reattach the keyboard and press a key before
  proceeding any further. 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.

  NOTE: Setting the keyboard to 'Not installed' in the CMOS configuration
  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.

- Plug a dumb terminal into COM1. If you don't have a dumb terminal, you
  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,
  there is no way to select a port other than COM1 without recompiling
  both the kernel and the boot blocks. If you're already using COM1 for
  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
  switch it to COM2), then you probably shouldn't even be bothering with
  all this.)

  The serial port settings are hardcoded to 9600 baud, 8 bits, no parity,
  1 stop bit.

  NOTE: in addition to a serial cable, you will need a null modem adapter
  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.

- Boot the machine. The boot block will probe for a keyboard on your
  system. If it fails to find one, you'll see a prompt appear on the
  terminal that looks like this:

  No keyboard found.

  >> FreeBSD BOOT @ 0x10000: 640/7168 k of memory
  Use hd(1,a)/kernel to boot sd0 when wd0 is also installed.
  Usage: [[[fd(0,a)]/kernel][-s][-r][-a][-c][-d][-b][-v][-h]]
  Use ? for file list or simply press Return for defaults
  Boot:

  This is identical to the prompt that normally appears on the VGA console,
  except for the 'No keyboard found' message that indicates a keyboard
  couldn't be detected. (If a keyboard is detected, the boot prompt will
  appear on the VGA display as usual.)

  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
  use COM1 as the console device. No recompilation or 'options COMCONSOLE'
  is required. 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.)

- You will notice that there's a new boot flag: -h. You can use this to
  force the kernel 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, using -h will force the kernel to use the VGA display
  as the console instead. (Can you say 'toggle' boys and girls? I knew
  you could. Now try saying 'XOR.')

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
  and will refuse to boot if you have no display hardware installed. With
  these machines, you'll have to leave some kind of graphics card installed,
  (even if it's just a junky mono board) although you won't have to plug a
  monitor into it. You might also try installing an AMI BIOS. :)

- 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
  you'll never have to do this. But if you feel you must change the console
  to a different port, here's how:

	o Get the kerndist kernel source package.
	o Edit /sys/i386/boot/biosboot/Makefile and set COMCONSOLE to the
	  address of the port you want to use (0x3F8, 0x2E8, 0x3E8 or
	  0x2E8). Only COM1 through COM4 can be used; multiport serial
	  cards will not work. No interrupt setting is needed.
	o Create a custom kernel configuration file and add the following
	  lines:

	  options "CONADDR=0x3F8"
	  options "CONUNIT=0"

	  Set CONADDR to the same address that you selected for COMCONSOLE
	  in the bootbios Makefile. Set CONUNIT to the unit number of the
	  serial port that this address corresponds to (0 = sio0, 1 = sio1,
	  etc). This implies that the serial port you want to use must be
	  configured into the kernel in the normal way first. I'm not
	  going to list all the possible combinations here; just use your
	  head and you should be okay.
	o Recompile both the boot blocks and the kernel.
	o Install the boot blocks with the disklabel command and boot
	  from the new kernel.