OPNsense Forum

Archive => 16.1 Legacy Series => Topic started by: emilio.b on June 13, 2016, 03:52:29 pm

Title: [SOLVED] Install on serial-only device
Post by: emilio.b on June 13, 2016, 03:52:29 pm
Hello i'm really need some advice on install opnsense onto a serial-only device (no VGA).
I already read the manuals and tried out some of the available .img file to no avail.

The device is a miniITX board with only a usb/serial adapter.

TIA
Title: Re: Install on serial-only device
Post by: chemlud on June 13, 2016, 06:17:33 pm
Hy!

You could copy the nano image to a USB stick and run from there or you can install to a SATA device with a full image copied to a USB stick. Choose your weapon! :-D

In both cases you can use the serial console to control the machine...

Title: Re: Install on serial-only device
Post by: emilio.b on June 14, 2016, 09:19:18 am
Hi and thanks for your answer.
Unfortunately this method seems to fail with both nano and serial images (already tried to download from different mirrors to be sure).

The USB sticks begin to boot but at kernel boot it stops to show anything on serial console:
https://forum.opnsense.org/index.php?topic=3189.0

What is the method to transfer the .img files to usb stick? Simple copy, dd with tools like rufus, or other?

TIA

emilio


Title: Re: Install on serial-only device
Post by: chemlud on June 14, 2016, 09:35:27 am
Hi!

Details see here:

https://opnsense.org/users/get-started/

;-)

I use Win32diskimager for Windows, works great.

With which baud rate do you start your serial console? Should be 115200 to follow the opnsense boot process...

I have never seen this "boot screen" as given in the screen shot of your cross post. Should look completely different, in my opinion...

In my Atom (openvox) board you have to set in BIOS (advanced options) "Reedirection after BIOS post" from "always" to "Boot loader". Maybe you should have a look at the BIOS options if you can find a related option...
Title: Re: Install on serial-only device
Post by: emilio.b on June 15, 2016, 01:30:30 pm
Hi,
unfortunately it seems that access to bios settings of my board is protected in some way. So no access to bios redirection settings or the like.

I've tried out also win32diskimager to no avail - same behaviour (se my previous screenshot).

The board is used actually with a pfsense and with pfsense the boot process is ok from there so i can get both the 1st boot screen and all the kernel boot from serial. So i think the bios console redirection should be ok here.

With opnsense img files during boot, i can see the boot menù, then the loading proceeds until i get the word 'Booting' in vertical sticking there. So i can see the 1st part of the booting process from serial, only the second one stops show throught it.

Noticed also that the regular 'asterisk' which should be the loading icon, on my console appears as a vertical stream instead of a sequence of symbols in the same place. Maybe some wrong putty settings?

Any idea?

TIA

emilio

Title: Re: Install on serial-only device
Post by: chemlud on June 15, 2016, 01:57:48 pm
You can't enter the BIOS? Even if it's unrelated to this issue I would not use such a board... Reflash the BIOS and/or update to latest BIOS and then retry ;-)

PS: Can you provide some details (maker, series) of this strange mobo?
Title: Re: Install on serial-only device
Post by: chemlud on June 15, 2016, 02:13:05 pm
PPS: The same putty settings work fine for current pfSense and opnsense here. Same with minicom on Linux. So this should not be a problem...
Title: Re: Install on serial-only device
Post by: emilio.b on June 15, 2016, 04:20:08 pm
Hello Chemlud
the device/board is this:

https://store.pfsense.org/SG-2440/ (internally it's an ADI board from adiengineering.com)

already read tha manual to search a method to access the bios to na avail :-(

Thanks for any further ideas

emilio

Title: Re: Install on serial-only device
Post by: chemlud on June 15, 2016, 04:47:49 pm
...hmmm, maybe some "custom" BIOS avoiding proper boot of other OS? Would contact pfsense netgate service or board manufacturer (nothing at its homepage, apparently) for a clean/open copy of the BIOS, if you are determined to change the software.

For me personally, it is totally unthinkable to use a security appliance when I cannot see/change the BIOS on my own in year 2016...
Title: Re: Install on serial-only device
Post by: chemlud on June 16, 2016, 05:42:20 pm
Hi!

Any news, good or bad? Interestingly, I (!) was contacted by pfsense in the meantime, unfortunately I don't know why...

Interesting times, these days.
Title: Re: Install on serial-only device
Post by: chemlud on June 17, 2016, 01:15:22 pm
Hi emilio, best wishes from pfsense/netgate, they are willing to help you through the issue, but not on this forum.

I offered to post the replies, but apparently they don't want to post here anything other than this offer to help...

Hope this helps, although in 20 years of internet use I have never encountered something as strange as this....
Title: Re: Install on serial-only device
Post by: emilio.b on June 23, 2016, 03:50:39 pm
Hello Chemlud and thanks for your support.
I've sent netgate a message days ago in order to get some support to sort the issue to no avail - apparently they didn't reply to my email...

Any further advice on this?

Any way to reach them (netgate) directly (some real person)?

TIA

emilio
Title: Re: Install on serial-only device
Post by: chemlud on June 23, 2016, 04:24:21 pm
Hi emilio!

I decided to leave the pfsense forum alone (at least for a while), I don't feel really comfortable there anymore, although I had funny times and met  helpful people there. Maybe the only way would be to register there and start a thread, they are pretty aware of this thread here

https://twitter.com/gonzopancho/status/743374459516518400

Hope that helps and have fun with opnsense! :-)
Title: Re: Install on serial-only device
Post by: franco on June 23, 2016, 05:38:33 pm
Er, wow, ok.
Title: Re: Install on serial-only device
Post by: franco on June 23, 2016, 05:58:04 pm
Hi Emilio,

