# AHCI timeout with SATA DVD drive during boot, but only with one controller



## ta0kira (Feb 9, 2013)

I did a fresh install of 9.1 amd64 last night on a home server, which I also built from new parts yesterday. Everything went well during the installation (from DVD,) but when I went to boot the first time I got an error "ahcich2: Timeout on slot 0 port 0", which repeated about once a minute. After about 10 minutes the boot would continue, then I could use my system.

For a bit of background, my motherboard (ASUS SABERTOOTH 990FX R2.0) has 2 integrated SATA controllers. One is ASMedia and the other is the SB950 southbridge. I had my primary drive (where FreeBSD is installed) and the DVD drive plugged into the ASMedia ports when I got the error. Since the SB950 allows you to set the SATA mode to "IDE", I switched the primary drive to one of those ports and tried booting in IDE mode. Needless to say, that didn't work. I then unplugged each of the 4 other hard drives on the system and tried rebooting, with the same results. I finally decided to try unplugging the DVD drive on boot, and the error went away! Not only that, but when I plugged it into one of the ports that the SB950 controls (set back to AHCI,) the error didn't come back.

This is obviously no longer a problem that's holding back my progress; however, since it's all brand-new hardware, I'm wondering if there's something wrong with the ASMedia SATA controller or with the DVD drive. Or maybe FreeBSD just chokes on that particular combination? I'm also wondering why I didn't have this problem when booting the install DVD when the DVD drive was connected to the ASMedia controller.

Thanks!

Kevin Barry


----------



## protocelt (Feb 9, 2013)

That motherboard is the same one I use. It works excellent for FreeBSD sans suspend/resume support. The ASMedia controlled ports only support data drives per the manufacturer's motherboard manual. It will not boot FreeBSD or any operating system reliably if at all when booting from a drive connected to those ports. Use the SB950 controlled SATA ports only to boot FreeBSD or your OS of choice.



Regards


----------



## ta0kira (Feb 10, 2013)

Thanks! I actually haven't had a problem with it booting the OS from a drive connected to one of the ASMedia SATA ports. I'd originally put the primary hard drive and DVD drive there to reserve the RAID ports, and to make the primary drive show up as ada0 even if I add more hard drives later. I haven't had it fail to load the boot loader yet, so I'm going to leave the primary drive where it is.

Kevin Barry


----------



## protocelt (Feb 10, 2013)

Interesting. I tried a similar setup when first setting up my system and booting from both FreeBSD and Windows were  unreliable for me. I ended up buying an LSI based HBA card to use instead and used the SB950 ports for the operating system drives. Maybe recent BIOS updates have changed the situation. Either way, I'm glad it works for your setup. It's a great motherboard.


Regards


----------



## ta0kira (Feb 10, 2013)

I have a FreeBSD-only system with GPT on the primary drive, so maybe it has to do with your partition table and/or boot loader.

Kevin Barry


----------



## protocelt (Feb 11, 2013)

Out of curiosity I tried booting from the ASMedia ports last night with  a vanilla FreeBSD 9.1-Release install on a spare disk. It booted flawlessly. It booted Windows 7 as well. I guess the problem for me was either fixed in a BIOS update or as you mentioned, a misconfiguration on my part. As this was months ago, I'm not sure which. I have although always used GPT with this board on all installed drives as I think it would be a waste not to given my use case and setup.


Regards


----------



## ta0kira (Feb 11, 2013)

I'm glad it worked! If you weren't on 9.1 before then it could also be an update to the boot loader. In any case, it could be a lot of things for both of our issues, but they both seem to have worked out.

Kevin Barry


----------

