Re: UEFI + SOL / COM ports = boot hang

2024-09-25 Thread Matt Simerson
The default state of this server is that FreeBSD hangs when booting off UEFI 
and the COM ports are enabled. That seems to be because console includes or 
adds "efi" by default. Under every circumstance I've tested, when console 
contains "efi", the server hangs at the same point shown in the first message.

The workaround I've found is setting:

console="comconsole"

FreeBSD assumes that COM 1 is serial, which likely fails to initialize and so 
with only that setting, the video console remains primary. When that happens, I 
get no Beastie boot menu on either console. Since the server is now bootable 
with COM ports, I can tell the kernel where to find the serial port:

# without the next 2 lines, the serial console isn't found and the video 
console remains primary
comconsole_port="0x2F8"
comconsole_speed="115200"

And now it boots, I get the Beastie menu on the serial console, and later the 
FreeBSD kernel reports:

Dual Console: Serial Primary, Video Secondary

Changing the settings in BIOS related to console redirection seem not to matter 
much at all. Pretty much any combination of settings works.

This isn't perfect. The UEFI video console is certainly nicer, and I'd prefer 
to have it be primary and serial be secondary. But I cannot include 'efi' in 
loader.conf console setting while the COM ports are enabled else FreeBSD hangs.

The contents of the EFI variable ConOut with console ports disabled:

# efivar -p -d 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut
: PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/AcpiAdr(0x80010100)

With console ports enabled and console="comconsole":

# efivar -p -d 8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut
8be4df61-93ca-11d2-aa0d-00e098032b8c-ConOut
: 
PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/Pci(0x0,0x0)/AcpiAdr(0x80010100),/PciRoot(0x0)/Pci(0x1f,0x0)/Serial(0x0)/Uart(115200,8,N,1)/UartFlowCtrl(Hardware)/VenUtf8(),/PciRoot(0x0)/Pci(0x1f,0x0)/Serial(0x1)/Uart(115200,8,N,1)/UartFlowCtrl(Hardware)/VenUtf8()

From dmesg:

EFI framebuffer information:
addr, size 0x9c00, 0x30
dimensions 1024 x 768
stride 1024
masks  0x00ff, 0xff00, 0x00ff, 0xff00

VT(efifb): resolution 1024x768
...
vgapci0:  port 0x2000-0x207f mem 
0x9c00-0x9cff,0x9d00-0x9d01 irq 16 at device 0.0 numa-domain 0 
on pci2
vgapci0: Boot video device

I was hoping that setting hw.uart.console="io:0x2f8,br:115200" in loader.conf 
would help, but the server still hangs if 'efi' is included in the console list.

Messing with hint.uart.N as suggested in https://wiki.freebsd.org/SerialConsole 
didn't help, I'm guessing that's because those settings aren't used by 
loader.efi.

Any ideas or pointers for other settings which may enable the EFI console to be 
primary while also having a serial console?

Thanks,
Matt


