Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2019 13:39:00 +0100
From:      Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= <rank1seeker@gmail.com>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Hang at stage 3 boot (Race condition?) loader
Message-ID:  <20191108133900.0000594c@gmail.com>

next in thread | raw e-mail | index | archive | help
Yo crew!

So, after upgrading from 11.1 to >=3D11.2 or >=3D12.0 boot would halt, just=
 after stage 3 loader, during kernel booting.
In my case it always halts at line:
    em0: <Intel(R) PRO/1000 Legacy Network Connection 1.1.0> port ...
This is very old SuperMicro P4SC8 board and kernel is custom(11.3).
When that happens, only hardware reset is possible.
I did debugging which included many manual reboots/resets and waiting to hi=
t enter at a targeted boot point(read further below), which is totally anno=
ying and retarded.
So I narrowed down it to MBR and behind (to BIOS).

Fix:
--
At MBR stage 1 boot in booteasy's menu, if I press enter once, very early, =
boot will succeed.
Pressing it a few seconds later, while still at above stage, will cause a h=
ang later on.
--


Will it fail or not, I can see at the beginning of stage 3 boot.
If BTX hangs for a while, just after it printed BIOS disc A, C, D, E ..., b=
oot always fails with hang at em0.
If I press enter as described, BTX will just "flash" through BIOS disc list=
 and boot will always succeed.

Boot also succeeds without my intervention if I:
    Unplug secondary SATA disk =3D> No BTX hang
    Disable em0 in BIOS =3D> BTX hangs, BUT boot succeeds anyway!


Pressing enter at stage3's menu, has no effect.
Adding '-v' to boot.config shows detailed info when it is already too late.

Boot codes (stage 1 & 2) haven't been touched since 9 or 10 REL, I think.
I didn't want to reinstall them, because if it would fix a problem, how wou=
ld I know the cause.

Additionally, I have a special bsdlabel layout. I've split / and /boot into=
 different labels, where /boot is 'a'.
I won't go into details, unless this proves to be a culprit, but then again=
, it did worked up to <=3D11.1.


Domagoj Smol=C4=8Di=C4=87



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191108133900.0000594c>