Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #226956 > unrolled thread

Use of installer's interactive shells on tty1-tty4

Started byRichard Owlett <rowlett@cloud85.net>
First post2020-09-13 12:20 +0200
Last post2020-09-14 20:00 +0200
Articles 16 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  Use of installer's interactive shells on tty1-tty4 Richard Owlett <rowlett@cloud85.net> - 2020-09-13 12:20 +0200
    Re: Use of installer's interactive shells on tty1-tty4 Linux-Fan <Ma_Sys.ma@web.de> - 2020-09-13 12:50 +0200
    Re: Use of installer's interactive shells on tty1-tty4 David <bouncingcats@gmail.com> - 2020-09-13 12:50 +0200
      Re: Use of installer's interactive shells on tty1-tty4 Richard Owlett <rowlett@cloud85.net> - 2020-09-13 14:00 +0200
    Re: Use of installer's interactive shells on tty1-tty4 David Wright <deblis@lionunicorn.co.uk> - 2020-09-13 17:40 +0200
    Re: Use of installer's interactive shells on tty1-tty4 Felix Miata <mrmazda@earthlink.net> - 2020-09-13 20:10 +0200
      Re: Use of installer's interactive shells on tty1-tty4 David <bouncingcats@gmail.com> - 2020-09-14 11:50 +0200
        Re: Use of installer's interactive shells on tty1-tty4 David Wright <deblis@lionunicorn.co.uk> - 2020-09-14 16:20 +0200
          Re: Use of installer's interactive shells on tty1-tty4 David <bouncingcats@gmail.com> - 2020-09-14 20:30 +0200
            Re: Use of installer's interactive shells on tty1-tty4 David <bouncingcats@gmail.com> - 2020-09-14 20:50 +0200
              Re: Use of installer's interactive shells on tty1-tty4 David Wright <deblis@lionunicorn.co.uk> - 2020-09-15 18:40 +0200
                Re: Use of installer's interactive shells on tty1-tty4 Felix Miata <mrmazda@earthlink.net> - 2020-09-15 20:50 +0200
                  Re: Use of installer's interactive shells on tty1-tty4 David Wright <deblis@lionunicorn.co.uk> - 2020-09-16 04:40 +0200
                    Re: Use of installer's interactive shells on tty1-tty4 Felix Miata <mrmazda@earthlink.net> - 2020-09-16 06:10 +0200
        Re: Use of installer's interactive shells on tty1-tty4 Stefan Monnier <monnier@iro.umontreal.ca> - 2020-09-14 19:20 +0200
          Re: Use of ^Hi^Hn^Hs^Ht^Ha^Hl^Hl^He^Hr^H'^Hs interactive shells on  tty1-tty4 Felix Miata <mrmazda@earthlink.net> - 2020-09-14 20:00 +0200

#226956 — Use of installer's interactive shells on tty1-tty4

FromRichard Owlett <rowlett@cloud85.net>
Date2020-09-13 12:20 +0200
SubjectUse of installer's interactive shells on tty1-tty4
Message-ID<AOxh0-4fx-3@gated-at.bofh.it>
Where can I find description of using installer's interactive shells on 
tty1-tty4?

All I've found are passing mentions in
   https://www.debian.org/releases/stable/amd64/ch05s03.en.html
   https://www.debian.org/releases/stable/amd64/ch06s03.en.html

[toc] | [next] | [standalone]


#226957

FromLinux-Fan <Ma_Sys.ma@web.de>
Date2020-09-13 12:50 +0200
Message-ID<AOxK1-4oZ-1@gated-at.bofh.it>
In reply to#226956
Richard Owlett writes:

> Where can I find description of using installer's interactive shells on tty1-
> tty4?

I am not sure how much documentation there is on it, but how about this
(section 6.3.9.2):
https://www.debian.org/releases/stable/amd64/ch06s03.en.html#di-miscellaneous

HTH
Linux-Fan

[...]

[toc] | [prev] | [next] | [standalone]


#226958

FromDavid <bouncingcats@gmail.com>
Date2020-09-13 12:50 +0200
Message-ID<AOxK1-4oZ-9@gated-at.bofh.it>
In reply to#226956
On Sun, 13 Sep 2020 at 20:16, Richard Owlett <rowlett@cloud85.net> wrote:

> Where can I find description of using installer's interactive shells on
> tty1-tty4?

The installer is a running Linux system. What you ask about is a
standard feature that is compiled into most Linux kernels, and the
feature exists because it emulates many similar UNIXes that
pre-dateLinux.

