linux-old/Documentation/serial-console.txt
<<
>>
Prefs
   1                       Linux Serial Console
   2
   3It is possible to specify multiple devices for console output. You can
   4define a new kernel command line option to select which device(s) to
   5use for console output.
   6
   7The format of this option is:
   8
   9        console=device,options
  10
  11        device:         tty0 for the foreground virtual console
  12                        ttyX for any other virtual console
  13                        ttySx for a serial port
  14
  15        options:        depend on the driver. For the serial port this
  16                        defines the baudrate/parity/bits of the port,
  17                        in the format BBBBPN, where BBBB is the speed,
  18                        P is parity (n/o/e), and N is bits. Default is
  19                        9600n8. The maximum baudrate is 115200.
  20
  21You can specify multiple console= options on the kernel command line.
  22Output will appear on all of them. The last device will be used when
  23you open /dev/console. So, for example:
  24
  25        console=ttyS1,9600 console=tty0
  26
  27defines that opening /dev/console will get you the current foreground
  28virtual console, and kernel messages will appear on both the VGA
  29console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.
  30
  31Note that you can only define one console per device type (serial, video).
  32
  33If no console device is specified, the first device found capable of
  34acting as a system console will be used. At this time, the system
  35first looks for a VGA card and then for a serial port. So if you don't
  36have a VGA card in your system the first serial port will automatically
  37become the console.
  38
  39You will need to create a new device to use /dev/console. The official
  40/dev/console is now character device 5,1.
  41
  42Here's an example that will use /dev/ttyS1 (COM2) as the console.
  43Replace the sample values as needed.
  44
  451. Create /dev/console (real console) and /dev/tty0 (master virtual
  46   console):
  47
  48   cd /dev
  49   rm -f console tty0
  50   mknod -m 622 console c 5 1
  51   mknod -m 622 tty0 c 4 0
  52
  532. LILO can also take input from a serial device. This is a very
  54   useful option. To tell LILO to use the serial port:
  55   In lilo.conf (global section): 
  56
  57   serial  = 1,9600n8 (ttyS1, 9600 bd, no parity, 8 bits)
  58
  593. Adjust to kernel flags for the new kernel,
  60   again in lilo.conf (kernel section)
  61
  62   append = "console=ttyS1,9600" 
  63
  644. Init and /etc/ioctl.save
  65
  66   Sysvinit remembers its stty settings in a file in /etc, called
  67   `/etc/ioctl.save'. REMOVE THIS FILE before using the serial
  68   console for the first time, because otherwise init will probably
  69   set the baudrate to 38400 (baudrate of the virtual console).
  70
  715. /dev/console and X
  72   Programs that want to do something with the virtual console usually
  73   open /dev/console. If you have created the new /dev/console device,
  74   and your console is NOT the virtual console some programs will fail.
  75   Those are programs that want to access the VT interface, and use
  76   /dev/console instead of /dev/tty0. Some of those programs are:
  77
  78   Xfree86, svgalib, gpm, SVGATextMode
  79
  80   I have binary patched the above mentioned programs to use "tty0"
  81   instead of "console".  This will be reported to the maintainers of
  82   said programs.
  83
  84   Note that if you boot without a console= option (or with
  85   console=/dev/tty0), /dev/console is the same as /dev/tty0. In that
  86   case everything will still work.
  87
  886. Thanks
  89
  90   Thanks to Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
  91   for porting the patches from 2.1.4x to 2.1.6x for taking care of
  92   the integration of these patches into m68k, ppc and alpha.
  93
  94Miquel van Smoorenburg <miquels@cistron.nl>, 21-Mar-1998
  95
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.