OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • booting without a serial or vga console
« previous next »
  • Print
Pages: 1 [2]

Author Topic: booting without a serial or vga console  (Read 9316 times)

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 10328
  • Karma: 807
    • View Profile
Re: booting without a serial or vga console
« Reply #15 on: November 26, 2016, 09:34:30 am »
Thanks for finding this. I added "nullconsole" support to the GUI:

https://github.com/opnsense/core/commit/f00d4309
https://github.com/opnsense/core/commit/d596905

You can apply this on top of 16.7.9 for testing using:

# opnsense-patch f00d4309 d596905

My VM did not adhere to setting the console to mute, however. I will have to try with a hardware device when I'm back home.

I double-checked the 11.0 (17.1) and 10.3 (16.7) code: there is no mention of "NULLCONSOLE", "nullconsole" is the intended value, but maybe it hasn't worked for a while and nobody used it. *shrugs*


Cheers,
Franco
Logged

s4rs

  • Jr. Member
  • **
  • Posts: 82
  • Karma: 3
    • View Profile
Re: booting without a serial or vga console
« Reply #16 on: November 26, 2016, 01:02:23 pm »
In Freebsd 10.x it has to be nullconsole. Even though it didn't seem to work the loader complained if it was NULLCONSOLE. However it only worked as NULLCONSOLE in 11.0 which kind of makes sense since all the 11.x variables in loader.conf are upper case. .. In 11.x I never got an error with nullconsole but it also didn't work. Can you make a patch for 17 and I will test it? I'll let you know how I make out with the 16 patch.
Logged

s4rs

  • Jr. Member
  • **
  • Posts: 82
  • Karma: 3
    • View Profile
Re: booting without a serial or vga console
« Reply #17 on: November 26, 2016, 01:14:56 pm »
stupid question, where do I get the patch? I looked at the download site but only see the full installers.
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2439
  • Karma: 171
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: booting without a serial or vga console
« Reply #18 on: November 26, 2016, 01:20:41 pm »
a patch is a diff in git from the public git repository github.com/opnsense/core and it can be downloaded and applied using the opnsense-patch utility.
Logged

s4rs

  • Jr. Member
  • **
  • Posts: 82
  • Karma: 3
    • View Profile
Re: booting without a serial or vga console
« Reply #19 on: November 26, 2016, 01:23:45 pm »
So from the GUI got to System -> Firmware -> Updates -> Check for Updates and grab it from there? I need to reinstall 16.x to test..
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 10328
  • Karma: 807
    • View Profile
Re: booting without a serial or vga console
« Reply #20 on: November 26, 2016, 01:27:40 pm »
There is not a single uppercase mention of NULLCONSOLE. I double-checked. It may be that text processing is doing something weird in the boot loader code, but that would only further add to ambiguity. :)

What's worse, I think any attempt to print to a detached device will freeze the boot. I did some more cleaning in our bootup code to make sure that it never tries to flip on console output.

As far as patching goes: update the install to 16.7.9, then run this command:

# opnsense-patch f00d4309 d596905

And you're all set for using the setting under System: Settings: Administration (it's called primary console, set to "mute console").


Cheers,
Franco
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 10328
  • Karma: 807
    • View Profile
Re: booting without a serial or vga console
« Reply #21 on: November 26, 2016, 01:31:07 pm »
Oh, I see it works, but only for boot loader menu and kernel bootup. It then prints the RC messages...
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 10328
  • Karma: 807
    • View Profile
Re: booting without a serial or vga console
« Reply #22 on: November 26, 2016, 01:48:28 pm »
And further down the rabbit-hole, the system now supports setting boot.config settings for mute boot, the tty is disabled, but it still prints all the RC messages... whew, this is complicated, but we're getting there.
Logged

s4rs

  • Jr. Member
  • **
  • Posts: 82
  • Karma: 3
    • View Profile
Re: booting without a serial or vga console
« Reply #23 on: November 26, 2016, 02:44:11 pm »
I tested it and can see nullconsole survives a reboot. Still doesn't work but I didn't expect it to in BSD 10.3. Its definitely a 10.x bug. Can I try the same patch on 17? or do you need to write a patch for that? Again in 11.x I think the option should be all upper case.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 10328
  • Karma: 807
    • View Profile
Re: booting without a serial or vga console
« Reply #24 on: November 26, 2016, 03:11:36 pm »
Yes, but should wait for 17.1-BETA to arrive along with images (2 weeks out tops). Currently it requires upgrading to 17.1-ALPHA and updating the core package using git.

Muting the RC output is giving me several different head-aches ATM, if indeed they cause the system from working properly.
Logged

s4rs

  • Jr. Member
  • **
  • Posts: 82
  • Karma: 3
    • View Profile
Re: booting without a serial or vga console
« Reply #25 on: November 26, 2016, 03:56:40 pm »
NP thanks again.. Now to see if I can figure out how to get a USB serial adapter to work as a boot console on FreeBSD.
Logged

  • Print
Pages: 1 [2]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • booting without a serial or vga console
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2021 All rights reserved
  • SMF 2.0.17 | SMF © 2019, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2