> On Sep 23, 2024, at 3:22 PM, Matt Simerson  wrote:
> 
> I have a Quanta D52B-1U server. When I boot it via legacy BIOS, there is no 
> issue. When I boot with UEFI and COM ports & console redirection disabled, 
> there is no issue. However, when boot UEFI and enable the COM ports and/or 
> console redirection, the server hangs at boot time right here:
> 
> Version 2.20.1276. Copyright (C) 2023 American Megatrends, Inc.BIOS Date: 
> 12/04/2023 17:24:26 Ver: 3B28.Q102 
> Consoles: EFI console
> Reading loader env vars from /efi/freebsd/loader.env
> Setting currdev to disk0p1:
> FreeBSD/amd64 EFI loader, Revision 1.1
> 
>Command line arguments: loader.efi
>Image base: 0x5e993000
>EFI version: 2.70
>EFI Firmware: American Megatrends (rev 5.14)
>Console: efi (0x2000)
>Load Path: \EFI\FREEBSD\LOADER.EFI
>Load Device: 
> PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/HD(1,GPT,F669D424-7170-11EF-83D1-A0369F6BA978,0x28,0x82000)
>BootCurrent: 
>BootOrder: [*] 0003 0006 0007 0002 0008
>BootInfo Path: 
> HD(1,GPT,F669D424-7170-11EF-83D1-A0369F6BA978,0x28,0x82000)/\EFI\FREEBSD\LOADER.EFI
> Ignoring Boot: Only one DP found
> Trying ESP: 
> PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/HD(1,GPT,F669D424-7170-11EF-83D1-A0369F6BA978,0x28,0x82000)
> Setting currdev to disk0p1:
> Trying: 
> PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/HD(2,GPT,4F537B49-7176-11EF-83D1-A0369F6BA978,0x82028,0x100)
> Setting currdev to disk0p2:
> Trying: 
> PciRoot(0x9)/Pci(0x0,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-01-30-54-9D-E4-D2-5C)/HD(3,GPT,B6D8B384-7176-11EFLoading
>  /boot/defaults/loader.conf86860)
> Loading /boot/defaults/loader.confdefault:
> Loading /boot/device.hints
> Loading /boot/loader.conf
> Loading /boot/loader.conf.local
> |
> 
> On one occasion, I left it setting there for minutes.
> 
> I currently have FreeBSD 14.1 installed and I also replicated this when 
> booting off a FreeBSD 15.0-CURRENT ISO. 
> 
> The chipset is Intel C621 & C624. Output from dmesg is here.
> 
> BIOS 

Re: September 2024 stabilization week

2024-09-25 Thread Gleb Smirnoff
On Mon, Sep 23, 2024 at 01:00:11AM -0700, Gleb Smirnoff wrote:
T> This is an automated email to inform you that the September 2024 
stabilization week
T> started with FreeBSD/main at main-n272449-6e414739fc95, which was tagged as
T> main-stabweek-2024-Sep.

The only issue discovered at Netflix testing is regression with ixl(4)
14561f1eda85 that has already been reverted with bf085659dac9.  If you run with
the main-stabweek-2024-Sep and use ixl(4) NIC you need to cherry-pick
bf085659dac9.  Other than that, no problems found.

The advisory freeze on the main branch is thawed.

-- 
Gleb Smirnoff



Re: New console output at boot?

2024-09-25 Thread Tomek CEDRO
On Wed, Sep 25, 2024 at 1:42 PM Thomas Laus  wrote:
> On 9/24/24 15:26, Warner Losh wrote:
> >
> > Thinking about it, I found a hole. If gptzfsboot picked the wrong BE
> > this could happen. And updating it might fix a bug that's causing it.
> > Knowing when your system last updated the gptzfsboot would be useful...
> >
> After getting a hint to use my cellphone camera to capture the error
> messages, the errors all indicate missing fonts in /boot/fonts.  How
> does this directory get populated when building world?  All of the fonts
> in this directory date back to July 24, 2023 and nothing newer.

Regarding the fonts I noticed that on 14.1-RELEASE AMD64 UEFI boot on
laptop I have nice looking fonts, but on desktop I have old looking
small resolution fonts.. so maybe something is on the thing with that
fonts but I did not check :-P

Also question is if serial console port can be used to catch the full
bootloader process ?

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Re: New console output at boot?

2024-09-25 Thread Ronald Klop

Van: Thomas Laus 
Datum: woensdag, 25 september 2024 15:37
Aan: freebsd-current@freebsd.org
Onderwerp: Re: New console output at boot?


