21->22 upgrade - loss of serial port at 115200
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- [ X] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
- [ X] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue
Describe the bug
After a routine 21->22 upgrade; the com console on the serial port (uart0) was lost & 'stty -f' and set to 9600.
To Reproduce
Steps to reproduce the behavior:
install 21.x -- serial port functional and on 115200
upgrade to 22.x -- serial port no longer working
Expected behavior
Expected this to continue working.
Describe alternatives you considered
Adding the line:
hw.uart.console="io:0x3f8,br:115200"
to loader.conf.local does not work. Also adding the lines
hw.uart.console="io:0x3f8,br:115200"
set comconsole_speed=115200
set comconsole_port=0x3f8
set console=comconsole
works perfectly.
Well what hardware is this? And 22.x is a little inconvenient as fixes went in an the OS was upgraded from FreeBSD 12 to 13...
-
OPNSense appliance, DEC3850 (not sure of revision; about 2 years old)
-
Protectli Vault FW2B, 4port, rev.7-2020
-
non branded Fanless Mini PC Router Core I3 7167U, no revision/date known
All set in the bios to be COM1 console/fully serial; VGA/etc disabled.
For 1) there was a bug in FreeBSD 13 that didn't handle EFI serial consoles anymore. It was added in 22.1.2, but in general FreeBSD 13 requires the BIOS to disable legacy UART emulation: https://docs.opnsense.org/hardware/serial_connectivity.html
For 2) It should continue to work regardless.
For 3) I can't say, not very specific.
For 1 - that workaround works - with as caveat that on any existing OPNSense applicances coming from21 it seems that the loader.conf.local needs to be manaully removed/emptied post upgrade. Perhaps nice for release notes or as part of the update.
For 2 and 3 - no such BIOS setting - but above loader.conf.local settings make it work reliably.
that workaround works
It's not a workaround. It's a requirement in FreeBSD 13, which broke the EFI serial console in the first place.
loader.conf.local needs to be manually removed/emptied
What's done to loader.conf.local is local to the installation and of no concern to the core system.
hw.uart.console et al.
You can set that from the System: Settings: Tunables GUI if needed.
As for FreeBSD requirements regading serial console across multiple hardware that will be of further subject to change outside of our control through upstream driver changes and hardware adoption.
Cheers, Franco
Just as a note - we have experienced issues when booting systems without an attached monitor. We have written a wiki article on that and we have added links to this issue here on GitHub:
- https://www.thomas-krenn.com/en/wiki/OPNsense_does_not_boot_without_monitor (Englisch version)
- https://www.thomas-krenn.com/de/wiki/OPNsense_bootet_nicht_ohne_Monitor (German version)
Happy new year @tk-wfischer! :)
Thanks for the article. Although the bug was addressed it's still pending for FreeBSD. I'm not sure at which point it'll be officially accepted. I'll try to poke them again this year to see how much work a "proper" integration actually is.
https://reviews.freebsd.org/D34329
Cheers, Franco