Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Allocate tty1 for kernel messages

52 views
Skip to first unread message

David Wright

unread,
Sep 25, 2022, 11:30:06 AM9/25/22
to
On Sun 25 Sep 2022 at 17:01:23 (+0200), Dmitry Katsubo wrote:
> I am trying to make a following setup on Debian bullseye:
>
> * tty1 is used to display kernel messages only
> * tty[2-5] are allocated for login
>
> I have modified /etc/default/console-setup so that it reads:
>
> ACTIVE_CONSOLES="/dev/tty[2-5]"
>
> and rebooted. What I observe is that tty1 displays kernel messages during the boot (OK) but also ends with an invitation for login on tty1 (WRONG).
>
> How can I force that tty1 is not used for login?

I think you still need to run:

# dpkg-reconfigure console-setup

to get that variable enacted. Then check that the file
/etc/console-setup/cached_setup_keyboard.sh, which AIUI
is what does the work, has been modified.

That's similar for a lot of configuration parameters
in /etc/default/.

Cheers,
David.

basti

unread,
Sep 25, 2022, 1:00:06 PM9/25/22
to


Am 25.09.22 um 17:25 schrieb David Wright:
Hello,

first of all disable login on tty1:

systemctl disable ge...@tty1.service

Then in /etc/systemd/journald.conf:
(or in one of the conf.d folders, see man journald.conf.d)

ForwardToConsole=yes
TTYPath=/dev/tty1

Will do it.

Best regards

Greg Wooledge

unread,
Sep 30, 2022, 7:50:05 PM9/30/22
to
On Sat, Oct 01, 2022 at 12:43:37AM +0200, Dmitry Katsubo wrote:
> I have disabled and stopped this service:
>
> # systemctl status ge...@tty1.service
> ● ge...@tty1.service - Getty on tty1
> Loaded: loaded (/lib/systemd/system/getty@.service; disabled; vendor preset: enabled)
> Drop-In: /etc/systemd/system/getty@.service.d
> └─noclear.conf
> Active: inactive (dead)
> Docs: man:agetty(8)
> man:systemd-getty-generator(8)
> http://0pointer.de/blog/projects/serial-console.html
>
> Sep 26 00:10:34 debian systemd[1]: Started Getty on tty1.
> Sep 26 01:20:43 debian systemd[1]: Stopping Getty on tty1...
> Sep 26 01:20:43 debian systemd[1]: ge...@tty1.service: Succeeded.
> Sep 26 01:20:43 debian systemd[1]: Stopped Getty on tty1.
>
> I believe after that the "login:" prompt should disappear from tty1, but it didn't. Should I reboot to make this setting active?

Well, text that has been written to a terminal won't magically vanish
from that terminal.

Is the login prompt actually *functional*? If you hit Enter, do you
get another one? Or does the cursor just move down?
0 new messages