On 9/25/24 08:03, Ronald Klop wrote:
> Hi,
>
> Nice work. I did the video trick also in the past with boot issues.
>
> Can you tell us what the errors are? Like what filenames are mentioned. > 
Maybe post the screenshot of the video somewhere.
>
> My /boot/fonts on raspberry pi 4 15.0-CURRENT contains.
> $ ls -l /boot/fonts/
> total 187
> -r--r--r--  1 root wheel 15355 Jul  7  2023 10x18.fnt.gz
> -r--r--r--  1 root wheel 15579 Jul  7  2023 10x20.fnt.gz
> -r--r--r--  1 root wheel 16772 Jul  7  2023 11x22.fnt.gz
> -r--r--r--  1 root wheel 17078 Jul  7  2023 12x24.fnt.gz
> -r--r--r--  1 root wheel 17158 Jul  7  2023 14x28.fnt.gz
> -r--r--r--  1 root wheel 20084 Jul  7  2023 16x32.fnt.gz
> -r--r--r--  1 root wheel  5874 Jul  7  2023 6x12.fnt.gz
> -r--r--r--  1 root wheel 12452 Jul  7  2023 8x14.fnt.gz
> -r--r--r--  1 root wheel  6472 Jul  7  2023 8x14v.fnt.gz
> -r--r--r--  1 root wheel 12604 Jul  7  2023 8x16.fnt.gz
> -r--r--r--  1 root wheel  6536 Jul  7  2023 8x16b.fnt.gz
> -r--r--r--  1 root wheel  6568 Jul  7  2023 8x16v.fnt.gz
> -r--r--r--  1 root wheel  2087 Aug 26  2023 INDEX.fonts
>
I have those exact fonts in my /boot/fonts/ that you do.  The file sizes are 
the same but my dates are all July 24, 2023.  It looks to me that either 
gptzfsboot should not look for some fonts or the buildworld process should 
install whatever gptzfsboot requires.  My cellphone video only has this visible 
for a few frames and the entire video only lasts 5 seconds after typing in my 
GELI password until the boot menu is displayed.

Tom


--
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF
 







I think it is still valuable to other developers if you could show us what the 
exact error messages are.

Ronald.


Re: New console output at boot?

2024-09-25 Thread Thomas Laus

On 9/25/24 09:37, Thomas Laus wrote:

On 9/25/24 08:03, Ronald Klop wrote:

Hi,

Nice work. I did the video trick also in the past with boot issues.

Can you tell us what the errors are? Like what filenames are 
mentioned. Maybe post the screenshot of the video somewhere.


My /boot/fonts on raspberry pi 4 15.0-CURRENT contains.
$ ls -l /boot/fonts/
total 187
-r--r--r--  1 root wheel 15355 Jul  7  2023 10x18.fnt.gz
-r--r--r--  1 root wheel 15579 Jul  7  2023 10x20.fnt.gz
-r--r--r--  1 root wheel 16772 Jul  7  2023 11x22.fnt.gz
-r--r--r--  1 root wheel 17078 Jul  7  2023 12x24.fnt.gz
-r--r--r--  1 root wheel 17158 Jul  7  2023 14x28.fnt.gz
-r--r--r--  1 root wheel 20084 Jul  7  2023 16x32.fnt.gz
-r--r--r--  1 root wheel  5874 Jul  7  2023 6x12.fnt.gz
-r--r--r--  1 root wheel 12452 Jul  7  2023 8x14.fnt.gz
-r--r--r--  1 root wheel  6472 Jul  7  2023 8x14v.fnt.gz
-r--r--r--  1 root wheel 12604 Jul  7  2023 8x16.fnt.gz
-r--r--r--  1 root wheel  6536 Jul  7  2023 8x16b.fnt.gz
-r--r--r--  1 root wheel  6568 Jul  7  2023 8x16v.fnt.gz
-r--r--r--  1 root wheel  2087 Aug 26  2023 INDEX.fonts

I have those exact fonts in my /boot/fonts/ that you do.  The file sizes 
are the same but my dates are all July 24, 2023.  It looks to me that 
either gptzfsboot should not look for some fonts or the buildworld 
process should install whatever gptzfsboot requires.  My cellphone video 
only has this visible for a few frames and the entire video only lasts 5 
seconds after typing in my GELI password until the boot menu is displayed.



Looking at the video again, I see gptzfsboot looking for most of these 
these same files without the .gz extension.


Tom

--
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF



Re: New console output at boot?

2024-09-25 Thread Ronald Klop

Hi,

Nice work. I did the video trick also in the past with boot issues.

Can you tell us what the errors are? Like what filenames are mentioned. Maybe 
post the screenshot of the video somewhere.

