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 15734 times)

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
booting without a serial or vga console
« on: November 22, 2016, 03:15:53 pm »
I am new to Opensense and BSD in general. I picked up a mini PC to use as a router with the intention of using Opensense. I installed Opensense fine but I found out that it won't boot on a headless system. The mini PC I have does not have a serial port, and I want to put this in a closet without a display. How do I get this to working headless.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: booting without a serial or vga console
« Reply #1 on: November 22, 2016, 07:11:15 pm »
I don't fully understand this. You must have had a VGA or serial attached for installation. Which image did you use? What did you do after installation?

In general you can tweak the console settings under System: Settings: Administration, but in order to fix the issue with a headless system we need to have a bit of "head" to find the actual problem.

Happy to provide patches, but not sure what to debug. :/


Cheers,
Franco
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #2 on: November 22, 2016, 07:43:33 pm »
The system I have has 2 HDMI, 4 USB3, and 2 USB2 ports. When I installed I used an wireless USB Keyboard and connected to a HDMI attached monitor. The install went smoothly and the system came up fine. I configured things then did a reboot, removing the USB Keyboard and HDMI monitor, since the PC is going into my little network cabinet with no room for a monitor or keyboard. I figured I can just use the web interface at this point.

Much to my surprise the system would not boot without a monitor. I tried to set up a serial console figuring it would boot without it, but still no boot. I needed the something plugged it to get the system to boot post install.

Hope this is clear. If not let me know what I am leaving out.
Logged

chemlud

  • Hero Member
  • *****
  • Posts: 2115
  • Karma: 94
    • View Profile
Re: booting without a serial or vga console
« Reply #3 on: November 22, 2016, 08:55:01 pm »
Have here such embedded systems not booting without monitor attached. Problem with BIOS, not opnsense. What you need is a HDMI dummy (just a HDMI plug and a bunch of 100 Ohm resistors). Web search should help quite fast :-)
Logged
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #4 on: November 22, 2016, 09:09:14 pm »
why does Smoothwall boot without a monitor attach if it is a BIOS issue?
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #5 on: November 23, 2016, 12:40:44 am »
BTW I just installed Fedora 25 on the box and that boots just fine without a keyboard and display attached. So I don't think its the BIOS but Opensense..
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: booting without a serial or vga console
« Reply #6 on: November 23, 2016, 08:59:53 am »
Hi s4rs,

Smoothwall is Linux, so it could be a problem with FreeBSD. Let's try to make the boot loader less verbose...

Modify /boot.config file by replacing its content with "-q -m" and reboot without monitor.


Cheers,
Franco
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #7 on: November 23, 2016, 04:57:27 pm »
I was playing and found if I set the boot option in my bios to bios boot Opensense instead of using UEFI boot it works without a display. I will test what you recommended next.
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #8 on: November 23, 2016, 05:07:45 pm »
Quote from: franco on November 23, 2016, 08:59:53 am
Hi s4rs,

Smoothwall is Linux, so it could be a problem with FreeBSD. Let's try to make the boot loader less verbose...

Modify /boot.config file by replacing its content with "-q -m" and reboot without monitor.


Cheers,
Franco

I just checked and there is no /boot.config

