Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Apr 2013 12:22:46 -0400
From:      Adam McDougall <mcdouga9@egr.msu.edu>
To:        freebsd-fs@freebsd.org
Subject:   Re: mounting failed with error 2
Message-ID:  <515EFA56.5030008@egr.msu.edu>
In-Reply-To: <20830.58036.422569.831143@oz.mt.att.com>
References:  <20825.59038.104304.161698@oz.mt.att.com> <515DB070.1090803@bluerosetech.com> <20829.52349.314652.424391@oz.mt.att.com> <515E0696.2020901@bluerosetech.com> <20830.58036.422569.831143@oz.mt.att.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 04/05/13 10:41, Jay Borkenhagen wrote:
> Darren Pilgrim writes:
>  > On 4/4/2013 11:54 AM, Jay Borkenhagen wrote:
>  > > Darren Pilgrim writes:
>  > >   > Reboot using the install disk, go to the Live CD.  Import the pool using
>  > >   > an altroot and a cachefile:
> 
> OK:
> 
> ---------------
> root@:/root # zpool status
> ZFS filesystem version 5
> ZFS storage pool version 28
> no pools available
> root@:/root # zpool import -o cachefile=/tmp/zpool.cache -o altroot=/mnt zroot
> root@:/root #
> root@:/root # cp /tmp/zpool.cache /mnt/boot/zfs/zpool.cache
> root@:/root # 
> root@:/root # shutdown -r now
> <shutdown of Live CD, reboot to system on HDD>
> ---------------
> 
> ... and now the system boots from the GPT/ZFS, and everything looks
> great.  
> 
> Thanks!!
> 
> I see that the previous version of Niclas's instructions (not sure if
> those are still available on the web, but I have hardcopy) included
> exactly that 'zpool import' command immediately following 'zpool
> export zroot' which is now the final pre-reboot step.  I guess that
> statement should not have been removed from the procedure.
> 
> Thanks again!
> 
> 						Jay B.
> 

This is sage advice.  A number of times I even thought I set it up right
initially but resorted to this "repair" method to get booting working.

It gets even easier in newer releases.  In 9.x as of Sat Nov 24 12:37:37
2012 SVN rev 243480, zpool.cache is not required at all unless you have
non-boot pools.  In 9.x as of Fri Jun 29 10:22:20 2012 SVN rev 237767
you don't need vfs.root.mountfrom in /boot/loader.conf.  Both of these
changes are in 9.1-release and make booting less complicated, more
resilient and multibooting more flexible.  Thanks to Andriy Gapon!



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