# boot0 fails with ZFS: I/O error - all block copies unavailable



## sim (Feb 24, 2012)

Hi

I have a root on ZFS system which last week I updated to the then-latest 9-STABLE. I now find that I can no longer get past the boot0 loader:


```
FreeBSD/i386 boot
Default: zroot:/boot/kernel/kernel
boot: ZFS: i/o error - all block copies unavailable
```

Sounds bad.   Do I have any options at this point?  I've seen a few suggestions but they seem to assume you can get to the loader menu.

Any ideas would be very welcome at this point!

Thanks

sim


----------



## phoenix (Feb 24, 2012)

Pool layout?


----------



## sim (Feb 26, 2012)

Hi

From memory, only one pool - 'zroot', fully occupying a single drive.  (The machine is a desktop PC).  The pool has the usual set of filesystems for a full FreeBSD install: /, /var, /usr, /tmp, /home etc. etc.

Thanks

sim


----------



## phoenix (Feb 26, 2012)

If you have a non-redundant pool (meaning only a single disk with copies=1), then you're pretty much screwed. You have disk corruption, and no way to repair it.


----------



## sim (Apr 13, 2012)

Well, I finally got a chance to look into this, and am happy to say I recovered the disk.  Luckily I saw a slightly tangential article which demonstrated rewriting the zfs bootcode , something like this:


```
gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 da0
```

I did that using the recovery shell on the install CD, and it did the trick.

Maybe that'll help someone else someday 

sim


----------

