Re: char-major-4 and 2.1.115

H. Peter Anvin (hpa@transmeta.com)
7 Aug 1998 22:33:57 GMT


Followup to: <Pine.LNX.4.00.9808071234160.548-100000@lagged.net>
By author: ff <ff@lagged.net>
In newsgroup: linux.dev.kernel
>
> Hello,
>
> I just booted up 2.1.115, and there seems to be a problem with accessing
> /dev/ttyp*. When I attempt to start a xterm/rxvt or telnet in, the
> following is dumped to the system log:
>
> Aug 7 12:36:20 jericho modprobe: can't locate module char-major-4
> Aug 7 12:36:22 jericho last message repeated 63 times
>
> I tried saying N to Unix98 PTY support, but the problem is still there. Am
> I missing something? Perhaps an alias in /etc/conf.modules?
>
> Please CC responces to me, since I am not on the list.
> Thank you.
>

Okay, there seems to be two classes of people who have problems with
2.1.115, and it is both because of a messed-up configuration:

1. If your /dev/ttyp* have char major 4, then you have an ancient
configuration, deprecated since 1995, which had pty majors on major
4. This configuration is no longer supported, you need to update
your /dev directory to use /dev/tty* and /dev/pty* in accordance
with Documentation/devices.* on majors 3 and 2, respectively.

2. If you're running glibc 2.0.9x, you either *HAVE* to use Unix98
PTYs and they need to be set up properly, OR you need to have no
traces of them in your system (meaning /dev/ptmx must *NOT* exist.)
The hybrid behaviour permitted in earlier versions was a security
hole.

To set up Unix98 PTYs properly:

a. Compile your kernel with CONFIG_UNIX98_PTYS and
CONFIG_DEVPTS_FS.
b. mknod /dev/ptmx c 5 2
chmod 666 /dev/ptmx
mkdir /dev/pts
c. Add to /etc/fstab:

none /dev/pts devpts gid=5,mode=620 0 0

(gid=5 is applicable for RedHat systems for which group "tty"
has gid 5. Adjust according to your distribution. Use mode=600 if
you want "mesg n" to be default.)
d. mount /dev/pts

This really should go into the changes file...

-hpa

-- 
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
        I am Bahá'í -- ask me about it or see http://www.bahai.org/
   "To love another person is to see the face of God." -- Les Misérables

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html