# Booting From an Alternate Disk in a Mirrored ZFS Root Pool



## Woden27 (Dec 27, 2021)

Following this guide I created  a mirror disk for my zroot.
So, I decided to disconnect the main zroot disk to see if the other one was booting (I installed the bootcode on the disc). 
When the system boot, ZFS cannot boot the mirrored disk and display just a series of writing errors as :

ZFS WARNING : Unable to open gpt/zfs1 for writing (error=1)

and ends up at the prompt :

mountroot>


----------



## ShelLuser (Dec 27, 2021)

Looks like that guide only bootstrapped one drive. Meaning that the other drive wouldn't be able to boot a system.


----------



## Woden27 (Dec 27, 2021)

thanks -- i thought that "sudo gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1" was creating a bootable drive!
So...  I have managed to create mirrored ZFS zroot pool and the main drive will fail...how I can reboot from the mirrored one?


----------



## Erichans (Dec 27, 2021)

Did you execute any labeling instructions as mentioned at _Labels! I forgot labels_ of the mentioned guide?


----------



## Woden27 (Dec 27, 2021)

Erichans said:


> Did you execute any labeling instructions as mentioned at _Labels! I forgot labels_ of the mentioned guide?


Yes , same labels , double-checked before testing.


----------



## Woden27 (Dec 27, 2021)

Sorry -- I am an idiot . It works.
The problem was that i changed the IDE node number on VMware and it was not placed under the correct one. (1:0 instead after deleting the main disk i moved to IDE 0:0). So it was searching on the wrong disk.

Now the status is rightly degraded as it should after a disk failure.


----------