So this feature is not something that is specific to the installer, it
is present because it hasn't been explicitly removed from the
configuration of the kernel that is built to run the installer, because
it is very useful there just like it is useful in many other situations.

So when seeking information I suggest forgetting about the installer,
and using internet search terms something like:
  linux console tty device nodes tty1 switch

to find more information than you will probably ever need. There is plenty
available, although from a purely "how do I use this?" user point of view,
there really isn't much explanation needed.

[toc] | [prev] | [next] | [standalone]


#226959

FromRichard Owlett <rowlett@cloud85.net>
Date2020-09-13 14:00 +0200
Message-ID<AOyPL-50R-9@gated-at.bofh.it>
In reply to#226958
On 09/13/2020 05:45 AM, David wrote:
> On Sun, 13 Sep 2020 at 20:16, Richard Owlett <rowlett@cloud85.net> wrote:
> 
>> Where can I find description of using installer's interactive shells on
>> tty1-tty4?
> 
> The installer is a running Linux system. What you ask about is a
> standard feature that is compiled into most Linux kernels, and the
> feature exists because it emulates many similar UNIXes that
> pre-dateLinux.
> 
> So this feature is not something that is specific to the installer, it
> is present because it hasn't been explicitly removed from the
> configuration of the kernel that is built to run the installer, because
> it is very useful there just like it is useful in many other situations.
> 
> So when seeking information I suggest forgetting about the installer,
> and using internet search terms something like:
>    linux console tty device nodes tty1 switch
> 
> to find more information than you will probably ever need. There is plenty
> available, although from a purely "how do I use this?" user point of view,
> there really isn't much explanation needed.
> 
> 
> 
AHHAA ;/
I was thinking it was something specific to the installer.
Browsing a couple of the search hits makes me wonder that that might be 
more appropriate than some things I run regularly in a virtual console.
I'll have to experiment later today.
Thanks.

[toc] | [prev] | [next] | [standalone]


#226965

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-09-13 17:40 +0200
Message-ID<AOCgF-7i1-5@gated-at.bofh.it>
In reply to#226956
On Sun 13 Sep 2020 at 05:15:38 (-0500), Richard Owlett wrote:
> Where can I find description of using installer's interactive shells
> on tty1-tty4?
> 
> All I've found are passing mentions in
>   https://www.debian.org/releases/stable/amd64/ch05s03.en.html
>   https://www.debian.org/releases/stable/amd64/ch06s03.en.html

I doubt anyone has bothered to write it. What is there to say:

. it runs ash IIRC so that's probably documented somewhere,
. TAB works for completion,
. ↑↓ work for history,
. there's help,
. / is the installation filesystem which eventually evaporates,
. /target, when it appears, is the future installed system,
. most utilities are really just incantations of busybox, so
.. they're limited in functionality,
.. they lack lots of options
. use introspection to find out more.

AIUI VC4 is what will appear in /var/log/installer/syslog and
maybe the partitioning stuff (which I never do in the d-i).
I've never had to use the shell in VC1, but I assume it's
basically the same as VC2/3.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#226968

FromFelix Miata <mrmazda@earthlink.net>
Date2020-09-13 20:10 +0200
Message-ID<AOEBQ-lj-3@gated-at.bofh.it>
In reply to#226956
Richard Owlett composed on 2020-09-13 05:15 (UTC-0500):

> Where can I find description of using installer's interactive shells on 
> tty1-tty4?

1,3,4 are not available shells.

IIRC:
tty1 is devoted to the installer
tty2 is an available shell
tty3 & 4 are devoted to various logging/status or installer's command output
tty5 or 6 or 7 is next available shell
-- 
Evolution as taught in public schools, like religion,
	is based on faith, not on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

[toc] | [prev] | [next] | [standalone]


#226975

FromDavid <bouncingcats@gmail.com>
Date2020-09-14 11:50 +0200
Message-ID<AOThw-BB-3@gated-at.bofh.it>
In reply to#226968
On Mon, 14 Sep 2020 at 04:05, Felix Miata <mrmazda@earthlink.net> wrote:
> Richard Owlett composed on 2020-09-13 05:15 (UTC-0500):

> > Where can I find description of using installer's interactive shells on
> > tty1-tty4?

> 1,3,4 are not available shells.
> IIRC:

That does not match my recent experience.

To explore and confirm and maybe learn something from
smarter people, I report below some actual test results:

