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

Re: Allocate tty1 for kernel messages



On 2022-09-25 17:52, basti wrote:
> Am 25.09.22 um 17:25 schrieb David Wright:
>> 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/.

David, thanks for your input. I have run "dpkg-reconfigure console-setup" and rebooted and it didn't help.

> Hello,
> 
> first of all disable login on tty1:
> 
> systemctl disable getty@tty1.service

I have disabled and stopped this service:

# systemctl status getty@tty1.service
● getty@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]: getty@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?

> 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.

That will forward kernel messages to tty1, right?

-- 
With best regards,
Dmitry


Reply to: