# ahci_load="YES" cause root cannot mount



## Noodle (Dec 9, 2010)

Hi Forum,

I'm very new to FreeBSD, but have fairly well knowledge about Linux and *nix. I recently setup a file server with FreeBSD 8.1, and trying use zfs RAIDZ for data storage. The setup include:

1 x 100G 2.5" SATA hard disk for OS
5 x 2T 3.5" SATA II hard disk (Samsung F4) for in RAIDZ
i5 2.4Ghz CPU
H55 chipset (with 6 on board sata II port)
8G RAM

After setup, the zfs performance wasn't so good, so I'm trying tune it. From read, I know I should use native ahci driver by put 
	
	



```
ahci_load="YES"
```
 into /boot/loader.conf, so I did. But after that, System cannot boot up because of cannot mount root 
	
	



```
ufs:/dev/ad6s1a
```

I did some research and saw somebody mentioned this error and recreate zpool cache. But that looks like for using zfs for root which is not my case. My root, swap, /usr, /var, /tmp and /home was located on 100G hard disk without any zfs. And because this happened during startup, after I remove it from /boot/loader.conf and boot up machine again, there's no log for that error at all.

Any suggestion on how to use 
	
	



```
ahci_load="YES"
```
?

Thanks

Noodle


----------



## Noodle (Dec 9, 2010)

To answer my own question:

After 
	
	



```
ahci_load="YES"
```
 and device name changed. for example: /dev/ad6s1a changed to /dev/ada0s1a
So I need to modify /etc/fstab accordingly. 

Is there a way to use UUID instead of /dev/ada0s1a in /etc/fstab file to avoid this kind of change?

Thanks

Noodle


----------



## wblock@ (Dec 9, 2010)

When you use AHCI, the disks change from "ad" to "ada" names.  So at the mountroot prompt, enter: [cmd=]ufs:/dev/ada6s1a[/cmd]

Device numbering may be different also, so you might have to experiment with ada0, ada1, and so on.  Once you find it, odds are that it'll still only boot single user because /etc/fstab will have wrong device names.  So go through the whole single user process (remount /, mount /var and /usr) and fix /etc/fstab.  After that, switch to using labels to avoid the problem in the future.


----------



## phoenix (Dec 9, 2010)

AHCI devices show up as ada instead of ad.  Thus, instead of using ad6s1a to mount the root filesystem, you would use ada0s1a.

Try entering [cmd=]ufs:/dev/ada0s1a[/cmd] at the mount root prompt.  If that works, then edit your /etc/fstab to match.

This is noted in the ahci(4) man page, I believe.


----------



## Noodle (Dec 9, 2010)

Thank you very much for the answer, that's exactly what I'm looking for.


----------



## chrcol (Dec 9, 2010)

another solution is to use ufsid's in fstab.


----------