I begin by booting the buster installer on real hardware,
and it stops at "Debian installer main menu".

Pressing alt-F2 or alt-F3 produces a prompt
"Please press Enter to activate this console."
and pressing Enter starts BusyBox.
Pressing alt-F4 displays logs.
Pressing alt-F5 or any higher F-key does nothing.
Pressing alt-F1 returns to the installer.

BusyBox 'tty' command confirms /dev/tty2 and /dev/tty3.

'echo foo >/dev/tty4' confirms that the log display is
/dev/tty4 when the string 'foo' appears there.

I was unable to find any evidence for the use of /dev/tty1,
apart from pressing alt-F1 working as expected.

But I was just poking around cluelessly for curiosity, someone
else might know a way to do that. BusyBox 'ps' appears to not
provide tty information.

In BusyBox, 'ls -R' appears unsupported, so I ran:
  find /proc -type d -exec ls -l '{}' \; 2>/dev/null | grep tty1
it gave no output.

I looked at the other active processes using the same methods
without discovering anything else about /dev/tty1.

The installer PID was 257.
  ls -l /proc/257/fd/
shows
  2 -> /dev/tty0

BusyBox 'echo' to /dev/tty0 did not affect the installer screen.

However, I saw that process '/usr/bin/main-menu' used /dev/pts/0
and 'echo' to that device did write text into the installer screen.

At the "Debian installer main menu" I activated the
"Execute a shell" menu entry. In this shell
$ tty
/dev/pts/0

It appears that /dev/pts/0 performs the role of /dev/tty1.

I'm not very knowledgeable about all this tty stuff so I will leave
it at that.

[toc] | [prev] | [next] | [standalone]


#226982

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-09-14 16:20 +0200
Message-ID<AOXuO-3cS-9@gated-at.bofh.it>
In reply to#226975
On Mon 14 Sep 2020 at 19:48:37 (+1000), David wrote:
> On Mon, 14 Sep 2020 at 04:05, Felix Miata <mrmazda@earthlink.net> wrote:
> > Richard Owlett composed on 2020-09-13 05:15 (UTC-0500):
> 
> > > Where can I find description of using installer's interactive shells on
> > > tty1-tty4?
> 
> > 1,3,4 are not available shells.
> > IIRC:
> 
> That does not match my recent experience.

Ditto.

> To explore and confirm and maybe learn something from
> smarter people, I report below some actual test results:
> 
> I begin by booting the buster installer on real hardware,
> and it stops at "Debian installer main menu".
> 
> Pressing alt-F2 or alt-F3 produces a prompt
> "Please press Enter to activate this console."
> and pressing Enter starts BusyBox.
> Pressing alt-F4 displays logs.
> Pressing alt-F5 or any higher F-key does nothing.

You can also confirm this by pressing Alt-→ and Alt-← to rotate
through the four VCs.

> Pressing alt-F1 returns to the installer.
> 
> BusyBox 'tty' command confirms /dev/tty2 and /dev/tty3.
> 
> 'echo foo >/dev/tty4' confirms that the log display is
> /dev/tty4 when the string 'foo' appears there.
> 
> I was unable to find any evidence for the use of /dev/tty1,
> apart from pressing alt-F1 working as expected.
> 
> But I was just poking around cluelessly for curiosity, someone
> else might know a way to do that. BusyBox 'ps' appears to not
> provide tty information.
> 
> In BusyBox, 'ls -R' appears unsupported, so I ran:
>   find /proc -type d -exec ls -l '{}' \; 2>/dev/null | grep tty1
> it gave no output.
> 
> I looked at the other active processes using the same methods
> without discovering anything else about /dev/tty1.
> 
> The installer PID was 257.
>   ls -l /proc/257/fd/
> shows
>   2 -> /dev/tty0
> 
> BusyBox 'echo' to /dev/tty0 did not affect the installer screen.
> 
> However, I saw that process '/usr/bin/main-menu' used /dev/pts/0
> and 'echo' to that device did write text into the installer screen.
> 
> At the "Debian installer main menu" I activated the
> "Execute a shell" menu entry. In this shell
> $ tty
> /dev/pts/0
> 
> It appears that /dev/pts/0 performs the role of /dev/tty1.

You found it. That's the shell I said I've never used, available
on VC1 for those unlucky enough to find no means of leaving VC1
(eg Alt/Windows/etc keys not functioning correctly):

> I'm not very knowledgeable about all this tty stuff so I will leave
> it at that.

Same here. An interesting search.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#226986

