# FreeBSD 9.0; root on ZFS; ZFS on GELI; stuck in mountroot prompt



## _martin (Mar 21, 2012)

I'm trying to install FreeBSD on my notebook. Goal is to have root on ZFS with encryption. Installation was done using CD from LiveCD. 

Disk is divided as follows: 


```
=>      34  16777149  da0  GPT  (8.0G)
        34       128    1  freebsd-boot  (64k)
       162   2097152    2  freebsd-zfs  (1.0G)
   2097314  14679869    3  freebsd-zfs  (7G)
```

The small 1G partition is used for zboot - pool which I mount under /bootfs. Second one is used for GELI. 

After GELI init/attach I installed FreeBSD as any other installation when one wants to have root on ZFS. /boot/loader.conf includes geom_eli_load. /boot is a symlink to /bootfs/boot, all files which are normally under /boot. 

When system boots everything seems ok. But after I'm prompted for GELI passphrase system halts to mountroot prompt (rootfs not found). I can see my ".eli" provider among options to choose root from (hence GELI is attach correctly). Problem is, that the pool which contains root is not activated. 

I did google around and read some issues about rcorder where /etc/rc.d/mountcritlocal script is executed before /etc/rc.d/zfs. But I didn't find any solution to this. 

I found some howtos here on forums, but it seems nobody bumped to this issue.


----------



## kpa (Mar 21, 2012)

Is the second partition really a zfs pool or should be it of type freebsd-ufs?


----------



## _martin (Mar 21, 2012)

kpa said:
			
		

> Is the second partition really a zfs pool or should be it of type freebsd-ufs?



It's a zfs pool, a pool where everything else except /boot resides. When I mount an install CD and choose "cd9660:/dev/cd0 ro" I can import pools without problems (and don't need to reattach the second partition).


----------

