It is impossible to open pseudo terminals in BSD style.

System:

avp@avp-ubu1:hashcode$ uname -a Linux avp-ubu1 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux avp@avp-ubu1:hashcode$ cat /etc/issue Ubuntu 16.04.3 LTS \n \l 

After uploading to /dev/ there were no pty files .. and their corresponding tty ...

Making them

 cd /dev; MAKEDEV pty; MAKEDEV tty 

hands did not help. Those. there are now files in / dev (everything seems to be normal with the rights), but the program does not open them ( cat: /dev/ptya0: No such device or address ).

Adding pty creation to /etc/rc.local (i.e. tried (why?) To do when loading) also did not help.

The question is how to make / dev / pty working in Ubuntu ...?

PS
I suspect that the kernel is assembled without the necessary modules, i.e. at assembly no CONFIG_LEGACY_PTYS, CONFIG_LEGACY_PTY_COUNT

Update
It turns out the system is still compiled with BSD style CONFIG_LEGACY_PTYS = y , but CONFIG_LEGACY_PTY_COUNT = 0 (looked at / /boot/config-4.4.0-104-generic ).

Who knows (it’s impossible to find on the network) how dynamically (I’m still not able to re-compile it), i.e. changing any of the files in /proc/sys (or in another way?), change this parameter?
In the sysctl -a output, this parameter does not seem to be (by the way, how should it be called in the sysctl output?) open pts) and kernel.pty.reserve = 1024 . As far as I understand, these are the UNIX98 pseudoterminals parameters

  • @PavelMayorov, and why should it not work through / dev / ptmx - / dev / pts / ...? - avp
  • @StackOverflow, do you really think I didn't read all this? The question is what to do if the created / dev / ptyp1 (for example) does not open? Apparently somehow you need to add a driver (for its major) to the kernel. Moreover, I myself do not compile the core, this is LTS, so the instruction is interesting, when after auto-update everything does not break again. - avp
  • /proc/config.gz is there? There are usually ubuntas. look there flags - eri
  • one
    In principle, it is not possible to change via sys or proc ... but at boot time, you can transfer pty.legacy_count=<n> to the kernel. - Fat-Zer

0