No login prompt or interactive terminal is presented for serial editions of opnsense 25.1
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
No login prompt or interactive terminal is presented for serial editions of opnsense 25.1, leaving users unable to manage their system via serial port connections.
Serial console worked on the last version of 24.7
I've demonstrated this on version 25.1 running on a protectli FW6Br2. This occurred after updating to 25.1 from the console and after running 25.1 on a USB live disk. This feature began working again after I rolled back to opnsense 24.7
Startup information is output to the serial console after starting opnsense on 25.1, however near the end of boot it will stop printing to the serial console and no longer respond to keyboard inputs.
To Reproduce
Steps to reproduce the behavior:
- Boot opnsense 25.1 serial edition while connected via serial connection, either using a live disk or an installed version
- Observe that when boot is complete no login prompt is presented, and keyboard input produce no change in the console
Expected behavior
A login prompt should appear on the serial console after opnsense finishes booting.
Describe alternatives you considered
The only workaround is to manage opnsense from a different interface, either VGA console or web
Relevant log files
Not sure which files to provide here, will update if I find helpful logs, or if someone requests specific files.
Additional context
Serial connection on windows through putty
Environment
opnsense 25.1 protectli FW6Br2 Intel i3-8130U coreboot (Open Source) BIOS 120 GB msata SSD Crucial DDR4-3200 8 GB
Link to opnsense forum discussing additional occurrences of this issue: https://forum.opnsense.org/index.php?topic=45568.0
For one I would recommend asking the manufacturer about serial support in FreeBSD 14.2 first as they should have the relevant insights. It looks like a FreeBSD default change from what I can tell. Serial in general works as QA showed us.
Cheers, Franco
Not sure I'd say it's working in general.
My DEC2752 seems to be having USB console issues with opnsense 25.1 connected to my console server. It's dropping characters and pretty unusable.
This was flawless on previous 24.7.
Will check console server for errors.
Wonder if this error in dmesg is relevant?
uart2: <16x50 with 256 byte FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 on acpi0
ns8250: UART FCR is broken
uart2: console (115384,n,8,1)
I'm not sure an unrelated hardware to the OP proves/disproves the general point made here.
The bigger question: is it still "flawless" on 24.7? Does the 25.1 installer have issues? I'm assuming we're talking about an online upgrade.
Cheers, Franco
Agreed; it really proves nothing, just a data point.
I would have to roll back to 24.7 to demonstrate its functionality ....
This is post-upgrade. The rest of the upgrade went well.
In the meanwhile, I'll keep my eyes and ears open to see what else we can correlate.
Of note is https://forum.opnsense.org/index.php?topic=45568.msg228105#msg228105 but I suspect this is specifically for APU devices.
Well there are two kinds of breakage - comconsole stops working during boot with "legacy" devices - which can be solved with the device hints at the linked thread (avoiding non-working ACPI detection); and then there's the intermittent / misbehaving serial console described here https://github.com/opnsense/src/issues/236#issuecomment-2635746444 - I don't have any workaround/ solution for that.
Both are caused by FreeBSD kernel changes AFAICT.
After using the hints referenced in the forum thread I am able to run opnsense 25.1, but am having similar issues with my serial console as this comment, but only during the early stages of the boot, such as when displaying the opnsense menu for advanced boot options. This only happens when booting from my devices internal storage, and not when booting from a live USB, though the live USB won't print the interactive console prompts, only the output from boot.
It would be ideal if there was a workaround to make booting from a live USB work as well, though I'm not yet familiar enough with opnsense to have figured it out.
Alright, to clarify my issue, I was actually seeing every character duplicated, which I realized was because I had enabled both serial and VGA console access on my system. By disabling VGA console and leaving only serial console I was able to resolve that issue.
Additionally when booting from a live disk you can press space bar to stop the automatic sequence and the press escape to get to the command menu, where you can then use the "show" and "set" commands to set the device hints needed to make FreeBSD use ISA serial ports instead of ACPI.
Wonder if this error in dmesg is relevant?
uart2: <16x50 with 256 byte FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 on acpi0 ns8250: UART FCR is broken uart2: console (115384,n,8,1)
I hate to reply to myself, but ... seems I missed something.
Look at the baud rate in the dmesg output above. 115384?
I checked /boot/loader.conf on my DEC2752:
root@dmurphy-gw:/boot # cat loader.conf|grep 115
comconsole_speed="115200"
I don't know enough FreeBSD to identify where that 115384 baud rate came from, but could that be related? I don't have an older log to compare to from 24.7...
@dmurphynj
The number does look a bit suspicious, but the question is if it's really configuring the port to 115384 or it's just some weird optical issue.
If you connect the machine to a pc instead of the console server, does it function normal? (by the way, which type of server are you using)
There don't seem to be a lot of changes in the area, most notable seems to be (but that was already in 24.7.x if I'm not mistaken):
https://github.com/opnsense/src/commit/4722ceb7d53e76507c76e053caab6b6f7b24ecef#diff-4c502b787a957b56a78cbd732b36d2ba2bd8fda5f50c317c7f119ba5f5057998
ok, my best guess is the wrong uart type is detected now, previous version:
uart0: <8250 or 16450 or compatible> port 0x3f8-0x3ff irq 3 flags 0x10 on acpi0
current version:
uart2: <16x50 with 256 byte FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 on acpi0
Could be https://github.com/opnsense/src/commit/75861a57b6fd721e47c8a7cb43c4882c200cca1d, but not sure.
EDIT: the uart0 is only displayed in legacy mode, I had an old device over here which had different bios settings (which has it's own issues by the way). Retesting shows the same results on 24.7 and 25.1.
reverting https://github.com/opnsense/src/commit/75861a57b6fd721e47c8a7cb43c4882c200cca1d doesn't make a difference in terms of what it detects on my end.
ok, my best guess is the wrong uart type is detected now, previous version:
uart0: <8250 or 16450 or compatible> port 0x3f8-0x3ff irq 3 flags 0x10 on acpi0current version:
uart2: <16x50 with 256 byte FIFO> iomem 0xfedc9000-0xfedc9fff,0xfedc7000-0xfedc7fff irq 3 on acpi0Could be 75861a5, but not sure.
My apologies, but it's looking like that baud rate is a red herring.
I was able to find a mini-USB-to-USB-C cable and attach my MacBook directly to the DEC. Working absolutely fine there.
The incompatibility seems to be with the console server in the rack - it's an OpenGear ACM7004-2. I'm going to work a ticket with OpenGear to see what's going on there. I'm wondering if this is a USB driver issue on their end; maybe it enumerates differently somehow with the new software. Just not sure.
If it works with the Mac, it should work with the console server.
Being honest, I wish the Netboards had a traditional RJ45 console port instead of USB, but I understand keeping the complexity down.
@dmurphynj no problem, we double checked to be sure on our side. The baudrate has something to do with internal clock apparently as this was the same in old versions. Both 24.7 and 25.1 show the same output on our end during boot when using the same bios settings (the correct ones as legacy has challenges of it's own).
This was fixed in 25.1.6 by reverting an upstream change in FreeBSD 14.2. 25.7 images will behave the same as 24.7 again then. For details see 52bb0884e629f6