OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: Mr.Goodcat on January 21, 2017, 10:38:26 pm

Title: [SOLVED] [17.1-RC1] Problems with Chelsio NIC and installation from USB
Post by: Mr.Goodcat on January 21, 2017, 10:38:26 pm
Hi,

first of all thank you for your efforts in providing OPNSense!

Today I decided to give OPNSense (v17.1-RC1) a shot but stumbled upon two issues which have already been observed by other users in previous versions.

At first installation from USB failed due to some issue with mounting. It seems to be the same problem which has been encountered by User Julien in this thread: https://forum.opnsense.org/index.php?topic=3370.0 (https://forum.opnsense.org/index.php?topic=3370.0) Burning a DVD with the iso allowed me to get around this but it's a slow and arduous workaround.

Also the driver for my Chelsio T420-CR isn't loaded, therefore the interfaces of the card are not available.
I added if_cxgb_load="YES"' in /boot/loader.conf, /boot/defaults/loader.conf and /boot/loader.conf.local (.local didn't exist till it was created by me), but nothing helped. This is the same behavior as discussed in https://forum.opnsense.org/index.php?topic=75.0 (https://forum.opnsense.org/index.php?topic=75.0).

Unfortunately neither thread has a solution for these problems. Any chance these issues might be fixed in the final version? Otherwise a workaround for the Chelsio problem would be the greatly appreciated.

Thanks!
Title: Re: [17.1-RC1] Problems with Chelsio NIC and installation from USB
Post by: franco on January 22, 2017, 05:13:03 pm
Hi,

USB3 is not very reliable with our base OS, I'm afraid. For us doing a firewall project, we do not have means to improve the USB stack neither it's one of our priorities. FreeBSD's expertise lies in server grade hardware, that means embedded was and likely will always be tricky.

Chelsio drivers have been removed from the standard kernel in order to align with FreeBSD standard. There are two drivers for Chelsio you can load:

# kldload if_cxgb
# kldload if_cxgbe

Maybe you simply need the latter?


Cheers,
Franco
Title: Re: [17.1-RC1] Problems with Chelsio NIC and installation from USB
Post by: Mr.Goodcat on January 23, 2017, 10:32:06 am
Hi Franco,

for booting I tried USB 3.0 as well as USB 2.0 plus UEFI/Bios but neither worked. The USB ports are directly integrated [1] in the Athlon 5350 on my MSI AM1I board [2]. Rufus [3] was used to write the image onto bootable Sandisk/Adata USB sticks. That's why I'm somewhat surprised OPNSense didn't boot successfully.

Thanks for the hint to try kldload! I'll give that a shot and see if it works. However, the driver should be loaded on system boot - for which changes to loader.conf are required, right? Even though the driver isn't part of the default kernel, shouldn't the system detect the Chelsio NIC and load it's driver automatically? Sorry but FreeBSD isn't something I've experience with.

Best,
Fabian


References:
[1] http://images.anandtech.com/doci/7933/6%20Kabini%20System%20Diagram.png (http://images.anandtech.com/doci/7933/6%20Kabini%20System%20Diagram.png)
[2] https://www.msi.com/Motherboard/AM1I.html#hero-overview (https://www.msi.com/Motherboard/AM1I.html#hero-overview)
[3] https://rufus.akeo.ie/?locale=en_US (https://rufus.akeo.ie/?locale=en_US)
Title: Re: [17.1-RC1] Problems with Chelsio NIC and installation from USB
Post by: franco on January 27, 2017, 12:06:18 am
Hi Fabian,

No, kldload (or the permanent loader.conf setup) is manual work in FreeBSD.


Cheers,
Franco
Title: Re: [17.1-RC1] Problems with Chelsio NIC and installation from USB
Post by: franco on January 27, 2017, 12:14:05 am
Should add that some devices are in the FreeBSD "GENERIC" kernel, which means they are always loaded. But cxgb(e) is not one of those.
Title: Re: [17.1-RC1] Problems with Chelsio NIC and installation from USB
Post by: Mr.Goodcat on January 27, 2017, 11:06:16 pm
Thanks for the infos!

Just tried "kldload if_cxgbe" and a quick "ifconfig -l" showed the missing ports come alive.
Next I employed some old-fashioned RTFM [1], added the lines from the link to a newly created /boot/loader.conf.local and *bang* the Chelsio NIC comes up on boot. It would be nice if that worked out of the box, but nevermind.

Now the only remaining problems are installation from USB and UEFI boot. The latter doesn't even work when installing from CD or booting from SSD. As I haven't tried booting pure FreeBSD 11 with UEFI that might as well be an issue of the base OS. Nonetheless it's troublesome.

For now I'll have fun with the box and take a look at bridging performance (without filtering between LAN-side interfaces). Thanks again!  8)

[1] https://www.freebsd.org/cgi/man.cgi?query=cxgbe&sektion=4 (https://www.freebsd.org/cgi/man.cgi?query=cxgbe&sektion=4)