Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Sep 2011 21:54:58 +0200
From:      Jeremie Le Hen <jeremie@le-hen.org>
To:        freebsd-fs@FreeBSD.org
Cc:        jeremie@le-hen.org
Subject:   Difficulties to use ZFS root: ROOT MOUNT ERROR
Message-ID:  <20110905195458.GA7863@felucia.tataz.chchile.org>

next in thread | raw e-mail | index | archive | help
Hi list,

I've followed the instructions documented here:
    http://wiki.freebsd.org/RootOnZFS/ZFSBootPartition

The kernel starts correctly so this rules out any problem regarding
boot0, zfsboot and ZFS loader.

But when the kernel tries to mount the root filesystem, it fails with
the following output:

% Trying to mount root from zfs:zroot
% ROOT MOUNT ERROR:
% If you have invalid mount options, reboot, and first try the following from
% the loader prompt:
% 
%      set vfs.root.mountfrom.options=rw
% 
% and then remove the invalid mount options from /etc/fstab.
% 
% Loader variables:
% vfs.root.mountfrom=zfs:zroot
% vfs.root.mountfrom.options=rw

>From a netboot'd FreeBSD:

 # zfs import zroot
% # zpool get bootfs zroot
% NAME   PROPERTY  VALUE   SOURCE
% zroot  bootfs    zroot   local
% 
% # zfs list -o name,canmount,mountpoint
% NAME                       CANMOUNT  MOUNTPOINT
% zroot                            on  legacy
% zroot/tmp                        on  /tmp
% zroot/usr                        on  /usr
% zroot/usr/home                   on  /usr/home
% zroot/usr/ports                  on  /usr/ports
% zroot/usr/ports/distfiles        on  /usr/ports/distfiles
% zroot/usr/ports/packages         on  /usr/ports/packages
% zroot/usr/src                    on  /usr/src
% zroot/usr/src8                   on  /usr/src8
% zroot/var                        on  /var
% zroot/var/crash                  on  /var/crash
% zroot/var/db                     on  /var/db
% zroot/var/db/pkg                 on  /var/db/pkg
% zroot/var/empty                  on  /var/empty
% zroot/var/log                    on  /var/log
% zroot/var/mail                   on  /var/mail
% zroot/var/run                    on  /var/run
% zroot/var/tmp                    on  /var/tmp
% # zfs export zroot

/boot/zfs/zpool.cache exists in the zroot filesystem:

% # zpool import -R /mnt zroot
% # zfs set mountpoint=/ zroot
% # ls -l /mnt/boot/zfs/zpool.cache
% -rw-r--r--  1 root  wheel  924 Sep  5 07:31 /mnt/boot/zfs/zpool.cache
% # grep zfs /mnt/boot/loader.conf /mnt/etc/rc.conf 
% /mnt/boot/loader.conf:zfs_load="YES"
% /mnt/boot/loader.conf:vfs.root.mountfrom="zfs:zroot"
% /mnt/etc/rc.conf:zfs_enable="YES"


Any idea why this error occurs?

Thanks
-- 
Jeremie Le Hen

Men are born free and equal.  Later on, they're on their own.
				Jean Yanne



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110905195458.GA7863>