From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5A380158089 for ; Sat, 9 Sep 2023 19:40:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9CB202BC033; Sat, 9 Sep 2023 19:39:57 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 639AC2BC01B for ; Sat, 9 Sep 2023 19:39:57 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qf3oC-000A7u-8N for gentoo-user@lists.gentoo.org; Sat, 09 Sep 2023 21:39:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: Serial console stops working as soon as openrc starts Date: Sat, 9 Sep 2023 19:39:51 -0000 (UTC) Message-ID: References: User-Agent: slrn/1.0.3 (Linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 50dd1c5a-6c3e-4e10-be55-529b4e034375 X-Archives-Hash: 9701b6270697bec85c414da9241677ba On 2023-09-09, Grant Edwards wrote: > I've set up a serial console by adding the following to my kernel > command line: > > console=ttyS0,115200 console=tty1 > > It works fine for the first few seconds as the kernel starts up. All > of the expected messages are sent out ttyS0. > > But, soon after init starts, the serial console stops working. That's because one of the first things openrc runs in /etc/init.d/dmesg, and it changes the kernel logging level to the value defined in /etc/conf.d/dmesg (which defaults to 1). Changing the level in /etc/conf.d/dmesg from 1 to 8 allowed the serial console to continue working as I wanted it to. [I spent an entire day trying to get serial logging to work on Ubuntu with systemd, and got exactly nowhere. After replacing Ubuntu/systemd with Gentoo/openrc it didn't take long to track down the answer in the openrc docs.]