Ubuntu

Comment 10 for bug 682831

Scott Moser (smoser) wrote :

I did some more poking, and found a lot of good information. I noticed in drivers/xen/console/console.c (kernel) the following comments:
# * Modes:
# * 'xencons=off' [XC_OFF]: Console is disabled.
# * 'xencons=tty' [XC_TTY]: Console attached to '/dev/tty[0-9]+'.
# * 'xencons=ttyS' [XC_SERIAL]: Console attached to '/dev/ttyS[0-9]+'.
# * 'xencons=xvc' [XC_XVC]: Console attached to '/dev/xvc0'.
# * 'xencons=hvc' [XC_HVC]: Console attached to '/dev/hvc0'.
# * default: XC_XVC

That lead me to try some different kernel command lines:
- cmdline: console=hvc0 (this is what works in maverick)
  result: some lost console output
  /dev/hvc0 does not exist
- cmdline: xencons=ttyS console=ttyS0
  result: no console output past kernel output
  /dev/ttyS0 exists
  input output error on try to write to /dev/console
- cmdline: console=ttyS0
  result: no console output other than getty prompt showing 'tty1'
  tee: /dev/console: Input/output error
- cmdline: console=tty1
  result all data got to ec2-get-console.

I thought to try 'console=tty1' because I noticed the following in the kernel boot messages:
* [ 0.000000] Kernel command line: root=LABEL=uec-rootfs ro console=hvc0
  [ 0.000000] console [tty-1] enabled
  [ 1.505699] Xen virtual console successfully installed as tty1

* [ 0.000000] Kernel command line: root=LABEL=uec-rootfs ro xencons=ttyS console=ttyS0
  [ 0.000000] console [ttyS0] enabled
  [ 0.000000] console [ttyS0] enabled

* [ 0.000000] Kernel command line: root=LABEL=uec-rootfs ro console=ttyS0
  [ 0.000000] console [ttyS0] enabled
  [ 0.000000] console [tty-1] enabled
  [ 1.478630] Xen virtual console successfully installed as tty1

* [ 0.000000] Kernel command line: root=LABEL=uec-rootfs ro console=tty1
  [ 0.000000] console [tty1] enabled
  [ 0.000000] console [tty1] enabled
  [ 1.295756] Xen virtual console successfully installed as tty1

I've not dug into what all that means, but when I used 'console=tty1', I got all the data I was hoping for on the console, and the 'Xen virtual console' matched up with 'console='.

One other point of information is that /dev/hvc0 *never* exists in the lucid boot (well, at least after I can ssh to it). I tried having the 'myhack' script (running before /sbin/init) create a correct /dev/hvc0 node with 'mknod' but that had no effect).

It seems to me, then that the difference from plymouth's point of view between the lucid and maverick kernels that have the same (console=hvc0) command line is that in lucid, the device node for /dev/hvc0 does not get created. This could potentially cause plymouth to then be unable to replay the messages it caught from /dev/console when it used TIOCCONS.