AHCI Timeout on 18.1 but 17.7 installs fine

Started by pmcdonnell, February 02, 2018, 03:54:09 PM

Previous topic - Next topic
I'm new to OPNSense but hope I haven't overlooked something simple.  I have searched in the forums and found one related thread in German, but with no solution to the issue:

https://forum.opnsense.org/index.php?topic=7070.msg31436#msg31436

I built my own system to run OPNSense:

Asrock J3355M motherboard
4GB RAM
HP SSD

When attempting to install 18.1 from a USB Drive, it usually stops at the message shown in the attached screenshot (AHCI Timeouts).  I tried changing a number of BIOS settings, updating the BIOS, rewriting the install image to a new USB drive, etc.

I was on a couple of occasions able to get it to go past this point (not 100% sure what BIOS settings allowed that), but the installer did not list the SSD as a target for install.

17.7 installer works just fine.

Should I back up my config and attempt the 18.1 update from within 17.7?

Sorry if I've missed something simple, I've read what I can and searched the forums before posting.

Any info is appreciated!  Thanks!

Quote from: pmcdonnell on February 02, 2018, 03:54:09 PM
Should I back up my config and attempt the 18.1 update from within 17.7?

I'm afraid that won't help either, just tried to upgrade my system (Gigabyte J3455N) from 17.12 -> 18.1 and I'm now stuck with a system that won't boot due to the same error. Actually it won't even go that far without safe mode, hangs on some HPET message early in the boot process.

The HPET issue is different I think.  I did see an option in my BIOS to disable the HPET timer.  Do you have such an option?  Would turning it off help?

I did see other threads related to that issue which suggested a boot option could be passed. 

If anyone else has the AHCI Timeout issue, please chime in.

I did see this on a FreeBSD forum, but I'm not sure it's entirely related:

https://forums.freebsd.org/threads/51868/page-2

u can fix the HPET issue by using:

set hint.hpet.0.clock=0

on loader prompt (problem has been round pfsense for a while now, too), but then you are still stuck with the ahci timeout.
Hope this is fixed soon - have the same issue with my ASRock board :(

Quote from: pmcdonnell on February 03, 2018, 01:08:26 PM

I did see this on a FreeBSD forum, but I'm not sure it's entirely related:

https://forums.freebsd.org/threads/51868/page-2

Thanks for the hint, managed to get it fixed now:

For first booting:

1. On OPNsense boot screen select "exit to loader prompt" (i think it's option 3)

2. type:

set hint.hpet.0.clock=0

to address the HPET issue (if u have it)

3. type:

set hint.ahcich.0.sata_rev=2 (depending on which channel your harddrive is using replace the '0' with 1 or 2 or 3 etc.)

4. type:

boot

it should boot up fine now

5. add the settings to /boot/loader.conf.local:

- log in after boot, choose option "8 ) Shell"
- type:
edit /boot/loader.conf.local
- in the file add the following two lines (again, see above, only add the hpet line if u have the issue and choose the right channel number for your harddrive):
hint.hpet.0.clock=0
hint.ahcich.0.sata_rev=2
- save the file on exit and reboot
- done

Awesome, I'll do an 18.1 upgrade, then give the following a shot if I have boot issues:

hint.ahcich.0.sata_rev=2



Quote from: DTRFX on February 03, 2018, 02:33:11 PM
tell us if it worked :)

:-(

No luck, was left with an unbootable system.  Tried the HPET, sata_rev and hint.ahci.0.msi=0 with no luck.  Tried various combinations too.

Back to 17.7 for now :-/

February 03, 2018, 03:03:10 PM #8 Last Edit: February 03, 2018, 03:12:57 PM by DTRFX
Did u do a clean reinstall or an upgrade? Whats your hardware?

and at which point exactly does it fail?

My instructions above are for after the upgrade from 17.7 to 18.1

Got the HPET issue sorted, thank you!

Unfortunately the "ahcich0: Timeout on slot 5 port 0" error prevails even after I tried with
set hint.ahcich.0.sata_rev=2

Much like pmcdonnel I also tried with
set hint.ahci.0.msi=0
which has been suggested in numerous *BSD threads.
And also every thinkable combination of those two settings.

I have a different motherboard from OP, mine is a Gigabyte GA-J3455N-D3H (rev. 1.0) but I'm guessing the chipset might be the same.

pfSense 2.4.2 (which is also based on FreeBSD 11.1 IIRC) does boot the installer on the same hardware.


Quote from: DTRFX on February 03, 2018, 03:03:10 PM
Did u do a clean reinstall or an upgrade? Whats your hardware?

and at which point exactly does it fail?

My instructions above are for after the upgrade from 17.7 to 18.1

Same issue with both booted from USB and booting from HD (So fresh install or upgraded install).  Stops at the same place as shown in the screenshot in the original post.

Might see if I can boot pfsense 2.4.2 - is it based on a newer FreeBSD?

Think it's the same... Not too sure though... I didn't have any ahci problems on 2.4.2...but it's definitely worth trying to get Opnsense running

Quote from: DTRFX on February 03, 2018, 04:25:37 PM
Think it's the same... Not too sure though... I didn't have any ahci problems on 2.4.2...but it's definitely worth trying to get Opnsense running

Confirmed - pfsense 2.4.2 boots fine.  I'll keep monitoring this thread.

February 04, 2018, 04:03:38 AM #13 Last Edit: February 04, 2018, 11:09:14 AM by DTRFX

Quote
I have a different motherboard from OP, mine is a Gigabyte GA-J3455N-D3H (rev. 1.0) but I'm guessing the chipset might be the same.

What's your sata configuration in BIOS and also as I understand your board has two controllers... Have you tried using SATA_2 or SATA_3 on your board instead?

Had the same issue on a J3455 and this was the only way I could get it to boot back up with 18.1 and get past the timeouts. Give it a try and let me know if it helps


hint.ahci.0.msi = "2"


For the sake of completeness these are the customizations I had to do for this particular board to get a clean boot in 18.1. But I think the first two have been covered in previous posts

machdep.disable_msix_migration = "1"
hint.hpet.0.clock = "0"
hint.ahci.0.msi = "2"