My /boot/fonts on raspberry pi 4 15.0-CURRENT contains.
$ ls -l /boot/fonts/
total 187
-r--r--r--  1 root wheel 15355 Jul  7  2023 10x18.fnt.gz
-r--r--r--  1 root wheel 15579 Jul  7  2023 10x20.fnt.gz
-r--r--r--  1 root wheel 16772 Jul  7  2023 11x22.fnt.gz
-r--r--r--  1 root wheel 17078 Jul  7  2023 12x24.fnt.gz
-r--r--r--  1 root wheel 17158 Jul  7  2023 14x28.fnt.gz
-r--r--r--  1 root wheel 20084 Jul  7  2023 16x32.fnt.gz
-r--r--r--  1 root wheel  5874 Jul  7  2023 6x12.fnt.gz
-r--r--r--  1 root wheel 12452 Jul  7  2023 8x14.fnt.gz
-r--r--r--  1 root wheel  6472 Jul  7  2023 8x14v.fnt.gz
-r--r--r--  1 root wheel 12604 Jul  7  2023 8x16.fnt.gz
-r--r--r--  1 root wheel  6536 Jul  7  2023 8x16b.fnt.gz
-r--r--r--  1 root wheel  6568 Jul  7  2023 8x16v.fnt.gz
-r--r--r--  1 root wheel  2087 Aug 26  2023 INDEX.fonts

An RPI3 running 14.1-RELEASE has the same filenames with the same sizes but 
with a date of May 2022. I didn't compare the content of the files.
I'm not sure how they end up in that directory.

In the FreeBSD sources I could only find share/syscons/fonts which contains 
some *.fnt files. I don't know if these are the same files as in /boot/fonts.

Regards,
Ronald.


Van: Thomas Laus 
Datum: woensdag, 25 september 2024 13:42
Aan: freebsd-current@freebsd.org
Onderwerp: Re: New console output at boot?


On 9/24/24 15:26, Warner Losh wrote:
>
> Thinking about it, I found a hole. If gptzfsboot picked the wrong BE > this 
could happen. And updating it might fix a bug that's causing it. > Knowing when your 
system last updated the gptzfsboot would be useful...
>
After getting a hint to use my cellphone camera to capture the error messages, 
the errors all indicate missing fonts in /boot/fonts.  How does this directory 
get populated when building world?  All of the fonts in this directory date 
back to July 24, 2023 and nothing newer.

Tom

--
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF
 








Re: install error during installworld

2024-09-25 Thread Dimitry Andric
On 25 Sep 2024, at 12:32, Gordon Bergling  wrote:
> 
> I have a few Hyper-V based virtual machines, one acts as a build machine
> and one as -CURRENT development machine / environment.
> 
> The host crashed while I was executing an installworld installkernel make
> target.
> 
> When trying to resume the installworld part I get the following error
> message since then:
> ---
> make: "/storage/freebsd/src/current/share/mk/bsd.linker.mk" line 95: warning:
> Unknown linker from LD=ld: , defaulting to bfd
> find: : No such file or directory

This is not good, my guess is that your linker was not found, therefore
it printed something like "ld: not found" which then ended up being set
in the LD make variable. Then bsd.linker.mk concludes that "ld:" is not
a valid linker.

Does /usr/bin/ld exist? Or /usr/local/bin/ld?



> make[1]: warning: /storage/freebsd/src/current/: Read-only file system.
> make[1]: 
> "/build/storage/freebsd/src/current/amd64.amd64/toolchain-metadata.mk"
> line 1: Using cached toolchain metadata from build at bastion.ttyv0.de on Wed 
> Sep 25 12:20:39 CEST 2024

What is the contents of
/build/storage/freebsd/src/current/amd64.amd64/toolchain-metadata.mk ?

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: New console output at boot?

2024-09-25 Thread Thomas Laus

On 9/24/24 15:26, Warner Losh wrote:


Thinking about it, I found a hole. If gptzfsboot picked the wrong BE 
this could happen. And updating it might fix a bug that's causing it. 
Knowing when your system last updated the gptzfsboot would be useful...


