From nobody Tue Aug 16 06:51:55 2022 X-Original-To: hackers@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 4M6MJc4Fxtz4ZfWs for ; Tue, 16 Aug 2022 06:52:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4M6MJb5SLTz3dY7 for ; Tue, 16 Aug 2022 06:51:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: (Authenticated sender: andriy.gapon@uabsd.com) by mail.gandi.net (Postfix) with ESMTPSA id 2B99FE0008 for ; Tue, 16 Aug 2022 06:51:56 +0000 (UTC) Message-ID: Date: Tue, 16 Aug 2022 09:51:55 +0300 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.12.0 Content-Language: en-US To: hackers@FreeBSD.org From: Andriy Gapon Subject: different console settings for loader[.efi] and kernel Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4M6MJb5SLTz3dY7 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 2001:4b98:dc4:8::224 is neither permitted nor denied by domain of avg@FreeBSD.org) smtp.mailfrom=avg@FreeBSD.org X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[2001:4b98:dc4:8::224:from]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:203476, ipnet:2001:4b98:dc4::/48, country:FR]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[hackers@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[avg]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; TO_DN_NONE(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N It seems that console variable in loader.conf affects both the OS/kernel and the loader itself. Is there a way to have different console settings between those? Let me explain. I have a system that I access in several different ways: via its physical serial console, via IPMI / iKVM, and sometimes via its physical video console. console is set to "comconsole, efi". The system uses EFI boot. The BIOS is configured to "redirect" video console to serial and to stop the redirection once an OS starts. The setup works fine before the loader (e.g., for entering BIOS settings) and it works fine once the kernel starts. But while in the loader, every character printed gets doubled on the serial console. I guess that this is because the loader prints it to both the serial output and the EFI output while the BIOS still redirects the EFI output to the serial. I would like to solve that double printing while keeping both the serial console and the video / EFI console usable. So, one way would be for the loader to use only the EFI console and let the BIOS redirect take care of the serial. I guess that another way would be for the loader to announce itself as an "OS" (whatever that technically means), so that the BIOS stops its redirection. Thank you. -- Andriy Gapon https://standforukraine.com https://razomforukraine.org