FromDavid <bouncingcats@gmail.com>
Date2020-09-14 20:30 +0200
Message-ID<AP1oK-5tD-3@gated-at.bofh.it>
In reply to#226982
On Tue, 15 Sep 2020 at 00:10, David Wright <deblis@lionunicorn.co.uk> wrote:
> On Mon 14 Sep 2020 at 19:48:37 (+1000), David wrote:
> > On Mon, 14 Sep 2020 at 04:05, Felix Miata <mrmazda@earthlink.net> wrote:
> > > Richard Owlett composed on 2020-09-13 05:15 (UTC-0500):

> > > > Where can I find description of using installer's interactive shells on
> > > > tty1-tty4?

> > To explore and confirm and maybe learn something from
> > smarter people, I report below some actual test results:

> > I begin by booting the buster installer on real hardware,
> > and it stops at "Debian installer main menu".

[...]

> > I was unable to find any evidence for the use of /dev/tty1,
> > apart from pressing alt-F1 working as expected.

> > But I was just poking around cluelessly for curiosity, someone
> > else might know a way to do that. BusyBox 'ps' appears to not
> > provide tty information.

[...]

> > I'm not very knowledgeable about all this tty stuff so I will leave
> > it at that.

> Same here. An interesting search.

I found more answers in /etc/inittab in the installer BusyBox
environment and saved a copy of it to show here ...

$ grep tty busybox-etc-inittab
tty2::askfirst:-/bin/sh
tty3::askfirst:-/bin/sh
tty4::respawn:/usr/bin/tail -f /var/log/syslog
tty0::respawn:/sbin/debian-installer

And if I understand correctly, tty0 is "the current tty" which
for some reason must get activated as /dev/pts/0 rather
than /dev/tty1.

[toc] | [prev] | [next] | [standalone]


#226987

FromDavid <bouncingcats@gmail.com>
Date2020-09-14 20:50 +0200
Message-ID<AP1I5-5Dx-1@gated-at.bofh.it>
In reply to#226986
On Tue, 15 Sep 2020 at 04:27, David <bouncingcats@gmail.com> wrote:
> On Tue, 15 Sep 2020 at 00:10, David Wright <deblis@lionunicorn.co.uk> wrote:
> > On Mon 14 Sep 2020 at 19:48:37 (+1000), David wrote:

> > > To explore and confirm and maybe learn something from
> > > smarter people, I report below some actual test results:

[...]

Sorry for this extra message, I forgot to state that all my tests
were done in the installer text mode. It never occurs to me
to use the GUI mode.

[toc] | [prev] | [next] | [standalone]


#227007

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-09-15 18:40 +0200
Message-ID<APm9P-176-1@gated-at.bofh.it>
In reply to#226987
On Tue 15 Sep 2020 at 04:39:49 (+1000), David wrote:
> On Tue, 15 Sep 2020 at 04:27, David <bouncingcats@gmail.com> wrote:
> > On Tue, 15 Sep 2020 at 00:10, David Wright <deblis@lionunicorn.co.uk> wrote:
> > > On Mon 14 Sep 2020 at 19:48:37 (+1000), David wrote:
> 
> > > > To explore and confirm and maybe learn something from
> > > > smarter people, I report below some actual test results:
> 
> [...]
> 
> Sorry for this extra message, I forgot to state that all my tests
> were done in the installer text mode. It never occurs to me
> to use the GUI mode.

I took a look, and it's all pretty similar for tty[234] as shown with
echo 'hello tty4 hello' > /dev/tty4
and likewise. (I recommend self-identifying your echos.)

However, VC1 is used for Xorg's log, which you can scribble on with
echo 'hello tty1 hello' > /dev/tty1
and note in passing that /dev/tty0 always writes to yourself
on the ttys.

The graphical installer displays itself on what I assume is VC5,
as Xorg has /dev/tty5 open on fd=10, and Ctrl-Alt-F5 selects it
from other VCs. The installer's own process seems to communicate
through /dev/tty0 streams.

When you open a shell in the installer itself (ie through the main
menu), it uses /dev/pts/0 just as you found. You can write to this
shell from any of the other VCs by typing eg
echo 'hi pts/0 from tty2 hi' > /dev/pts/0
as one might expect.

So I don't think there's much here for the OP, who might have just
wanted someone to wax lyrical about the delights of ash.
But the thread seems to be being hijacked by DE people, though where
Felix's first post came from, I don't quite get.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#227011

