mounting failed with error 2

Adam McDougall mcdouga9 at egr.msu.edu
Fri Apr 5 16:31:05 UTC 2013


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!


More information about the freebsd-fs mailing list