Whole document tree
    

Whole document tree

Configure Linux kernel

Chapter 5. Configure Linux kernel

The Linux kernel is configured to use a serial console by passing it the console parameter. The console parameter can be given repeatedly; in that case output is sent to all consoles and input is taken from the last listed console. The last console is the one Linux uses as the /dev/console device.

The syntax of the console parameter is given in Figure 5-1.

Figure 5-1. Kernel console syntax, in EBNF

console=ttyS<port>[,<mode>]
console=tty<virtual_terminal>
console=lp<parallel_port>

<port> is the number of the serial port. This is defined in Figure 4-2 and discussed in Section 3.2. The examples in this HOWTO use the first serial port, giving <port> the value ttyS0.

With no console parameter the kernel will use the first virtual terminal, which is /dev/tty0. A user at the keyboard uses this virtual terminal by pressing Ctrl-Alt-F1.

<mode> is defined in Figure 3-1 and is discussed in Section 3.3. The examples in this HOWTO use 9600 bits per second, eight data bits, no parity and one stop bit, giving <mode> the value of 9600n81.

If your computer contains a video card then we suggest that you also configure it as a console. This is done with the kernel parameter console=tty0.

For PCs with a video card and a serial console in the port marked ‘COM1:’ this HOWTO suggests the kernel parameters:

Figure 5-2. Recommended kernel parameters, PCs with video card

console=tty0 console=ttyS0,9600n81

For PCs without a video card, this HOWTO suggests the kernel parameters:

Figure 5-3. Recommended kernel parameters, PCs without video card

console=ttyS0,9600n81

These parameters are passed to the booting kernel by the boot loader. Next we will configure the boot loader used by your Linux installation to pass the console parameters to the kernel.