7.5. Alter target of /dev/systty

In many Linux distributions the file /dev/systty is a symbolic link to the device which is used as the by the attached monitor and keyboard. See Section 1.3 for a fuller description.

If there is no attached keyboard and monitor or no wish to give the attached keyboard and monitor greater capabilities then a text terminal, then alter /dev/systty to point to the serial console.

Rather than directly altering this symbolic link, it is better to modify the configuration file used by MAKEDEV, which is then run to recreate the symbolic link. The configuration file is in the directory /etc/makedev.d. The default configuration will point to the first virtual terminal, as shown in Figure 7-4.

Figure 7-4. Default value of /dev/systty in /etc/makedev.d/linux-2.4.x

l systty tty0

Modify this to point to the serial port being used by the console, as shown in Figure 7-5.

Figure 7-5. Alter value of /dev/systty in MAKEDEV configuration file

bash# cd /etc/makedev.d
bash# fgrep systty *
linux-2.4.x:l systty tty0
bash# vi linux-2.4.x
l systty ttyS0

Now re-create /dev/systty using its new definition, as shown in Figure 7-6.

Figure 7-6. Installing new value of /dev/systty

bash# cd /dev
bash# rm systty
bash# ./MAKEDEV systty