Code: [Select]
root@OPNsense:~ # find / -name "boot*"
/boot
/boot/boot2
/boot/boot1.efifat
/boot/boot1.efi
/boot/boot1
/boot/boot0sio
/boot/boot0
/boot/boot
/dev/gpt/bootfs
/etc/rc.d/bootparams
/usr/include/sys/boot.h
/usr/include/rpcsvc/bootparam_prot.x
/usr/include/rpcsvc/bootparam_prot.h
/usr/include/fs/msdosfs/bootsect.h
/usr/libexec/bootpgw
/usr/libexec/bootpd
/usr/local/opnsense/www/themes/opnsense/build/fonts/bootstrap
/usr/local/opnsense/www/themes/opnsense/build/css/bootstrap-select.css
/usr/local/opnsense/www/themes/opnsense/build/css/bootstrap-dialog.css
/usr/local/opnsense/www/themes/opnsense/assets/stylesheets/bootstrap-select
/usr/local/opnsense/www/themes/opnsense/assets/stylesheets/bootstrap-select/less/bootstrap-select.less
/usr/local/opnsense/www/themes/opnsense/assets/stylesheets/bootstrap-dialog.less
/usr/local/opnsense/www/themes/opnsense/assets/stylesheets/bootstrap
/usr/local/opnsense/www/themes/opnsense/assets/fonts/bootstrap
/usr/local/opnsense/www/js/bootstrap-select.min.js
/usr/local/opnsense/www/js/bootstrap-select.js.map
/usr/local/opnsense/www/js/bootstrap-select.js
/usr/local/opnsense/www/js/bootstrap-dialog.min.js
/usr/local/opnsense/www/js/bootstrap-dialog.js
/usr/local/opnsense/www/js/bootstrap-datepicker.min.js
/usr/local/opnsense/www/js/bootstrap3-typeahead.min.js
/usr/local/opnsense/www/js/bootstrap3-typeahead.js
/usr/local/opnsense/www/js/bootstrap.min.js
/usr/local/opnsense/www/js/bootstrap.js
/usr/local/opnsense/www/css/bootstrap-datepicker3.min.css
/usr/local/opnsense/scripts/OPNsense/CaptivePortal/htdocs_default/js/bootstrap.min.js
/usr/local/opnsense/scripts/OPNsense/CaptivePortal/htdocs_default/css/bootstrap-theme.min.css
/usr/local/opnsense/scripts/OPNsense/CaptivePortal/htdocs_default/css/bootstrap-theme.css.map
/usr/local/opnsense/scripts/OPNsense/CaptivePortal/htdocs_default/css/bootstrap.min.css
/usr/local/opnsense/scripts/OPNsense/CaptivePortal/htdocs_default/css/bootstrap.css.map
/usr/local/lib/perl5/site_perl/mach/5.20/sys/boot.ph
/usr/sbin/bootptest
/usr/sbin/bootpef
/usr/sbin/bootparamd
/usr/sbin/boot0cfg
/usr/share/man/man9/boottime.9.gz
/usr/share/man/man9/boot.9.gz
/usr/share/man/man8/boot_i386.8.gz
/usr/share/man/man8/bootptest.8.gz
/usr/share/man/man8/bootpgw.8.gz
/usr/share/man/man8/bootpef.8.gz
/usr/share/man/man8/bootpd.8.gz
/usr/share/man/man8/bootparamd.8.gz
/usr/share/man/man8/boot0cfg.8.gz
/usr/share/man/man8/boot.8.gz
/usr/share/man/man5/bootptab.5.gz
/usr/share/man/man5/bootparams.5.gz
/usr/share/man/man5/boot.config.5.gz
/usr/share/examples/bootforth
/var/db/etcupdate/current/etc/rc.d/bootparams
/var/db/etcupdate/current/boot
/var/dhcpd/dev/gpt/bootfs
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: booting without a serial or vga console
« Reply #9 on: November 23, 2016, 05:18:39 pm »
Hi s4rs ,

It's ok to create it. It will be rewritten after reboot for consistency, but if it helps your use case we are going to add a GUI option for it. The contents is just the single line "-q -m".


Cheers,
Franco
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #10 on: November 23, 2016, 05:25:08 pm »
Do I make it executable? any special permissions?
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #11 on: November 23, 2016, 05:39:35 pm »
Couple of things, first the file is lost after a reboot. If I create the file and boot I see a difference. I see a FreeBSD boot screen then boots to Opensense.

Next if I recreate the file, remove the video cable and reboot the system does not come up. So that doesn't work in UEFI mode.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13957
  • Karma: 1210
    • View Profile
Re: booting without a serial or vga console
« Reply #12 on: November 23, 2016, 07:00:41 pm »
Yes, the system wants to revert back to a known state. It deletes the file in the standard configuration when it is not needed.

If we can't observe the error we won't be able to find the fix. You could try the 17.1-ALPHA image, it has a newer FreeBSD version, but I'm expecting the same results.

https://pkg.opnsense.org/snapshots/

I don't know how to proceed in order to debug this. A bug search in FreeBSD also came up empty. :(


Cheers,
Franco
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #13 on: November 23, 2016, 08:45:14 pm »
Thanks.. I will try 17.1 but agree with you that its difficult to shoot since you can't see whats going on. The things we do know are

BIOS boot works
UEFI fails
the boot.config changes fail

Now if you have some insight on how to get a serial USB device configured at boot time I can try to see if there is console output over serial. I built a null modem cable last night and tested it today and it works.. I tried setting the console boot parm to serial but got nothing on the text console I hooked up.
Logged

s4rs

  • Full Member
  • ***
  • Posts: 113
  • Karma: 4
    • View Profile
Re: booting without a serial or vga console
« Reply #14 on: November 26, 2016, 01:26:51 am »
FYI I was playing with this today and adding console="nullconsole" to /boot/loader.conf should fix this issue. In FreeBSD 10.1 release notes it states that UEFI should support this option. But no matter how I try it the option doesn't work. I tried 11.0 and it works but you have to use "NULLCONSOLE" instead of "nullconsole". I'll try 17.1 and see how that works out. I did pick up a dummy HDMI plug which also fixes the problem.
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 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2