FromFelix Miata <mrmazda@earthlink.net>
Date2020-09-15 20:50 +0200
Message-ID<APobD-2ik-17@gated-at.bofh.it>
In reply to#227007
David Wright composed on 2020-09-15 12:32 (UTC-0400):

> Felix's first post came from, I don't quite get.

Fallible memory. I use multiple distros, and do a lot more upgrading than new
installs. openSUSE, last I installed, a month ago, puts something on each of
tty1-12. 1 is the installer itself, initially text, later GUI. First shell is on
2, followed by logs on the next 2 or more before the next available shell. In any
installer, 2 is my goto shell, while in any running system 3 is my ordinary goto
shell, 2 is for MC, and 4 is for chrooting or an extra plain shell.
-- 
Evolution as taught in public schools, like religion,
	is based on faith, not on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

[toc] | [prev] | [next] | [standalone]


#227017

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2020-09-16 04:40 +0200
Message-ID<APvwu-6Qz-7@gated-at.bofh.it>
In reply to#227011
On Tue 15 Sep 2020 at 14:42:11 (-0400), Felix Miata wrote:
> David Wright composed on 2020-09-15 12:32 (UTC-0400):
> 
> > Felix's first post came from, I don't quite get.
> 
> Fallible memory. I use multiple distros, and do a lot more upgrading than new
> installs. openSUSE, last I installed, a month ago, puts something on each of
> tty1-12. 1 is the installer itself, initially text, later GUI. First shell is on
> 2, followed by logs on the next 2 or more before the next available shell. In any
> installer, 2 is my goto shell, while in any running system 3 is my ordinary goto
> shell, 2 is for MC, and 4 is for chrooting or an extra plain shell.

I ought to have guessed—I don't know how you keep track of so many!

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#227022

FromFelix Miata <mrmazda@earthlink.net>
Date2020-09-16 06:10 +0200
Message-ID<APwVA-7Nr-3@gated-at.bofh.it>
In reply to#227017
David Wright composed on 2020-09-15 21:38 (UTC-0500):

> I ought to have guessed—I don't know how you keep track of so many!

I have a spreadsheet for tracking several things, such as dates of last
update/upgrade, video card installed, which DE. Each disk's partition inventory is
comprised mostly of portions of the automatic logs created by the partitioner I
use, e.g.:
http://fm.no-ip.com/Tmp/Dfsee/gx27cL18.txt
-- 
Evolution as taught in public schools, like religion,
	is based on faith, not on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

[toc] | [prev] | [next] | [standalone]


#226984

FromStefan Monnier <monnier@iro.umontreal.ca>
Date2020-09-14 19:20 +0200
Message-ID<AP0iZ-4Sh-1@gated-at.bofh.it>
In reply to#226975
>> 1,3,4 are not available shells.
>> IIRC:
> That does not match my recent experience.

My recent experience is that I'm unable to predict which VC will be used
for what any more (it used to be that the GUI sessions were in F7 and
up, but nowadays it's usually F2 and up, tho on some of my machines it
seems it's still F7 and up, ... go figure), so I just try them in
sequence until I find one that seems to show me what I'm looking for.


        Stefan

[toc] | [prev] | [next] | [standalone]


#226985 — Re: Use of ^Hi^Hn^Hs^Ht^Ha^Hl^Hl^He^Hr^H'^Hs interactive shells on tty1-tty4

FromFelix Miata <mrmazda@earthlink.net>
Date2020-09-14 20:00 +0200
SubjectRe: Use of ^Hi^Hn^Hs^Ht^Ha^Hl^Hl^He^Hr^H'^Hs interactive shells on tty1-tty4
Message-ID<AP0VI-54W-3@gated-at.bofh.it>
In reply to#226984
Stefan Monnier composed on 2020-09-14 13:11 (UTC-0400):

> My recent experience is that I'm unable to predict which VC will be used
> for what any more (it used to be that the GUI sessions were in F7 and
> up, but nowadays it's usually F2 and up, tho on some of my machines it
> seems it's still F7 and up, ... go figure), so I just try them in
> sequence until I find one that seems to show me what I'm looking for.

Which DEs?

Gnome/GDM as default on Fedora led the change. KDE/SDDM did not follow GDM's lead.

On those still using 7 for the GUI, 1 has acquired one or two behavioral
differences from 2-6. I always use 2 & 3, avoiding 1, a practice inherited from my
desire to leave init text untouched unless I run out of ttys and need a sixth.
-- 
Evolution as taught in public schools, like religion,
	is based on faith, not on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web