From nobody Tue Feb 18 11:47:18 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YxySR3f3Bz5nTZM for ; Tue, 18 Feb 2025 11:47:35 +0000 (UTC) (envelope-from tsoome@me.com) Received: from mr85p00im-ztdg06021701.me.com (mr85p00im-ztdg06021701.me.com [17.58.23.196]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4YxySQ6nxYz3Bt5 for ; Tue, 18 Feb 2025 11:47:34 +0000 (UTC) (envelope-from tsoome@me.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; bh=teqBLssvVSjSt1w+qSO3ByiWtzjoId+O65a4vvbG6kw=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:To:x-icloud-hme; b=J4lJODlZZwZNbu7o0QrzoZagYln6HQuvk8dzissvc/emxZ76uNSzKfnF2cYvFVSrB 05OYq8qesMN+Yu1wRIdY/m47rdlHft+LQo9fazuVCovlQg5vq8LgapBLGuAdzUfoKz ZELtGzA6r1dCgsqnGtZDose104Q1tv8uxbjm04qLy0msBcFZzIZ7K5W7sgJDfFNroq 9BjsHcES65IKKZTasoqGaXiOzLrMXLsR6vrlLvkd2UEteEbhCM5caZ5CXQwL4coLBi NaAtALK/b8fRUstSgts0BFD80iCd23OMhNndFWox1KuedtbMrV/QkxLd5L/JznNXA5 o0BITG/qLtm1A== Received: from smtpclient.apple (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06021701.me.com (Postfix) with ESMTPSA id D91472633385; Tue, 18 Feb 2025 11:47:31 +0000 (UTC) From: Toomas Soome Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_464AC729-5D09-44A4-A521-98650C0FC5BC" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: Quieter startup + working experience by overriding VT_CONSWINDOW (and consequences) Date: Tue, 18 Feb 2025 13:47:18 +0200 In-Reply-To: Cc: "freebsd-current@freebsd.org" To: "Steven Harms (High-Security Mail)" References: X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Proofpoint-ORIG-GUID: YhJdg-cj8fQpjFl5sOJ_kC4nibMLAvKU X-Proofpoint-GUID: YhJdg-cj8fQpjFl5sOJ_kC4nibMLAvKU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-18_04,2025-02-18_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 spamscore=0 clxscore=1011 bulkscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2502180092 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:714, ipnet:17.58.16.0/20, country:US] X-Rspamd-Queue-Id: 4YxySQ6nxYz3Bt5 X-Spamd-Bar: ---- --Apple-Mail=_464AC729-5D09-44A4-A521-98650C0FC5BC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 18. Feb 2025, at 13:31, Steven Harms (High-Security Mail) = wrote: >=20 > Greetings, >=20 > As per previous thread, I am still interested in a quieter fbsd = experience: ideally no kernel / rc output on startup and no console = messages on default TTY after login.=20 >=20 > As I was trying to see if I could extend boot_mute, I came across = another approach: >=20 > set the default console to not-zero (e.g. 4) > But then the default login prompt was also ttyv4. So I.... > Added a kernel option whereby to specify which VT the starting one = (instead of following to e.g. 4). > (supporting code to make all that work) > Pair with the status quo boot_mute, you get a remarkably quiet boot = up. Logo, black screen (as your getty session waits), prompt. >=20 > Mea Culpa: I'm waaaaayyy out of my depth on the kernel hacking piece = (just enough C to be dangerous). Consider these sketches. = https://github.com/freebsd/freebsd-src/pull/1600 >=20 > The suggestion separates "Which VT gets the console" and "Which VT is = the starting VT." These two roles are conflated and my sketch unwinds = that. Hereby one gets: >=20 > a nice quiet boot up > a default login screen whose vi session isn't interrupted (by default) = with noise from your wificard (if you're on laptop fbsd) -- = frightening/annoying to some > a dedicated live sink for console messages (versus a log file or = versus your vi session) closer to a real serial console or OSX's = console.app >=20 > Is this a better approach vs extending boot_mute's run? Or if this is = wrong-headed I'll go back to previous paths of inquiry. >=20 > Steven I personally like the approach to enable console log with boot -v, = otherwise use your syslog kern.* once userland is there and internal = message buffer for startup time before userland appears. This makes it = possible to have quick check (-v) and for normal startup, we still have = the information or in case of crash, we can check the message buffer=E2=80= =A6=20 rgds, toomas= --Apple-Mail=_464AC729-5D09-44A4-A521-98650C0FC5BC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 18. Feb 2025, at 13:31, Steven Harms = (High-Security Mail) <sgharms@stevengharms.com> wrote:

Greetings,

As per previous = thread, I am still interested in a quieter fbsd experience: ideally no = kernel / rc output on startup and no console messages on default TTY = after login. 

As I = was trying to see if I could extend boot_mute, I came across another = approach:

  1. set the = default console to not-zero (e.g. 4)
  2. But then the default login = prompt was also ttyv4. So I....
  3. Added a kernel option whereby to specify which VT the starting = one (instead of following to e.g. 4).
  4. (supporting code to make all that = work)
  5. Pair with the status quo = boot_mute, you get a remarkably quiet boot up. Logo, black screen (as = your getty session waits), prompt.

Mea Culpa: I'm waaaaayyy out of = my depth on the kernel hacking piece (just enough C to be dangerous). = Consider these sketches. https://github.com/freebsd/freebsd-src/pull/1600

The suggestion separates "Which = VT gets the console" and "Which VT is the starting VT." These two roles = are conflated and my sketch unwinds that. Hereby one = gets:

  • a = nice quiet boot up
  • a default login = screen whose vi session isn't interrupted (by default) with noise from = your wificard (if you're on laptop fbsd) -- frightening/annoying to = some
  • a dedicated live sink for = console messages (versus a log file or versus your vi session) closer to = a real serial console or OSX's console.app

Is this a better approach vs = extending boot_mute's run? Or if this is wrong-headed I'll go back to = previous paths of inquiry.

Steven

I = personally like the approach to enable console log with boot -v, = otherwise use your syslog kern.* once userland is there and internal = message buffer for  startup time before userland appears. This = makes it possible to have quick check (-v) and for normal startup, we = still have the information or in case of crash, we can check the message = buffer=E2=80=A6 

rgds,
toomas
= --Apple-Mail=_464AC729-5D09-44A4-A521-98650C0FC5BC--