:: Re: [DNG] inittab getty tty
Etusivu
Poista viesti
Vastaa
Lähettäjä: Rainer Weikusat
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] inittab getty tty
mett <mett@???> writes:

[...]


> I realized few days ago I had not any tty when the server comes up
> (and is up), while trying to set up a serial connection to this server:
>
> root@tamerrp:/home/mettler# ps aux | grep tty
> root 3560 0.0 0.0 12728 2284 pts/2 S+ 11:19 0:00 grep tty
>
> root@tamerrp:/home/mettler# dmesg | grep tty
> [0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64
> root=UUID=5982d543-1e27-4350-b2f2-81d0cc40e0a0 ro console=tty0
> console=ttyS0,9600n8
> [0.000000] Kernel command line:
> BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-amd64
> root=UUID=5982d543-1e27-4350-b2f2-81d0cc40e0a0 ro console=tty0
> console=ttyS0,9600n8
> [0.000000] console [tty0] enabled
> [0.000000] console [ttyS0] enabled
> [8.132769] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
> [30.550283] ttyS1: LSR safety check engaged!
> [30.611799] ttyS1: LSR safety check engaged!
>
> (I can connect via ssh).


The command-line you're booting with instructs the kernel to print
output on tty0 and ttyS0 but only accept input from ttyS0.

> It seems init is not parsing /etc/inittab while starting up
> (init q seems wihtout effect as well).


This seems very unlikely. In order to check for this, you could attach
an strace to init with

strace -f -p 1

and then do an init q. The output should be something like

read(10, "i\31\t\3\1\0\0\0q\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
open("/dev/console", O_RDONLY|O_NONBLOCK) = 0
close(0)                                = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
time([1474642475])                      = 1474642475
socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 0
connect(0, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
sendto(0, "<30>Sep 23 15:54:35 init: Re-rea"..., 44, MSG_NOSIGNAL, NULL, 0) = 44
close(0)                                = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
stat("/var/run/utmp", {st_mode=S_IFREG|0664, st_size=7680, ...}) = 0
open("/etc/inittab", O_RDONLY)          = 0
fstat(0, {st_mode=S_IFREG|0644, st_size=2010, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcfddcd4000
read(0, "# /etc/inittab: init(8) configur"..., 4096) = 2010
read(0, "", 4096)                       = 0
close(0)                                = 0