Discussion:
Use of installer's interactive shells on tty1-tty4
(too old to reply)
Richard Owlett
2020-09-13 10:20:02 UTC
Permalink
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
Linux-Fan
2020-09-13 10:50:01 UTC
Permalink
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

[...]
David
2020-09-13 10:50:01 UTC
Permalink
Post by Richard Owlett
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.
Richard Owlett
2020-09-13 12:00:01 UTC
Permalink
Post by David
Post by Richard Owlett
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,
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.
David Wright
2020-09-13 15:40:01 UTC
Permalink
Post by Richard Owlett
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.
Felix Miata
2020-09-13 18:10:02 UTC
Permalink
Post by Richard Owlett
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/
David
2020-09-14 09:50:02 UTC
Permalink
Post by Felix Miata
Post by Richard Owlett
Where can I find description of using installer's interactive shells on
tty1-tty4?
1,3,4 are not available shells.
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.
David Wright
2020-09-14 14:20:02 UTC
Permalink
Post by David
Post by Felix Miata
Post by Richard Owlett
Where can I find description of using installer's interactive shells on
tty1-tty4?
1,3,4 are not available shells.
That does not match my recent experience.
Ditto.
Post by David
To explore and confirm and maybe learn something from
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.
Post by David
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.
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
Post by David
I'm not very knowledgeable about all this tty stuff so I will leave
it at that.
Same here. An interesting search.

Cheers,
David.
David
2020-09-14 18:30:02 UTC
Permalink
Post by David Wright
Post by David
Post by Richard Owlett
Where can I find description of using installer's interactive shells on
tty1-tty4?
To explore and confirm and maybe learn something from
I begin by booting the buster installer on real hardware,
and it stops at "Debian installer main menu".
[...]
Post by David Wright
Post by David
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.
[...]
Post by David Wright
Post by David
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.
David
2020-09-14 18:50:01 UTC
Permalink
Post by David
To explore and confirm and maybe learn something from
[...]

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.
David Wright
2020-09-15 16:40:01 UTC
Permalink
Post by David
Post by David
To explore and confirm and maybe learn something from
[...]
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.
Felix Miata
2020-09-15 18:50:01 UTC
Permalink
Post by David Wright
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/
David Wright
2020-09-16 02:40:02 UTC
Permalink
Post by Felix Miata
Post by David Wright
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.
Felix Miata
2020-09-16 04:10:02 UTC
Permalink
Post by David Wright
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/
Stefan Monnier
2020-09-14 17:20:01 UTC
Permalink
Post by David
Post by Felix Miata
1,3,4 are not available shells.
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
Felix Miata
2020-09-14 18:00:02 UTC
Permalink
Post by Stefan Monnier
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/
Loading...