KINDA ADVANCED LINUX QUESTION
please help
How can i populate /dev with tty (virtual consoles)? I want to have tty0-tty7 and only virtual console i have is /dev/tty.
Try mounting them
install windows 10
Install Getty/systemD
Start Getty or systemD
>>52399399
What do you mean? What file should i mount? Where should i look?
>>52399416
It's chroot, i don't think i can run systemd there
>>52399450
>it's chroot
Then why do you need all these virtual terms?
>>52399468
For X11. X11 saysFatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
so i guess i need those ttys to run it. It's android device.
>>52399484
>android device
>x11
>in a chroot
What are you doing
Stop
>>52399496
It worked well in all of my previous android devices. Chrooted debian with image displayed through framebuffer.
>>52399513
Bindmount your /dev from your android to your chroot
>>52399528
Of course i did - i don't have those ttyX devices in android.
>>52399545
Start androids getty
>>52399567
I don't have getty there. But i don't have getty in my other android devices and they have ttyX's, so i guess there is some other way to do it in android. I'll read those init thingies in android and maybe i'll find out.
we're so close to the >>52399999 get aren't we guys
try to create a device with
mknod /dev/tty1 c 4 1
>>52399753
I tried, but it seems like it doesn't work this way. X11 won't start with same error and when i'm trying to write anything into those created ttyX, it saysbash: /dev/tty1: No such device or address
>>52399804
check file permissions
>>52399839
666 - Same as in /dev/tty.
>>52399344
# touch /dev/tty1
> pleb
>>52399904xf86OpenConsole: Cannot find a free VT: Inappropriate ioctl for device
>>52399948
that board is cancer
>>52399969
no
u r
>>52399986
no u r
>>52399864
show the output of ls -l /dev/tty*
maybe theres no compiled support for tty's in kernel or in libc
>>52400007crw-rw-rw- 1 root root 5, 0 Jan 13 15:10 /dev/tty
-rw-rw-rw- 1 root root 0 Jan 13 15:12 /dev/tty0
-rw-rw-rw- 1 root root 0 Jan 13 15:12 /dev/tty1
-rw-rw-rw- 1 root root 0 Jan 13 15:13 /dev/tty2
crw------- 1 root root 249, 0 Jan 13 14:57 /dev/ttyGS0
crw------- 1 root root 249, 1 Jan 13 14:57 /dev/ttyGS1
crw------- 1 root root 249, 2 Jan 13 14:57 /dev/ttyGS2
crw------- 1 root root 249, 3 Jan 13 14:57 /dev/ttyGS3
crw-rw---- 1 1021 debian 250, 1 Jan 13 14:57 /dev/ttyHS1
crw-rw---- 1 1002 3008 250, 2 Jan 13 14:57 /dev/ttyHS2
crw------- 1 root root 250, 3 Jan 13 14:57 /dev/ttyHS3
crw------- 1 root root 250, 4 Jan 13 14:57 /dev/ttyHS4
crw------- 1 root root 4, 64 Jan 13 14:57 /dev/ttyS0
crw------- 1 root root 4, 65 Jan 13 14:57 /dev/ttyS1
crw------- 1 root root 4, 66 Jan 13 14:57 /dev/ttyS2
crw------- 1 root root 4, 67 Jan 13 14:57 /dev/ttyS3
One of my devices had those ttys only in several roms (and kernels), so i guess kernel thing may be the reason.
>>52399969
This board is canser
>>52400033
tty0 1 and 2 are not character devices, just regular files, delete them and then create with command i gave above
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1 and so on
then chmod 666 them
and chown 0:0
>>52399999
I thought this reply chain was going on for a while
T-thanks Clover
>>52400084
I already tried that.crw-rw-rw- 1 root root 5, 0 Jan 13 15:10 /dev/tty
crw-rw-rw- 1 root root 4, 0 Jan 13 15:27 /dev/tty0
crw-rw-rw- 1 root root 4, 1 Jan 13 15:28 /dev/tty1
crw------- 1 root root 249, 0 Jan 13 14:57 /dev/ttyGS0
crw------- 1 root root 249, 1 Jan 13 14:57 /dev/ttyGS1
crw------- 1 root root 249, 2 Jan 13 14:57 /dev/ttyGS2
crw------- 1 root root 249, 3 Jan 13 14:57 /dev/ttyGS3
crw-rw---- 1 1021 debian 250, 1 Jan 13 14:57 /dev/ttyHS1
crw-rw---- 1 1002 3008 250, 2 Jan 13 14:57 /dev/ttyHS2
crw------- 1 root root 250, 3 Jan 13 14:57 /dev/ttyHS3
crw------- 1 root root 250, 4 Jan 13 14:57 /dev/ttyHS4
crw------- 1 root root 4, 64 Jan 13 14:57 /dev/ttyS0
crw------- 1 root root 4, 65 Jan 13 14:57 /dev/ttyS1
crw------- 1 root root 4, 66 Jan 13 14:57 /dev/ttyS2
crw------- 1 root root 4, 67 Jan 13 14:57 /dev/ttyS3
And X still results inFatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
>>52399344
/dev/tty0 is usually opened as a fallback.
Check that /dev/pts is mounted as devpts and that /dev/ptmx is readable for all.
>>52400123
my last advice, check permissions, ownership to /dev directory, if it's executable and stuff
>>52400141
I do have /dev/pts and /dev/ptmx, contents of /dev/pts:crw------- 1 root root 136, 0 Jan 13 16:33 0
crw------- 1 u0_a42 u0_a42 136, 1 Jan 13 16:27 1
crw------- 1 u0_a42 u0_a42 136, 2 Jan 13 16:27 2
crw------- 1 root root 136, 3 Jan 13 16:27 3
crw------- 1 root root 136, 4 Jan 13 16:33 4
and ptmx permissions:crw-rw-rw- 1 root root 5, 2 Jan 13 16:33 /dev/ptmx
I'm trying to run those X's as a root.
>>52400172
I also know that openpts() requires the directory /dev/shm to be present, mounted as tmpfs and having mode 1777
>>52400195
I meant openpty()
>>52400195
I don't have /dev/shm, but on the other hand i don't have it on my "tty-enabled" android devices either.
>>52400240
It's not about Android, the functionality of opening pty has changed in glibc.
Last thing I remember is that the mount options for /dev/pts should include gid=5,mode=660.
5 being the default tty group manager. Make sure that uid exists in /etc/passwd.
>>52400268
Alright, i'll definitely try it in my next useless crap session - i think i got kinda exhausted for today.
Everyone(?), thank you for your help. Really, i mean it, not being shitposted and getting serious answers is not something i see there on daily basis.