Re: not working /dev/console

From: Warner Losh <imp_at_bsdimp.com>
Date: Sun, 08 Dec 2024 17:51:59 UTC
On Fri, Nov 29, 2024 at 12:20 AM Daniel Braniss <danny@cs.huji.ac.il> wrote:

>
>
> On 27 Nov 2024, at 18:44, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Wed, Nov 27, 2024 at 3:59 AM Robert Schulze <rs@bytecamp.net> wrote:
>
>> Hello,
>>
>> Am 27.11.24 um 09:34 schrieb Daniel Braniss:
>> > Hi,
>> > when the console is not uart0, init’s output, which I assume uses
>> /dev/console
>> > is lost. Boot, kernel and login work ok, also debugger.
>>
>> you can give the loader a hint, which uart is considered a console.
>> In my case, any IPMI-console on uart1 works with the following settings
>> in /boot/loader.conf:
>>
>> --
>> boot_multicons="yes"
>> comconsole_port="0x2f8"
>>
>> hint.uart.0.flags="0x0"
>> hint.uart.1.flags="0x10"
>> hint.uart.1.baud="115200"
>> --
>>
>> hint.uart.N.flags="0x10" means: this is a potential system console.
>> See uart(4) manpage for this.
>>
>
> hw.uart.console is preferred over the flags. In fact, nobody should be
> setting
> the flags at all. I should remove them from the man page, or burry them
> in a footnote somewhere.
>
> So boot_mulitcons w/o boot_serial=yes will mean that video is the
> primary console and serial the secondary, and /etc/rc only runs on
> the primary console.
>
> Warner
>
>
> hi Warner:
> first some facts:
> my problems are with old dell PowerEdge r720, r320
> which have old bios 2020/2019
> both have COM2 as boot/serial redirect - tried setting it to COM1 but that
> was even worse
> running diskless FreeBSD 14.2
>
> so after much trial and mostly errors,
> - the initial messages from boot (loader.efi) is garbled - each character
> appears twice
>

don't set console=comconsole,efi. Pick one. If you just used efi, there'd
only be one
character output.


> - once kernel takes over all is ok, including init(8) output
> at the moment this works with:
> hint.uart.1.flags=0x10
>

Drop this line. It's ignored when hw.uart.console is set and can only cause
confusion.


> hw.uart.console=“io:760,br:115200”
> boot_serial=“YES”
> console=“efi,comconsole”
> comconsole_port=“0xf8”
>

The last two lines should properly be just console=efi. If the BIOS
redirects, then you don't need comconsole. That's only for situations where
the console doesn't redirect.
And is the 0xf8 a typo for something? There's no serial port there..


> need more time (and patience) to check which combination of the above does
> the trick
> thanks
> danny
> PS: hw.uart.console: I can’t pass it as argument via DHCP which is a pity
> - most of others are ok
>

Why not? If you can pass the others, you can pass it. We should be decoding
the normal DHCP option that sets this, if not, then we need to debug it.

Warner


>
>
>
>> regards,
>> Robert Schulze
>
>
>