The question that you should be asking is whether this boots on a stock FreeBSD 10.2, and if not if it boots on a stock FreeBSD 10.3.

If it boots with 10.2, then we broke something.

If it boots with 10.3, then 16.7 will help.

If both do not boot ask support what operating systems and versions are supported and how to achieve a successful boot.

Or you can try your luck with opnsense-bootstrap:

https://forum.opnsense.org/index.php?topic=3116


Cheers,
Franco
Title: Re: Install on serial-only device
Post by: emilio.b on June 24, 2016, 04:30:24 pm
thanks chemlud and franco for your kind help.

I've just tried out downloading the latest image from pfsense site.
Noticed that they posted 3 images there: amd64, i386 and a curious Netgate ADI.

Tried out the amd64, and got the same behaviuor i had originally with opnsense images (stop of serial output console on kernel booting).
Then tried the Netgate ADI and yes this image is working as espected.

Didn't check the freeBSD version though.

In the meantime i'll check the bootstrap option and report later here.

TIA

emilio
Title: Re: Install on serial-only device
Post by: franco on June 24, 2016, 06:49:23 pm
Hi Emilio,

When the non-ADI versions have the same behaviour this is going to be the same for FreeBSD 10.3 and there's really nothing we can do in our installer to improve that situation. :)

It's probably the /boot/loader.conf contents that is relevant, as well as maybe /etc/ttys from the working ADI installation.

In this case, opnsense-bootstrap can likely work as it will retain those files contents as well as it can.

It would, however, be good to know the actual contents of the files, because settings loader.conf variables can be done at boot time in the boot loader of the installer and added to the installation afterwards. ttys changes may be a bit trickier, but we really need to know what we're dealing with to say for sure.


Cheers,
Franco
Title: Re: Install on serial-only device
Post by: chemlud on June 24, 2016, 08:26:03 pm
Bizarre, some kind of Apple-like customer lock-in? 
Title: Re: Install on serial-only device
Post by: emilio.b on June 25, 2016, 11:00:09 am
hello,
i've just used the bootstrap solution and got the upgrade to opnsense succesfull.

to know the config files of the ADI version from pfsense i think it would be just a matter of extracting them isn't it?

if so, i can try to do that and post the config here

thanks all

emilio
Title: Re: Install on serial-only device
Post by: franco on June 25, 2016, 03:10:03 pm
Hi Emilio,

Wonderful news. :) If you enable SSH from System: Settings: Admin and log in remotely you can read those files using the following commands and paste the output here.

# cat /boot/loader.conf
# cat /etc/ttys


Cheers,
Franco
Title: Re: Install on serial-only device
Post by: franco on June 27, 2016, 10:04:26 am
Jim contacted us directly this time, kindly explained the situation and that we were on the right track. The info corresponds with the available documentation here:

https://www.netgate.com/docs/rcc-ve-2440/opnsense.html

Specifically, the modified contents of both files is as follows...

/etc/ttys:

Code: [Select]
ttyu0 "/usr/libexec/getty al.115200" cons25 onifconsole secure
ttyu1 "/usr/libexec/getty al.115200" cons25 onifconsole secure
ttyu2 "/usr/libexec/getty al.115200" cons25 onifconsole secure
ttyu3 "/usr/libexec/getty al.115200" cons25 onifconsole secure

/boot/loader.conf:

Code: [Select]
console="comconsole"
comconsole_speed="115200"
comconsole_port="0x2F8"
hint.uart.0.flags="0x00"
hint.uart.1.flags="0x10"
Title: Re: Install on serial-only device
Post by: emilio.b on June 27, 2016, 04:30:30 pm
thank you very much Franco.

good to know.
So may i have to do something else here to help?
Consider the the ADI device is already upgraded to opnsense now.

TIA

emilio
Title: Re: Install on serial-only device
Post by: franco on June 28, 2016, 08:10:03 am
Hi Emilio,

Indeed, no further need for this. Marking it solved. :)


Cheers,
Franco
Title: Re: [SOLVED] Install on serial-only device
Post by: emilio.b on June 28, 2016, 09:36:04 am
Many thanks to all who contributed to solve this problem.

See you

emilio