Table 2-1. Many names for the same serial port
IBM PC | Linux kernel | Linux kernel with devfs | Most boot loaders |
---|---|---|---|
COM1: | /dev/ttyS0 | /dev/tts/0 | 0 |
COM2: | /dev/ttyS1 | /dev/tts/1 | 1 |
COM3: | /dev/ttyS2 | /dev/tts/2 | 2 |
COM4: | /dev/ttyS3 | /dev/tts/3 | 3 |
When used for a console the serial port cannot share an interrupt with another device. The IBM PC devices are usually installed as shown in Table 2-2. If you use the serial port /dev/ttyS0 for the console then you should avoid sharing interrupt 4 by not installing a serial port /dev/ttyS2 in your PC. If /dev/ttyS2 cannot be physically removed then disable it using the setserial command, as shown in Figure 2-1.
Table 2-2. Interrupts used for IBM PC/AT RS-232 ports
Device | Interrupt | Port |
---|---|---|
/dev/ttyS0 | 4 | 0x3f8 |
/dev/ttyS1 | 3 | 0x2f8 |
/dev/ttyS2 | 4 | 0x3e8 |
/dev/ttyS3 | 3 | 0x2e8 |
Figure 2-1. Using the setserial command in /etc/rc.serialto disable the serial port /dev/ttyS2
# Disable /dev/ttyS2 so interrupt 4 is not shared, # then /dev/ttyS0 can be used as a serial console. setserial /dev/ttyS2 uart none port 0x0 irq 0 |