After getting a hint to use my cellphone camera to capture the error 
messages, the errors all indicate missing fonts in /boot/fonts.  How 
does this directory get populated when building world?  All of the fonts 
in this directory date back to July 24, 2023 and nothing newer.


Tom

--
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF



Re: New console output at boot?

2024-09-25 Thread Thomas Laus

On 9/25/24 08:03, Ronald Klop wrote:

Hi,

Nice work. I did the video trick also in the past with boot issues.

Can you tell us what the errors are? Like what filenames are mentioned. 
Maybe post the screenshot of the video somewhere.


My /boot/fonts on raspberry pi 4 15.0-CURRENT contains.
$ ls -l /boot/fonts/
total 187
-r--r--r--  1 root wheel 15355 Jul  7  2023 10x18.fnt.gz
-r--r--r--  1 root wheel 15579 Jul  7  2023 10x20.fnt.gz
-r--r--r--  1 root wheel 16772 Jul  7  2023 11x22.fnt.gz
-r--r--r--  1 root wheel 17078 Jul  7  2023 12x24.fnt.gz
-r--r--r--  1 root wheel 17158 Jul  7  2023 14x28.fnt.gz
-r--r--r--  1 root wheel 20084 Jul  7  2023 16x32.fnt.gz
-r--r--r--  1 root wheel  5874 Jul  7  2023 6x12.fnt.gz
-r--r--r--  1 root wheel 12452 Jul  7  2023 8x14.fnt.gz
-r--r--r--  1 root wheel  6472 Jul  7  2023 8x14v.fnt.gz
-r--r--r--  1 root wheel 12604 Jul  7  2023 8x16.fnt.gz
-r--r--r--  1 root wheel  6536 Jul  7  2023 8x16b.fnt.gz
-r--r--r--  1 root wheel  6568 Jul  7  2023 8x16v.fnt.gz
-r--r--r--  1 root wheel  2087 Aug 26  2023 INDEX.fonts

I have those exact fonts in my /boot/fonts/ that you do.  The file sizes 
are the same but my dates are all July 24, 2023.  It looks to me that 
either gptzfsboot should not look for some fonts or the buildworld 
process should install whatever gptzfsboot requires.  My cellphone video 
only has this visible for a few frames and the entire video only lasts 5 
seconds after typing in my GELI password until the boot menu is displayed.


Tom


--
Public Keys:
PGP KeyID = 0x5F22FDC1
GnuPG KeyID = 0x620836CF



install error during installworld

2024-09-25 Thread Gordon Bergling
Hi,

I have a few Hyper-V based virtual machines, one acts as a build machine
and one as -CURRENT development machine / environment.

The host crashed while I was executing an installworld installkernel make
target.

When trying to resume the installworld part I get the following error
message since then:
---
make: "/storage/freebsd/src/current/share/mk/bsd.linker.mk" line 95: warning:
Unknown linker from LD=ld: , defaulting to bfd
find: : No such file or directory
make[1]: warning: /storage/freebsd/src/current/: Read-only file system.
make[1]: "/build/storage/freebsd/src/current/amd64.amd64/toolchain-metadata.mk"
line 1: Using cached toolchain metadata from build at bastion.ttyv0.de on Wed 
Sep 25 12:20:39 CEST 2024
--
>>> Install check world started on Wed Sep 25 10:26:40 UTC 2024
--
usage: mkdir [-pv] [-m mode] directory_name ...
--- installworld ---
*** [installworld] Error code 64

make[1]: stopped making "installworld" in /storage/freebsd/src/current
make[1]: 1 error

make[1]: stopped making "installworld" in /storage/freebsd/src/current
--- installworld ---

make: stopped making "installworld" in /storage/freebsd/src/current

---

I deleted the obj directory and did a fresh build, but the error persists. 
Somewhat
the development VM seems to be corrupt.

Has any one an idea how to solve this problem?

Any help is much appreciated.

--Gordon


signature.asc
Description: PGP signature