Archive > 17.7 Legacy Series

[SOLVED] OPNsense V17.7.5 installation on APU2

(1/4) > >>

mossi2000:
Hi,

I just want to share my experience on installing OPNsense on a APU2C4.
A while ago I bought the APU2 and installed pfSense 2.3.4 (memstick-serial-amd64).
Then I had no time to finalize the setup for production.
Since I will receive a Fiber-to-the-Home connection before christmas, I wanted to finish it and wanted to give  OPNsense a try, since the GUI and what I've read about it pleased me.

HW: APU2 with 4GB RAM, 16 GB m2-SSD. Latest BIOS 4.6. Serial connection to an USR TCP 232 302 to Ethernet via a Virtual COM on Windows.

Yesterday evening I tried to install the serial-amd64 version via USB stick. Tried different USB sticks, but when logged in as installer, copying of the system always hung at some cpdup command 45-64%. Then I read about the problem with USB3 ports and AHCI.
Using RUFUS and/or Win32Image is quite straight forward and TinyCore for flashing or MemStick preparation is easy.
If I would have had a smaller  USB 3 stick free (the ones I have are all 64 GB),I would have tried USB3 memory stick, but I think It would have helped much except for preparation speed..

Ok, retried this morning also with pfSense, same thing.
I searched for a cable to connect the internal USB2 ports to Type A conectors, but couldn't find one... Shit.
In the afternoon I tried to install the nano version via a TinyCore stick. Yep!! That worked.
I could open the GUI and do some settings.

But later on I see on the serial console I AHCI errors occurring:

(Just one example)

(aprobe0:ahcich0:0:0:0): ATA_IDENTIFY. ACB: ec 00 00 00 00 40 00 00 00 00 00 00
(aprobe0:ahcich0:0:0:0): CAM status: Command timeout
(aprobe0:ahcich0:0:0:0): Error 5, Retries exhausted
ahcich0: Timeout on slot 30 port 0
ahcich0: is 00000002 cs 00000000 ss 00000000 rs 40000000 tfd 50 serr 00000000 cm          d 00407e17

and I no longer can login on the serial console or open the GUI.

How can I get rid of these??

Alphabet Soup:
Not much help, but I've had poor luck with FreeBSD, the external APU2C4 USB3 ports, and USB3 memory sticks unless I set that kern.cam.boot_delay variable to something non-zero.  I believe OPNsense sets this automatically now, so if that hasn't solved it for you maybe try:
a)  find/borrow a USB2 memory stick,
b)  try again to find that USB2 internal port adapter cable,
c)  transplant the m.2 drive to another host computer and write the image there, then move the m.2 drive back

franco:
Install the os-boot-delay plugin prior to first reboot.

However, some devices seem to not reboot at all, something specific to APU but only happening for a limited number of users. Others can use their APU just fine.


Cheers,
Franco

mossi2000:
I finally got it solved:
The root cause of the problem is that in FreeBSD 11.0 the AHCI driver has been "improved" in such a way, that it causes command timeouts and hangs on the APU2 (and as I read on several more devices).
It looks as if is dependent on the connected device (SSD..)
(I found a post where a guy got the AHCI sources from FreeBSD 10 and merged the AHCI driver back to 11, rebuilt the kernel to make it work)

The solution is to add the lines:
hint.ahci.0.msi="0"
hint.ahci.1.msi="0"

into /boot/device.hints
(Thanks to an italian guy whose post I found, and that I could understand it (my italian is not too bad))

Since I dont't know a way of how to access this file BEFORE installation, it' a bit tricky.


The installation failures are NOT related to USB2 / USB3. (I did the last trials using a USB3 stick, but just for the reason that writing to a USB 3 stick for preparing the bootable memstick  is 3 to 10 times faster...


Here's how I managed to install:
Using Rufus I created a boot stick with apu2-tinycore6.4  and put OPNsense-17.7.5-OpenSSL-nano-amd64.img.bz2 on it too.

Then I booted Tinycore.
I removed the partitions on the mSata SSD using fdisk. (I had a 24 MB partition left over from the last trial)

Then I wrote the OPNsense image to the SSD (Tinycore does not have the AHCI problem, so the write is safe)
bunzip2 -dc OPNsense-17.7.5-OpenSSL-nano-amd64.img.bz2 | dd of=/dev/sda bs=1M
Takes a while...

(If there's a way to mount the freshly written partition, one could edit the necessary file safely from here)

After that remove the stick and reboot.
OPNsense comes up and I logged into the shell (8) on the serial console and edited the boot/device.hints file.
Using the GUI I added the os-bootdelay plugin (for safety) and then rebooted the system.

After the reboot I went to Update in the GUI and was able to update to OPNSense 17.7.7_1.
The trial before, without the hints produiced AHCI timeouts when downloading / installing the updates.

The serial version CANNOT be booted like this, because it can't install to where it's running from and besides
the install would have to have the hints already active for copying ... diabolic circle...

So I will live with the nanoBSD image and I've set up remote syslogging to my QNAP NAS, where there's lots of space on the HDDs.

Hope this helps somebody saving time....
Axel

bigops:
I had also run into the same issue with APu2/3 installs.  But I have noticed that if i use a standard USB 2 device then the timeouts does not happen and the install goes through. 

One more thing to note is that you mentioned that you are looking at a fiber connection.  The APU is not able to handle 1 Gbps fiber.  The max I have seen it handle is around 650 M for download and 550 for upload.

Navigation

[0] Message Index

[#] Next page

Go to full version