FreeBSD install with zfs boot problem

Hi,

I decided to see how ZFS root-boot is done, I did follow this guide:
HTML:
https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE
.

After all these steps, on the first boot I am getting this error:

Code:
Mounting from zfs:zroot/ROOT/default failed with error 2: unknown

Loader variables: vfs.root.mountfrom=zfs:zroot/ROOT/default

mountroot>

I did update cache with:

Code:
zpool set cachefile=/boot/zfs/zpool.cache   zroot

Best Regards
 
That loader variable doesn't look correct to me. In my situation I don't specify anything apart from the main ZFS pool:

Code:
$ grep mountfrom loader.conf
vfs.root.mountfrom="zfs:zroot"
Where zroot is obviously my main ZFS pool.
 
No, when used with ZFS the vfs.root.mountfrom variable specifies a ZFS dataset that is to be used as the root filesystem, not the pool.
 
kpa said:
No, when used with ZFS the vfs.root.mountfrom variable specifies a ZFS dataset that is to be used as the root filesystem, not the pool.
I'm aware of that, but as soon as you create the pool it will also create a matching dataset (or filesystem if you will). And considering how vfs.root.mountfrom points to a single slice when used on UFS I think the OP's value looks peculiar.

Might help if the OP could show us the output from zfs list -r zroot.
 
It depends on how you organize the datasets in the pool. If you are using the so called boot environments layout (here it looks exactly like that) there is a top level dataset, for example zroot, that is not going to be used for mounting but containing a dataset named ROOT that is also not going to be mounted. Below the ROOT dataset are the datasets that will contain the root filesystems for each boot environment. Let's say you have this type of hierarchy:

Code:
zroot
zroot/ROOT
zroot/ROOT/default
zroot/ROOT/default/usr
...
zroot/ROOT/test
zroot/ROOT/test/usr
...

That is two boot environments, default and test and you could switch between them by setting the bootfs property for the pool to either zroot/ROOT/default or zroot/ROOT/test.
 
Back
Top