booting without a serial or vga console

Started by s4rs, November 22, 2016, 03:15:53 PM

Previous topic - Next topic
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

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.

stupid question, where do I get the patch? I looked at the download site but only see the full installers.

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.

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..

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

Oh, I see it works, but only for boot loader menu and kernel bootup. It then prints the RC messages...

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.

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.

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.

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.