ZFS on Root

Peter Toth freebsd at snap.net.nz
Wed Jun 22 00:16:15 UTC 2011


On 06/22/11 08:15, Chris Brennan wrote:
> OK, So I got ZFS installed on this new box, I had to loose two disks due 
> to them being faulty, so I removed the IDE expansion card and booted 
> from an SD card, all went well (according to this guide -> 
> http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror). I adjusted the 
> instructions there for only one disk though and will worry about adding 
> the others to the zpool after the fact and the system has booted on it's 
> own. 
>
> The problem is this, the system starts to boot but then fails to find 
> zfs:tank, I get dropped to the mountroot prompt with the following 
> advise:
>
> Trying to mount root from zfs:tank
> 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 invalid mount options from /etc/fstab.
>
> Loader variables:
> vfs.root.mountfrom=zfs:tank
> vfs.root.mountfrom.options=rw
>
> Manual root filesystem specifications:
>     <fstype>:<device> Mount <device> using filesystem <fstype>
>       eg: ufs:/dev/da0s1a
>       eg: cd9660:/dev/acd0
>       This is equivalent to: mount -t cd9660 /dev/acd0 /
>
>     ?               List valid disk boot devices
>     <empty line>    Abort manual input
>
> mountroot> ?
>
> List of GEOM managed disk devices:
>   ufsid/47ce961fb53808acd ufsid/47ce961fb53808ac ad6s1d ad6s1 ad7 ad6 
>   ad5 gptit/f6af4300-9c1a-11e0-b38d-000ea68c8b0e gpt/disk0 
>   gpt/f6a70bb3-9c1a-11e0-b38d-000ea68c8b0e gpt/swap0 
>   gpt/f6a4de0c-9c1a-11e0-b8d-000ea68c8b0e ad4p3 ad4p2 ad3p1 ad4
>
> <Manual root File Specification>
> <8 lines repeat from above>
>
> So what did I miss? I was able to follow the instructions without fail, 
> the only instruction I had to do on my own was to create /tank/boot/zfs 
> first to copy the cpool.cache over. All the other instructions worked 
> with issue, the first time. This is the second time I've done this on 
> this box in two days, the first time I made a mistake, so I scripted the 
> instructions (rather crudely) to ensure I did things correctly, each 
> portion of the script was modified to reflected how I wanted my system 
> to be (mostly changing zpool as the pool name to tank. I can make the 
> scripts available if someone would like to look at them.
Did you set the "bootfs" property on your root pool? Example: "zpool set
bootfs=tank/root tank"


More information about the freebsd-questions mailing list