Re: git: df065f699f1f - main - stand: More sensible defaults when ConOut is missing

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Mon, 26 Sep 2022 06:28:35 UTC
In message <20220924012951.D46B7BE@slippy.cwsent.com>, Cy Schubert writes:
> In message <CANCZdfp0uWFqu237+1L0zi57Z1KkXZjmuVx95Sxe7bCbGSdkeQ@mail.gmail.c
> om>
> , Warner Losh writes:
> > --000000000000f036fc05e961e571
> > On Fri, Sep 23, 2022 at 6:47 PM Cy Schubert <Cy.Schubert@cschubert.com>
> > wrote:
> >
> > > In message <7e773164-4317-ba17-1f26-1f382cf46fb3@FreeBSD.org>, John
> > > Baldwin
> > > wri
> > > tes:
> > > > On 9/23/22 2:29 PM, John Baldwin wrote:
> > > > > On 8/26/22 9:18 PM, Warner Losh wrote:
> > > > >> The branch main has been updated by imp:
> > > > >>
> > > > >> URL:
> > > https://cgit.FreeBSD.org/src/commit/?id=df065f699f1ff819bb9607c44a675
> > > > 4275ab335ed
> > > > >>
> > > > >> commit df065f699f1ff819bb9607c44a6754275ab335ed
> > > > >> Author:     Warner Losh <imp@FreeBSD.org>
> > > > >> AuthorDate: 2022-08-26 21:46:33 +0000
> > > > >> Commit:     Warner Losh <imp@FreeBSD.org>
> > > > >> CommitDate: 2022-08-27 04:17:56 +0000
> > > > >>
> > > > >>       stand: More sensible defaults when ConOut is missing
> > > > >>
> > > > >>       When ConOut is missing, we used to default to serial. Except w
> e
> > > did
> > > > it
> > > > >>       in the worst way possible by just setting the howto bits and n
> ot
> > > > >>       updating the console setting, which lead to weird behavior
> > > where we'
> > > > d
> > > > >>       get some things on the video port, others on serial.
> > > > >>
> > > > >>       Instead, set console to "efi,comconsole" for this case. Also s
> et
> > > > >>       RB_MULTIPLE always (so we get dual consoles from the kernel)
> > > and or
> > > > in
> > > > >>       RB_SERIAL when we can't find GOPs that suggest the precense of
> > > a vid
> > > > eo
> > > > >>       console. This will put output in the most places and have a
> > > sensible
> > > > >>       default for 'primary' console.
> > > > >>
> > > > >>       Sponsored by:           Netflix
> > > > >>       Reviewed by:            emaste, manu
> > > > >>       Differential Revision:  https://reviews.freebsd.org/D36299
> > > > >
> > > > > One possibly surprising result of this is that I did not get dual
> > > console
> > > > > output on my rpi after this.  (Curiously this only affected my arm64
> > > image
> > > > > but not my armv7 image.)  Loader output goes to both, but kernel
> > > output is
> > > > > only on the video console (which I don't normally use for my pi).
> > > (Also,
> > > > > none of the ANSI escape sequences used by the loader work on the pi's
> > > video
> > > > > console, so once the menu starts it just looks like raw ANSI code
> > > garbage
> > > > > until the kernel starts booting.)
> > > > >
> > > > > Not sure if this warrants UPDATING as the effect is that the serial
> > > console
> > > > > seems to stop working?  The lack of working dual console output is
> > > perhaps
> > > > > the only real bug.  Not sure what is up there.
> > > >
> > > > FWIW, using 'console="comconsole,efi"' did not work as a workaround.
> > > Same
> > > > results (used the video console only for the kernel).  Had to use
> > > > 'console="comconsole"' in /boot/loader.conf.
> > >
> > > On one of my two machines with console="comconsole,vidconsole" failed to
> > > get past loading the kernel. Booting a rescue USB disk and replacing
> > > console with "comconsole" only resolved the hang.
> > >
> > > I'm not sure why it affected one and not the other as both are identical
> > > hardware.
> > >
> >
> > This is indeed weird. Both EFI or BIOS boot?
>
> BIOS.

Turns out this was the motherboard. I replaced it with my spare of the same 
type. What clued me to suspect either the MB or CPU was a console message 
from Sept 22 containing:

Sep 22 17:46:38 bob sshd[87768]: error: PAM: Authentication error for fgit 
fromslippy^M
Sep 22 17:46:42 bob syslogd: last message repeated 2 times^M
^M
kernel trap 1 with interrupts disabled^M
kernel trap 1 with interrupts disabled^M
kernel trap 1 with interrupts disabled^M
kernel trap 1 with interrupts disabled^M
kernel trap 1 with interrupts disabled^Mÿ^M  <--- This was me hitting the 
reset switch
1  FreeBSD^M
2  FreeBSD^M
3  FreeBSD^M
4  FreeBSD^M
5  Drive 1^M

F6 PXE^M
Boot:  1 ^M

Reviewing the console logs (serial console, logs saved for a considerable 
amount of time) I see this message printed five times. Following that is 
when the trouble started.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0