booting without a serial or vga console

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

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

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

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.

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 :-)
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

why does Smoothwall boot without a monitor attach if it is a BIOS issue?

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

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

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

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

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

Do I make it executable? any special permissions?

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.

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

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.

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.