OPNsense Forum

English Forums => Hardware and Performance => Topic started by: EMTSU on October 17, 2018, 12:16:10 pm

Title: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: EMTSU on October 17, 2018, 12:16:10 pm
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?
Title: Re: How to install OPNsense on a Netgate SG-5100
Post by: EMTSU on October 17, 2018, 03:07:14 pm
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?
Title: Re: How to install OPNsense on a Netgate SG-5100
Post by: pylox on October 17, 2018, 04:21:30 pm
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
Title: Re: How to install OPNsense on a Netgate SG-5100
Post by: EMTSU on October 17, 2018, 04:45:15 pm
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.
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: pylox on October 17, 2018, 04:53:01 pm
Hi EMTSU,

the SG-4860 has a USB console port.

regards pylox
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: franco on October 17, 2018, 04:53:30 pm
Under System: Settings: Administration you can find "Use USB-based serial ports" which could help to get the USB console back up.


Cheers,
Franco
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: EMTSU on October 18, 2018, 09:35:01 am
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.
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: EMTSU on October 18, 2018, 09:39:22 am
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?
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: EMTSU on October 18, 2018, 11:36:48 am
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
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: pylox on October 18, 2018, 04:32:28 pm
Hi EMTSU,

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

Code: [Select]
# 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
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: EMTSU on October 19, 2018, 02:01:11 pm
I've hit a problem mounting the USB stick:

Code: [Select]
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?
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: pylox on October 19, 2018, 08:38:15 pm
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:
Code: [Select]
mount -t ufs /dev/da0 /mnt

Fixed in my older post.

regards pylox
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: EMTSU on October 22, 2018, 04:09:45 pm
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?
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: pylox on October 22, 2018, 05:13:26 pm
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

 
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: jackman4 on February 15, 2023, 11:00:28 pm
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 !
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: Patrick M. Hausen on February 15, 2023, 11:05:28 pm
@jackman what steps did you try and at which point does the installation fail?
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: jackman4 on February 16, 2023, 06:29:22 pm
Hi @pmhausen

Actually i'm a linux guy not really comfortable with bsd. I'm learning .

I didn't try anything for now. I need to figure out which bootloader is and how to boot from media.
 i'll try with this :

https://docs.opnsense.org/manual/install.html

I'll try to add some other m2 disk :

https://docs.netgate.com/pfsense/en/latest/solutions/sg-5100/m-2-sata-installation.html

As i'm not comfortable i don't want to brick the appliance.

Any advice on needed precautions would be very appreciated.
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: Patrick M. Hausen on February 16, 2023, 06:44:44 pm
You need a bootable medium (USB?) and find out how to get at the bootloader prompt to pick it for booting. You can then boot all the way - unless you specifically start an installation you won't break anything. The system will run in a "live mode" from that USB key, so you can try if it works without touching the internal drive.

Use the "serial" image and write it to USB with dd on your Linux system.
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: jackman4 on February 16, 2023, 09:37:51 pm
Ok

It looks quite simple then.

I'll read some dmesg logs to dig for firmware problems, try some confs and read some logs before installing.

I think i'll `dd` the whole drive before installing anything.

Will give some input if i succeed.

 Thanks for your help.
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: Patrick M. Hausen on February 16, 2023, 09:43:04 pm
If you can boot the OPNsense install medium successfully, it is also a live FreeBSD system. So you can use it to dd your internal disk to some remote system via ssh.

The internal drive is probably /dev/ada0. camcontrol devlist will tell you.
Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: Splodge on April 25, 2023, 11:39:41 am
Appreciate this is an old thread, but replying in case anyone searches in the future.

To install opnSense on SG 5100, you need to boot with serial console attached (via USB), when prompted, press esc to enter bios.
Reset all settings to default.
Download and burn the opnSense *serial* image to a USB

Power off the SG 5100, insert the opnSense USB and reboot
Give it a few mins and it will reboot into the opnSense installer, and you can install to either onboard MMC or added SSD.

I have personally done this a few times on both 5100 & 6100 - both work great with opnSense serial image - no need to change any settings

Title: Re: How to install OPNsense on a Netgate SG-5100 - USB console issues
Post by: Splodge on April 25, 2023, 11:47:06 am
And in case it’s useful, they both run 1 gig symmetrical PPPoE fine. (With appropriate PPPoE tunbles set)
Idle power consumption with 2 x 1g cables connected is 11w for 5100 and 14w for 6100