View previous topic :: View next topic |
Author |
Message |
lavish Bodhisattva
Joined: 13 Sep 2004 Posts: 4296
|
Posted: Sat Sep 09, 2006 10:37 pm Post subject: Gentoo embedded: logs indesiderati in tty1 |
|
|
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
(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 |
|
|
.:deadhead:. Advocate
Joined: 25 Nov 2003 Posts: 2963 Location: Milano, Italy
|
|
Back to top |
|
|
lavish Bodhisattva
Joined: 13 Sep 2004 Posts: 4296
|
Posted: Sun Sep 10, 2006 4:04 pm Post subject: |
|
|
.: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 |
|
|
randomaze Bodhisattva
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Sun Sep 10, 2006 6:30 pm Post subject: |
|
|
lavish wrote: | Beh, ma io non voglio installare un logger, |
Ma tu il logger già lo hai installato
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 |
|
|
lavish Bodhisattva
Joined: 13 Sep 2004 Posts: 4296
|
Posted: Sun Sep 10, 2006 6:39 pm Post subject: |
|
|
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 |
|
|
randomaze Bodhisattva
Joined: 21 Oct 2003 Posts: 9985
|
Posted: Sun Sep 10, 2006 7:22 pm Post subject: |
|
|
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 _________________ Ciao da me! |
|
Back to top |
|
|
lavish Bodhisattva
Joined: 13 Sep 2004 Posts: 4296
|
Posted: Sun Sep 10, 2006 9:48 pm Post subject: |
|
|
Ehm.. ho trovato un modo per avere la tty1 bella pulita (metodo suggerito da drizzt )
La simpatica trovata sta nel disabilitare il supporto a printk nel kernel
Da booting kernel a /etc/issue senza alcuna output , 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 |
|
|
gutter Bodhisattva
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Mon Sep 11, 2006 10:28 am Post subject: |
|
|
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 |
|
|
lavish Bodhisattva
Joined: 13 Sep 2004 Posts: 4296
|
Posted: Mon Sep 11, 2006 5:32 pm Post subject: |
|
|
gutter wrote: | Hai provato a passare al kernel qualcosa del genere |
Leggi il primo post _________________ minimalblue.com | secgroup.github.io/ |
|
Back to top |
|
|
gutter Bodhisattva
Joined: 13 Mar 2004 Posts: 7162 Location: Aarau, Aargau, Switzerland
|
Posted: Mon Sep 11, 2006 5:45 pm Post subject: |
|
|
lavish wrote: |
Leggi il primo post |
Oops
Sorry ma avevo letto di fretta. _________________ Registered as User #281564 and Machines #163761 |
|
Back to top |
|
|
cloc3 Advocate
Joined: 13 Jan 2004 Posts: 4792 Location: http://www.gentoo-users.org/user/cloc3/
|
Posted: Tue Sep 12, 2006 6:26 am Post subject: |
|
|
provo a dire un stupidaggine .
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 |
|
|
lavish Bodhisattva
Joined: 13 Sep 2004 Posts: 4296
|
Posted: Tue Sep 12, 2006 6:40 am Post subject: |
|
|
Accidenti, c'hai ragione! Adesso provo subito qualcosa di simile, ripristinando prima il supporto a printk nel kernel _________________ minimalblue.com | secgroup.github.io/ |
|
Back to top |
|
|
|