How to install OPNsense on a Netgate SG-5100 - USB console issues

Started by EMTSU, October 17, 2018, 12:16:10 PM

Previous topic - Next topic
I am completely new to this world, so please bare with me / be kind :) I would like to install OPNsense on a Netgate SG-5100; can someone provide me the steps to achieve this please?

October 17, 2018, 03:07:14 PM #1 Last Edit: October 17, 2018, 03:15:24 PM by EMTSU
I've managed to get OPNsense onto this box, but.............. the USB console port no longer works. I can see the device boot-up, but no longer receive a login prompt. This is what I have:

*** OPNsense: OPNsense 18.7.4 (amd64/OpenSSL) ***

LAN (igb0)      -> v4: 192.168.x.x/24
WAN (igb1)      -> v4: 192.168.x.x/24

HTTPS: SHA256  {edited}
SSH:   SHA256  {edited}
SSH:   SHA256  {edited}
SSH:   SHA256  {edited}

Does anyone know how I can resurrect it please?

Hi EMTSU,

i had the same problem  with a NETGATE SG-4860, but maybe it will help you with your hardware:

https://forum.opnsense.org/index.php?topic=6998.msg30802#msg30802

regards pylox

Hi pylox,

Thank you for taking the time to reply. Was your issue with a USB console port or a serial one? I'm apprehensive about following the instructions in the linked content, given it seems to relate to a traditional serial console port.


Under System: Settings: Administration you can find "Use USB-based serial ports" which could help to get the USB console back up.


Cheers,
Franco

Thank you both.

franco: I'd already discovered and tried that setting, but still no joy. I will try the instructions in the linked post above.

I have hit a hurdle already: I don't have any devices running FreeBSD, is there a workaround to mount the USB stick on a Windows PC?

So far I have tried the following tools in an attempt to view the contents of the OPNsense USB stick, but my attempts have been unsuccessful:-

Ext2IFS
ufs2tools
ffsdrv
ufs explorer

I have another OPNsense box, which I've connected the USB upto, but I have not been able to mount the USB as the instructions below are regretfully beyond my Windows-only skills.

https://www.freebsd.org/doc/handbook/usb-disks.html

Hi EMTSU,

no problem...go to you other OPNsense and put the USB stick (with the OPNsense serial image)in.


# identify the usb stick (device)
camcontrol devlist
<TS128GMSA370 O1225G>              at scbus0 target 0 lun 0 (pass0,ada0)
<Generic Ultra HS-COMBO 1.98>      at scbus6 target 0 lun 0 (pass1,da0)
<JetFlash Transcend 8GB 8.07>      at scbus7 target 0 lun 0 (da1,pass2)

# in my case is /dev/da1 the USB stick
#
mount -t ufs /dev/da1 /mnt

# so now you can go to /boot at the USB stick
cd /mnt/boot

#edit the loader.conf.local (probably it will create a new one)
ee loader.conf.local
#an put the required lines in (some special properties for the netgate usb-serial interface)
hint.uart.0.flags=0x0
hint.uart.1.flags=0x10
comconsole_speed="115200"
comconsole_port="0x2F8"
console="comconsole"
kern.cam.boot_delay="10000"

#save & quit (ESC) and unmount
umount /mnt



Take the usb stick to the SG-5100 and boot with it...lets see what will happen...:-) When all is fine you should able to install OPNsense from USB stick (usb console)

When it will not work (the NETGATE SG-5100 is quite new), there are two possibilities:
- it will work only from FreeBSD 11.2 (OPNsense 19.1) because of some hardware incompatibilities
- or we have to check the pfsense serial image for changed parameters

Good luck !

regards pylox

I've hit a problem mounting the USB stick:


root@OPNsense:~ # camcontrol devlist
<CMI59CS2404-120 Q0330A0>          at scbus1 target 0 lun 0 (pass0,ada0)
<Kingston DataTraveler 2.0 PMAP>   at scbus2 target 0 lun 0 (da0,pass1)

root@OPNsense:~ # mount -t ufs /dev/da0p2 /mnt
mount: /dev/da0p2: No such file or directory
root@OPNsense:~ # mount -t ufs /dev/da0p1 /mnt
mount: /dev/da0p1: No such file or directory
root@OPNsense:~ # mount -t ufs /dev/da0p3 /mnt
mount: /dev/da0p3: No such file or directory


Where am I going wrong? This is the USB stick I used to install OPNsense on the Netgate.

Also, when it comes to "#save & quit (ESC) and unmount", is the command simply umount /mnt  to save AND quit?

Hi EMTSU,

aaargh, i'am so sorry...it was my fault.
I picked the wrong USB stick with a mfsBSD install image.

If your device is /dev/da0 so please use for the mount:

mount -t ufs /dev/da0 /mnt


Fixed in my older post.

regards pylox

Thank you pylox.

One last question: as I have already installed OPNsense on the Negate, as mentioned in my second post, is there a way for me to modify an existing loader.conf.local?

Hi EMTSU,

yes, you can do/try it too.

Please, don't be frustrated if it will not work...Maybe OPNsense 18.7/FreeBSD 11.1 is not fully compatible with the new hardware.

regards pylox


HI friends.

Is it possible to necrobump this thread as the initial question is still unanswered:

How to install opnsense on this appliance ?

I mean technically is there any guide or howto ? 

Thank you good fellows and long live to opnsense !