Subject: Re: screen, console & ttys
To: Jukka Salmi <>
From: Marcin Jessa <>
List: current-users
Date: 07/05/2005 02:19:43
On Mon, 4 Jul 2005 08:32:19 +0200
Jukka Salmi <> wrote:

> Marcin Jessa --> tech-embed (2005-07-04 01:01:46 +0200):
> > On Fri, 1 Jul 2005 00:46:31 +0200
> > Jukka Salmi <> wrote:
> > 
> > > Marcin Jessa --> tech-embed (2005-06-30 22:40:43 +0200):
> > > > Ok, then invoking login with automatic login will do since then I can use serial and screen console at the same time with wscons.
> > > > Gotta just figure out how to disable login prompt...
> > > > Any ideas?
> > > 
> > > Booting single-user? 
> > It needs to be done automatically so this would not work for me.
> > Anyway, single user mode does not execute any of the parts needed for wscons to show screen console when running installboot with console=com0
> You can set `options RB_SINGLE=1' in your kernel config file to have the
> system boot to single user automatically.

I just removed the line telling kernel not to go to single user mode:
options        MEMORY_RBFLAGS=0        # don't force single user
Still, booting in multiuser with login prompt works fine, I get both serial and screen console. 
Screen is taken care of by wscons, console which is set to com0 is taken care of by getty.
What I dont understand is why I get login prompt in screen console in single user mode with wscons and getty started with e.g /usr/libexec/getty Pc ttyE1 ?
Is hacking getty not to print out login: in single user mode and instead execute /bin/sh the only way to get that work ?
Maybe it'd be a good idea to add single user mode to getty? That way one could support console and screen without login.

> > >Or setting the second field in /etc/ttys to something
> > > which does what you want?
> > What do you mean? ttyE0 ?
> > Executing /usr/libexec/getty Pc console will automatically start login session prompting for username. I would somehow need to make getty not to prompt for username (login:) and not execute the login binary.
> I meant something like
> console "/bin/sh /your/login/script" vt100 on secure 
> in your /etc/ttys.

AFAIR /etc/ttys is not used in single user mode so one needs to run stuff manually.
I ran: /bin/sh /sysinst Pc ttyE1 vt100

That gave me some kind of loop: 
init: Creating mfs /dev (412 blocks, 1024 inodes)
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsconscfg: WSMUX_ADD_DEVICE: Device not configured
# stty: TIOCGETD: Operation not supported
wsconscfg: screen 1 is already configured
wsconscfg: WSMUX_ADD_DEVICE: Device not configured

but running /usr/libexec/getty Pc ttyE1 vt220 works fine, except it sends me then to login: ...