Project

General

Profile

Actions

Bug #13080

closed

Cannot set EFI console as primary console when using both EFI and Serial

Added by Jim Pingle 8 months ago. Updated 27 days ago.

Status:
Resolved
Priority:
Very Low
Assignee:
Category:
FreeBSD
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Default
Affected Version:
Affected Architecture:

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.

Actions #1

Updated by Jim Pingle 8 months 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
Actions #3

Updated by Jim Pingle 3 months 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.

Actions #4

Updated by Jim Pingle 3 months ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Jim Pingle about 2 months ago

  • Plus Target Version changed from 22.11 to 23.01
Actions #6

Updated by Jim Pingle 29 days 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.

Actions #7

Updated by Jim Pingle 28 days 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.

b51ea4817e9201d3665081255b5ce1d125bd16ea

Actions #8

Updated by Jim Pingle 27 days 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.

Actions

Also available in: Atom PDF