[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#287932: debian-installer: serial console detection will fail if two console= kernel args are provided.



On Friday 31 December 2004 01:00, Sven Luther wrote:
> The current way for detecting a serial console is to grep for
> "console=ttyS" on the /proc/cmdline, which naturally fails in this
> setup, and resulted on an impossibility to chose a keyboard on my prep
> motorola powerstack install. fjp tells me that this mechanism is used
> in various (at least 4) places in the whole of debian installer, which
> is why i fill a generic bug, and not a bug against kbd-chooser.

During some work on kbd-chooser and network-console I found that there are 
several places where d-i tests to see if the installation is being done 
over serial console, and the settings of the port. Not all components use 
the same test.
I feel it would be good to create a function that is run during 
initialization of d-i that tests this once and saves relevant data so 
other components can retrieve it.

A little inventory (may not be complete):
- rootskel/src/lib/debian-installer/detect-console-linux
  rootskel/src/lib/debian-installer/detect-console-linux-s390
  Both use 'readlink /proc/self/fd/0' and set TERM_TYPE
- rootskel/src/sbin/init
  Uses $TERM_TYPE
- kbd-chooser/kbd-chooser.c
  Greps /proc/cmdline and uses an ioctl on /dev/console
- kbd-chooser/debian/prebaseconfig
  Uses debian-installer/serial-console (set in kbd-chooser.c)
- arch/<various bootloaders>/debian/postinst
  The ones I checked look in /proc/cmdline
  Speed and settings of port are determined
- prebaseconfig/prebaseconfig.d/90prepare-base-config
  Uses 'readlink /proc/<pid>/fd/0' for 'pidof <1st instance of
  debian-installer>'
  Speed and settings of port are determined



Reply to: