[MAYBE SOLVED] was Can't resolv "sh: can't access tty; job control turned off"
Laurent B
the_ccm at hotmail.com
Wed Jan 17 20:26:10 UTC 2007
>
>Laurent:
>
>>when I login with telnet on my board, very famous message :
>>"-sh: can't access tty; job control turned off"
>>also when I try "echo hello > /dev/tty" , got "cannot create /dev/tty: No
>>such device or address"
>So... does /dev/tty exist?
>
>my "ls -l /dev/tty":
>crw-rw-rw- 1 root tty 5, 0 Jan 17 13:12 /dev/tty
>
>>but "echo hello > /dev/tty" seems to work
>Huh? Isn't that the same as above?
yes sorry miss one key: echo hello > /dev/tty1 works but echo hello >
/dev/hello don't
>
>>first, under telnet when I type "tty" it gives me : "/dev/pts/0"
>>so I think there is a problem with pts devices.
>>
>>What am I missing ? really need help getting crazy :)
>
>Did you mount devpts on /dev/pts???
>Your inittab/rcS don't ;)
>
yes it does with "mount -a" which looks into fstab, which contains the
devpts entry
>>*inittab file :
>>
>>::sysinit:/etc/init.d/rcS
>>ttyS0::respawn:/sbin/getty -L ttyS0 19200 vt100
>>
>>vc/1::respawn:/sbin/getty 38400 /dev/vc/1
>>tty::respawn:/sbin/getty 19200 /dev/tty vt100
>Shouldn't this be tty1::respawn:/sbin/getty 19200 /dev/tty1 vt100 ???
>
>>pts/0::respawn:/sbin/getty 38400 /dev/pts/0
>Huh??? What's this good for? Never needed this to get ssh/telnet to work...
>
>
>>::ctrlaltdel:/sbin/reboot
>>::shutdown:/sbin/swapoff -a
>>::shutdown:/bin/umount -a -r
>>::restart:/sbin/init
>>
>>*rcS script
>>
>>#!/bin/sh
>>mount -t devfs /sys
>>mount -t proc /proc /proc
>>mount -t devfs /sys
>Now why do you mount this twice???
>And also... shouldn't that be sysfs to be mounted???
>
it was a just a try because didn't know if I had to mount it or not, and
twice is a mistake, I deleted it since.
>>mount -o remount,rw /
>>mount -a
>>ifconfig eth0 192.168.62.44 netmask 255.255.255.0
>>route add default gw 192.168.62.251
>>export TERM=linux
>>telnetd
>>syslogd
>>
>>*devices files :
>>crw-r--r-- 1 root root 5, 0 Nov 30 00:16 tty
>>crw-rw-rw- 1 root tty 5, 2 Nov 30 00:15 ptmx
>>crw-rw-rw- 1 root tty 2, 176 Nov 30 00:18 ptya0
>>crw-rw-rw- 1 root tty 2, 177 Nov 30 00:18 ptya1
>>crw-rw-rw- 1 root tty 2, 178 Nov 30 00:18 ptya2
>>crw-rw-rw- 1 root tty 2, 179 Nov 30 00:18 ptya3
>>crw-rw-rw- 1 root tty 2, 180 Nov 30 00:18 ptya4
>>crw-r--r-- 1 root root 4, 0 Nov 30 00:14 tty0
>Ok... so the device actually exists... though with slightly different
>rights...
>
>>crw--w--w- 1 root root 4, 1 Nov 30 00:06 tty1
>>crw------- 1 root root 4, 2 Nov 30 00:14 tty2
>>crw------- 1 root root 4, 3 Nov 30 00:14 tty3
>>crw-rw-rw- 1 root tty 3, 176 Nov 30 00:18 ttya0
>>crw-rw-rw- 1 root tty 3, 177 Nov 30 00:18 ttya1
>>crw-rw-rw- 1 root tty 3, 178 Nov 30 00:18 ttya2
>>crw-rw-rw- 1 root tty 3, 179 Nov 30 00:18 ttya3
>>drwxr-xr-x 2 root root 0 Nov 30 00:00 pts
>>
>>*mounted FS :
>>rootfs on / type rootfs (rw)
>>/dev/root on / type ext2 (rw)
>>sysfs on /sys type sysfs (rw)
>>/proc on /proc type proc (rw)
>>none on /dev/pts type devpts (rw)
>Again... when does this get mounted??? It's nowhere in your scripts???
>
>Cheers,
>--
>Rory Slegtenhorst
>rory dot slegtenhorst at gmail dot com
but I found a strange way to got it working, "tty" commands return
"/dev/pts/0", so I juste made :
rm /dev/tty
ln -s /dev/pts/0 /dev/tty
And now it's working, so I don't know what /dev/tty is used for, but seems
to be a dynamic link which stands for the current console tou are logged in.
So now why /dev/tty does not work ? I think it is a kernel compilation
problem, will look for this , but if you have an answer, I'm taking it :)
Laurent
_________________________________________________________________
Découvrez le Blog heroic Fantaisy d'Eragon!
http://eragon-heroic-fantasy.spaces.live.com/
More information about the busybox
mailing list