[geeks] ZFS boot issues, was Re: operating systems to replace Solaris

Shannon shannon at widomaker.com
Wed Apr 13 06:41:46 CDT 2011


On Apr 13, 2011, at 01:55 , Mike Meredith wrote:

> That sounds very similar to the symptoms I had shortly after
> installation when I blew away the first line of rc.conf (finger trouble
> inside vi is never pretty) :-
>
> 	zfs_enable="yes"
>
> The only other thing I can think of is that something's wrong with the
> boot loader configuration.

What I did was create a pool called pool0, and following ZFS best practices I
do not mount this, I use it as a container for the rest.  The FreeBSD ZFS root
wiki uses the primary pool directly, but best practices says to avoid that for
flexibility and maintenance. Otherwise I did not change the setup. Basically
that just means replacing all instances of zroot with pool0/root.

I created pool0/zroot to be the root filesystem, pool0/home to be home data,
and I made some seperate pools for var and user, etc.

pool0 mountpoint is set to legacy to prevent it from being mounted.

pool0/zroot mountpoint is set to none since loader.conf takes care of that,
and I have also tried setting it to legacy and /, same thing.

pool0 bootfs is set to pool0/zroot

rc.conf:
zfs_enable="YES"

loader.conf:
zfs_load="YES"
vfs.root.mountfrom="zfs:pool0/zroot"

The system boots and says:

	Trying to mount root on zfs:pool0/zroot
	/etc.rc.conf: cannot create /etc/rc.conf: Read-only file system
	Enter full pathname of shell or RETURN for /bin/sh:

When I enter single user shell pool0/zroot is mounted as /, but is temporarily
readonly so boot halts. If I do this:

% zfs set readonly=off pool0/zroot
% exit

...then the system boots normally and all is well.

I can't figure out what is going on nor why anything would be trying to
"create" rc.conf.

This is the guide I used:

http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror

--
Shannon Hendrix
shannon at widomaker.com


More information about the geeks mailing list