Bug #13080
closedCannot set EFI console as primary console when using both EFI and Serial
100%
Description
If a system is booting EFI it uses the console efi
, whereas VGA uses vidconsole
. When enabling the serial console on EFI, the loader.conf contents are set as:
console="efi,comconsole"
Despite having EFI listed first, the serial console gets the full boot output and the boot menu and boot messages both indicate serial is primary:
| 5. Cons: Dual (Serial primary) | | / / / / / / |
Dual Console: Serial Primary, Video Secondary
When using a VGA console this works properly:
console="vidconsole,comconsole"
Dual Console: Video Primary, Serial Secondary
Since we appear to be configuring things properly as far as I can see, this is likely a FreeBSD bug, so this is mostly for tracking.
Updated by Jim Pingle over 2 years ago
- Subject changed from Cannot set EFI console as secondary console when using both EFI and Serial to Cannot set EFI console as primary console when using both EFI and Serial
Updated by Jim Pingle about 2 years ago
- Status changed from Needs Patch to In Progress
- Assignee set to Jim Pingle
- Target version set to 2.7.0
- Plus Target Version set to 22.11
Looks like this keys off the presence of boot_serial
in the environment now and not just the order of consoles in the list.
https://github.com/pfsense/FreeBSD-src/blob/devel-12/stand/lua/core.lua#L420
On current snapshots it works if boot_serial="YES"
is removed from loader.conf
when it should prefer EFI. That only needs to be present when it should boot only serial or when it should prefer serial.
I'm trying a couple different ways to accommodate this, will commit a fix soon.
Updated by Jim Pingle about 2 years ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Updated by Jim Pingle about 2 years ago
- Plus Target Version changed from 22.11 to 23.01
Updated by Jim Pingle about 2 years ago
- Status changed from Feedback to In Progress
This had been working but stopped at some point since I tested it last.
It still prefers serial no matter what, and boot_serial="YES"
is not present in loader.conf
so that didn't sneak back in.
Even if I disable serial console, the serial console gets the boot messages, though it does not get a menu.
Updated by Jim Pingle about 2 years ago
- Status changed from In Progress to Feedback
The EFI loader seems to be forcing boot_serial=YES when the value is unset in the loader configuration. If we explicitly set it to boot_serial=NO then the console behavior is correct. The loader menu, however, displays the incorrect string for the preferred console, but that is only cosmetic with the latest fix applied. I opted to only set this for EFI since legacy booting worked as-is and I didn't want to potentially break it there.
Updated by Jim Pingle about 2 years ago
- Status changed from Feedback to Resolved
The user-selected behavior is respected now on both EFI and legacy consoles.
The loader menu displays the wrong string but the behavior is correct as is the message printed to the console during the boot process.
Updated by Jim Pingle over 1 year ago
- Subject changed from Cannot set EFI console as primary console when using both EFI and Serial to Cannot set EFI console as primary console when using both EFI and Serial