Project

General

Profile

Actions

Bug #4464

closed

Config restore forces serial console to be enabled

Added by Andrew Stuart about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Backup / Restore
Target version:
Start date:
02/23/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.2
Affected Architecture:

Description

during the upgrade to 2.2 " Enables the first serial port with 115200/8/N/1 by default, or another speed selectable below." gets checked automagically and at least on my C2758 causes the VGA port to get corruption / lose display. I am not sure if this is because of the IPMI, as other consumer level boards didn't seem to have this problem, or if it's because they had no serial ports / none enabled in bios, so it was just ignored.

Actions #1

Updated by Paul K about 9 years ago

I had this issue as well, but I don't think this is an issue with 2.2. This was most likely an issue with previous releases. My 2.1.5 config file before upgrade to 2.2 looked like this:

        <disableconsolemenu/>
        <serialspeed>9600</serialspeed>
        <primaryconsole>serial</primaryconsole>

Even though primary console was set to serial, I was using it only via VGA and everything was working fine.
After upgrade to 2.2 I was no longer seeing boot messages on VGA. Once I set primaryconsole to video everything starter working just like before. I might have had to un-check 'Serial Terminal' check box after upgrading to 2.2 as well, not 100% sure about it.

Actions #2

Updated by Chris Buechler about 9 years ago

  • Status changed from New to Feedback
  • Target version deleted (2.2.1)

the C2758s we sell display VGA fine regardless of primaryconsole configuration. A good chunk of the boot process, from mounting root through the start of the console menu, only displays on the serial port if it's the primary. Everything else shows up on serial and VGA.

The configuration for primary console, serial speed, etc. are not touched by config upgrade.

:~/gitroot/pfsense/etc/inc$ grep console upgrade_config.inc 
:~/gitroot/pfsense/etc/inc$ grep serial upgrade_config.inc 
:~/gitroot/pfsense/etc/inc$ 

What Paul described sounds like a situation where the serial console wasn't actually enabled for some reason on 2.1.x, though it was configured as such (no idea how that could happen, that config has been widely-tested on every release, but hardware-specific edge cases are always possible). Then upon upgrade to 2.2, it did what it was actually configured to do.

I don't think there is any bug here. The subject as described definitely isn't true.

Actions #3

Updated by Paul K about 9 years ago

I cloned my firewall from v2.1.5 snapshot and performed an update to v2.2 again to try and reproduce this issue, but everything worked as expected. Then I remembered that I did config restore after upgrade to 2.2. So I backup settings, restore them and sure enough 'Serial Terminal' checkbox is checked after restore even though it was unchecked before.

Turns out that this is very easy to reproduce. No matter what your settings are if you perform a restore 'Serial Terminal' will become checked. This bit of code in diag_backup.php seems to be responsible for it:

                                    $loaderconf = file_get_contents("/boot/loader.conf");
                                    if (strpos($loaderconf, "comconsole")) {
                                        $config['system']['enableserial'] = true;
                                        write_config("Restore serial console enabling in configuration.");
                                    }

/boot/loader.conf always has line:

comconsole_speed="115200" 

so restore code always ends up enabling 'Serial Terminal'.

Now the strange thing is that pfSense I have running on ESXi with settings:

Serial Terminal: checked
Primary Console: Serial Console

does not display init system messages during boot, only kernel messages, but different pfSense running with the same settings on VMware Workstation does display init settings. Go figure!

Andrew - can you confirm if you performed config restore after upgrading to 2.2.

Actions #4

Updated by Chris Buechler about 9 years ago

  • Subject changed from 2.15 -> 2.2 Upgrade forces Serial console in Advanced -> Admin Access to Config restore forces serial console to be enabled
  • Category changed from Configuration Upgrade to Backup / Restore
  • Target version set to 2.2.1

thanks Paul, I fixed that to match more specifically so it doesn't catch comconsole_speed.

Actions #5

Updated by Paul K about 9 years ago

Working fine now. Thanks Chris.

Actions #6

Updated by Chris Buechler about 9 years ago

  • Status changed from Feedback to Resolved

fixed

Actions

Also available in: Atom PDF