Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo embedded: logs indesiderati in tty1
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Sat Sep 09, 2006 10:37 pm    Post subject: Gentoo embedded: logs indesiderati in tty1 Reply with quote

Salve a tutti!

Sto costruendo una minidistro veramente minimale compilata con uClibc che gira completamente in ram essendo composta da :
- immagine del kernel
- file di initramfs

Fa il boot e funziona tutto egregiamente, ma c'è un piccolo problema: dopo aver effettuato il boot, dei logs che si riferiscono alla penna usb e/o al mouse, compaiono in tty1, "sporcando" il login e il conseguente messaggio contenuto in /etc/issue

/etc/inittab :
Code:

# Startup the system
null::sysinit:/bin/mount -o remount,rw /
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
null::sysinit:/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
# now run any rc scripts
::sysinit:/etc/init.d/rcS

# Set up a couple of getty's
tty1::respawn:/sbin/mingetty --autologin root tty1
tty2::respawn:/sbin/getty 38400 tty2

# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100

# Logging junk
null::sysinit:/bin/touch /var/log/messages
null::respawn:/sbin/syslogd -n -m 0
null::respawn:/sbin/klogd -n
tty3::respawn:/bin/tail -f /var/log/messages

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
null::shutdown:/etc/init.d/rcK
null::shutdown:/usr/bin/killall klogd
null::shutdown:/usr/bin/killall syslogd
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a


Ho lanciato anche il kernel con il parametro
Code:
console="tty3"

(e abilitando il supporto per i terminali virtuali nel kernel), ma non cambia assolutamente nulla riguardo a quei logs... avete idee?

Grazie, ciao ;)

// EDIT: spostato nel forum di discussione dopo una consultazione con gli altri mod

_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
.:deadhead:.
Advocate
Advocate


Joined: 25 Nov 2003
Posts: 2963
Location: Milano, Italy

PostPosted: Sun Sep 10, 2006 11:10 am    Post subject: Reply with quote

Non è che dovresti avere un logger installato così anzichè andare dritti in console i mex vengono intercettati?
_________________
Proudly member of the Gentoo Documentation Project: the Italian Conspiracy ! ;)
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Sun Sep 10, 2006 4:04 pm    Post subject: Reply with quote

.:deadhead:. wrote:
Non è che dovresti avere un logger installato così anzichè andare dritti in console i mex vengono intercettati?

Beh, ma io non voglio installare un logger, non ha alcun senso sulla distro che sto facendo... possibile che non ci sia un modo alternativo?
Oltre a questo, ho provato una soluzione del genere in inittab:
Code:
tty1::respawn:/sbin/mingetty --autologin root tty1 2>/dev/tty3

Ma non cambia assolutamente nulla
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Sun Sep 10, 2006 6:30 pm    Post subject: Reply with quote

lavish wrote:
Beh, ma io non voglio installare un logger,


Ma tu il logger già lo hai installato :roll:

Code:
$ busybox --help
BusyBox v1.1.3 (2006.08.15-18:44+0000) multi-call binary

Usage: busybox [function] [arguments]...
...
Currently defined functions:
...
sysctl, syslogd, tail,
...

_________________
Ciao da me!
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Sun Sep 10, 2006 6:39 pm    Post subject: Reply with quote

randomaze wrote:
Ma tu il logger già lo hai installato

In effetti hai ragione.. e oltre a questo, dal mio inittab lo sto pure usando.. :?
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Sun Sep 10, 2006 7:22 pm    Post subject: Reply with quote

lavish wrote:
randomaze wrote:
Ma tu il logger già lo hai installato

In effetti hai ragione.. e oltre a questo, dal mio inittab lo sto pure usando.. :?


Beh allora configuralo e fallo partire. Oppure accertati che non sia lui a scrivere su tty1 :-P
_________________
Ciao da me!
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Sun Sep 10, 2006 9:48 pm    Post subject: Reply with quote

Ehm.. ho trovato un modo per avere la tty1 bella pulita (metodo suggerito da drizzt :lol: )
La simpatica trovata sta nel disabilitare il supporto a printk nel kernel :lol:

Da booting kernel a /etc/issue senza alcuna output :lol: , dmesg vuoto.
(ovviamente non metto il tag risolto visto che non mi sembra una soluzione questo sistema ;) )
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Sep 11, 2006 10:28 am    Post subject: Reply with quote

Hai provato a passare al kernel qualcosa del genere:

Code:
 append = "console=tty3"


Magari ricordo male :(
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Mon Sep 11, 2006 5:32 pm    Post subject: Reply with quote

gutter wrote:
Hai provato a passare al kernel qualcosa del genere

Leggi il primo post :P
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Mon Sep 11, 2006 5:45 pm    Post subject: Reply with quote

lavish wrote:

Leggi il primo post :P


Oops :D

Sorry ma avevo letto di fretta.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
cloc3
Advocate
Advocate


Joined: 13 Jan 2004
Posts: 4792
Location: http://www.gentoo-users.org/user/cloc3/

PostPosted: Tue Sep 12, 2006 6:26 am    Post subject: Reply with quote

provo a dire un stupidaggine :oops: .

nella initramfs, l'output verso terminale è direzionato in console da questa riga:
Code:

exec chroot . /bin/sh <<- EOF >dev/console 2>&1

forse sarebbe possibile creare preventivamente una tty3 e provare a mettere gli output lì.
oppure separe standard log e standard error.
_________________
vu vu vu
gentù
mi piaci tu
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Tue Sep 12, 2006 6:40 am    Post subject: Reply with quote

Accidenti, c'hai ragione! Adesso provo subito qualcosa di simile, ripristinando prima il supporto a printk nel kernel :lol:
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum