Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Dec 2024 10:51:59 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Daniel Braniss <danny@cs.huji.ac.il>
Cc:        Robert Schulze <rs@bytecamp.net>, stable@freebsd.org
Subject:   Re: not working /dev/console
Message-ID:  <CANCZdfpTCFdY4Ed5dC6JNw=mrZN3Whc0O9AaQ%2B8WOH6eg7Vr9A@mail.gmail.com>
In-Reply-To: <3B9CAA77-1272-4388-95D5-FBE0D78C6EC0@cs.huji.ac.il>
References:  <DBE9ABDF-092F-4198-9E14-DF2E0AAB3638@cs.huji.ac.il> <27224122-3f36-4e88-87b4-c4cfc0a6b7d8@bytecamp.net> <CANCZdfrs=2mw3pcqG_is8zeLZ07cPropcVab96tGU1Y%2BgycjqQ@mail.gmail.com> <3B9CAA77-1272-4388-95D5-FBE0D78C6EC0@cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000042182f0628c5e8c8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 29, 2024 at 12:20=E2=80=AFAM Daniel Braniss <danny@cs.huji.ac.i=
l> wrote:

>
>
> On 27 Nov 2024, at 18:44, Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Wed, Nov 27, 2024 at 3:59=E2=80=AFAM 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=E2=80=99s output, which I assume u=
ses
>> /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=3D"yes"
>> comconsole_port=3D"0x2f8"
>>
>> hint.uart.0.flags=3D"0x0"
>> hint.uart.1.flags=3D"0x10"
>> hint.uart.1.baud=3D"115200"
>> --
>>
>> hint.uart.N.flags=3D"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=3Dyes 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 tha=
t
> 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=3Dcomconsole,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=3D0x10
>

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


> hw.uart.console=3D=E2=80=9Cio:760,br:115200=E2=80=9D
> boot_serial=3D=E2=80=9CYES=E2=80=9D
> console=3D=E2=80=9Cefi,comconsole=E2=80=9D
> comconsole_port=3D=E2=80=9C0xf8=E2=80=9D
>

The last two lines should properly be just console=3Defi. 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 doe=
s
> the trick
> thanks
> danny
> PS: hw.uart.console: I can=E2=80=99t pass it as argument via DHCP which i=
s 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
>
>
>

--00000000000042182f0628c5e8c8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g=
mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 29,=
 2024 at 12:20=E2=80=AFAM Daniel Braniss &lt;<a href=3D"mailto:danny@cs.huj=
i.ac.il">danny@cs.huji.ac.il</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204=
,204,204);padding-left:1ex"><div style=3D"overflow-wrap: break-word;"><br><=
div><br><blockquote type=3D"cite"><div>On 27 Nov 2024, at 18:44, Warner Los=
h &lt;<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank">imp@bsdimp.com</a=
>&gt; wrote:</div><br><div><br><br style=3D"font-family:Helvetica;font-size=
:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spa=
cing:normal;text-align:start;text-indent:0px;text-transform:none;white-spac=
e:normal;word-spacing:0px;text-decoration:none"><div class=3D"gmail_quote" =
style=3D"font-family:Helvetica;font-size:16px;font-style:normal;font-varian=
t-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-i=
ndent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-deco=
ration:none"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 27, 2024 at =
3:59=E2=80=AFAM Robert Schulze &lt;<a href=3D"mailto:rs@bytecamp.net" targe=
t=3D"_blank">rs@bytecamp.net</a>&gt; wrote:<br></div><blockquote class=3D"g=
mail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204=
,204,204);padding-left:1ex">Hello,<br><br>Am 27.11.24 um 09:34 schrieb Dani=
el Braniss:<br>&gt; Hi,<br>&gt; when the console is not uart0, init=E2=80=
=99s output, which I assume uses /dev/console<br>&gt; is lost. Boot, kernel=
 and login work ok, also debugger.<br><br>you can give the loader a hint, w=
hich uart is considered a console.<br>In my case, any IPMI-console on uart1=
 works with the following settings<span>=C2=A0</span><br>in /boot/loader.co=
nf:<br><br>--<br>boot_multicons=3D&quot;yes&quot;<br>comconsole_port=3D&quo=
t;0x2f8&quot;<br><br>hint.uart.0.flags=3D&quot;0x0&quot;<br>hint.uart.1.fla=
gs=3D&quot;0x10&quot;<br>hint.uart.1.baud=3D&quot;115200&quot;<br>--<br><br=
>hint.uart.N.flags=3D&quot;0x10&quot; means: this is a potential system con=
sole.<br>See uart(4) manpage for this.<br></blockquote><div><br></div><div>=
hw.uart.console is preferred over the flags. In fact, nobody should be sett=
ing</div><div>the flags at all. I should remove them from the man page, or =
burry them</div><div>in a footnote somewhere.</div><div><br></div><div>So b=
oot_mulitcons w/o boot_serial=3Dyes will mean that video is the</div><div>p=
rimary console and serial the secondary, and /etc/rc only runs on</div><div=
>the primary console.</div><div><br></div><div>Warner</div></div></div></bl=
ockquote><div><br></div>hi Warner:</div><div>first some facts:</div><div>my=
 problems are with old dell PowerEdge r720, r320</div><div>which have old b=
ios 2020/2019</div><div>both have COM2 as boot/serial redirect - tried sett=
ing it to COM1 but that was even worse</div><div>running diskless FreeBSD 1=
4.2</div><div><br></div><div>so after much trial and mostly errors,</div><d=
iv><span style=3D"white-space:pre-wrap">	</span>- the initial messages from=
 boot (loader.efi) is garbled - each character appears twice</div></div></b=
lockquote><div><br></div><div>don&#39;t set console=3Dcomconsole,efi. Pick =
one. If you just used efi, there&#39;d only be one</div><div>character outp=
ut.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
><div style=3D"overflow-wrap: break-word;"><div><span style=3D"white-space:=
pre-wrap">	</span>- once kernel takes over all is ok, including init(8) out=
put</div><div>at the moment this works with:</div><div><span style=3D"white=
-space:pre-wrap">	</span>hint.uart.1.flags=3D0x10</div></div></blockquote><=
div><br></div><div>Drop this line. It&#39;s ignored when hw.uart.console is=
 set and can only cause confusion.</div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div style=3D"overflow-wrap: break-word;">=
<div><span style=3D"white-space:pre-wrap">	</span>hw.uart.console=3D<font c=
olor=3D"#000000"><span>=E2=80=9Cio:760,br:115200=E2=80=9D</span></font></di=
v><div><font color=3D"#000000"><span style=3D"white-space:pre-wrap">	</span=
>boot_serial=3D=E2=80=9CYES<span>=E2=80=9D</span></font></div><div><font co=
lor=3D"#000000"><span style=3D"white-space:pre-wrap">	</span>console=3D=E2=
=80=9Cefi,comconsole<span>=E2=80=9D</span></font></div><div><font color=3D"=
#000000"><span style=3D"white-space:pre-wrap">	</span>comconsole_port=3D=E2=
=80=9C0xf8<span>=E2=80=9D</span></font></div></div></blockquote><div><br></=
div><div>The last two lines should properly be just console=3Defi. If the B=
IOS redirects, then you don&#39;t need comconsole. That&#39;s only for situ=
ations where the console doesn&#39;t redirect.</div><div>And is the 0xf8 a =
typo for something? There&#39;s no serial port there..</div><div>=C2=A0</di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex"><div style=3D"overflow-=
wrap: break-word;"><div><font color=3D"#000000">need more time (and patienc=
e) to check which combination of the above does the trick</font></div><div>=
<font color=3D"#000000">thanks</font></div><div><font color=3D"#000000"><sp=
an style=3D"white-space:pre-wrap">	</span><span>danny</span></font></div><d=
iv><font color=3D"#000000">PS:=C2=A0hw.uart.console: I can=E2=80=99t pass i=
t as argument via DHCP which is a pity - most of others are ok</font></div>=
</div></blockquote><div><br></div><div>Why not? If you can pass the others,=
 you can pass it. We should be decoding the normal DHCP option that sets th=
is, if not, then we need to debug it.</div><div><br></div><div>Warner</div>=
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px =
0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div sty=
le=3D"overflow-wrap: break-word;"><div><blockquote type=3D"cite"><div><div =
class=3D"gmail_quote" style=3D"font-family:Helvetica;font-size:16px;font-st=
yle:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;t=
ext-align:start;text-indent:0px;text-transform:none;white-space:normal;word=
-spacing:0px;text-decoration:none"><div><br></div><div>=C2=A0</div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px=
 solid rgb(204,204,204);padding-left:1ex">regards,<br>Robert Schulze</block=
quote></div></div></blockquote></div><br></div></blockquote></div></div>

--00000000000042182f0628c5e8c8--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpTCFdY4Ed5dC6JNw=mrZN3Whc0O9AaQ%2B8WOH6eg7Vr9A>