Comment 2 for bug 48752

Revision history for this message
Bryan Stillwell (bryan-stillwell) wrote :

Here are the results of those commands:

~ # inst_pid=$(pidof debian-installer | cut -d" " -f1)
~ # echo ${inst_pid}
2003
~ # rawconsole=$(readlink /proc/${inst_pid}/fd/0)
~ # echo ${rawconsole}
/dev/console
~ # console=$(mapdevfs "$rawconsole")
~ # echo ${console}
/dev/console
~ # rawconsole=${rawconsole#/dev/}
~ # echo ${rawconsole}
console
~ # console=${console#/dev/}
~ # echo ${console}
console

Apparently SuSE uses a kernel patch that was rejected by the lkml people which creates a new ioctl called TIOCGDEV. If you're curious, look at the fetchtty code from libconsole.c in the showconsole-1.08 tarball of SuSE's sysvinit package. I believe this was one of the first postings on the subject:

   http://lkml.org/lkml/2000/12/15/160

The best my friends and I have come up with that doesn't require a kernel patch is something like the following:

grep "Adding console on ttyS" /var/log/syslog | sed -e "s/^.*console on \(.*\) at .*$/\1/"