mounting failed with error 2

Jay Borkenhagen jayb at braeburn.org
Fri Apr 5 14:42:41 UTC 2013


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:
 > >   >
 > >   > zpool import -c /tmp/zpool.cache -o altroot=/mnt zroot
 > >   >
 > >   > Copy /tmp/zpool.cache to /mnt/ROOT/boot/zfs/zpool.cache, then reboot
 > >   > *without* exporting the pool.
 > >
 > > Thanks, Darren.
 > >
 > > However, when I try that I get this:
 > >
 > > ---------------
 > > root@:/root # zpool import -c /tmp/zpool.cache -o altroot=/mnt zroot
 > > failed to open cache file: No such file or directory
 > > cannot import 'zroot': no such pool available
 > > root@:/root #
 > > ---------------
 > 
 > Sorry, wrong cachefile option, try:
 > 
 > zpool import -o cachefile=/tmp/zpool.cache -o altroot=/mnt zroot

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.




More information about the freebsd-fs mailing list