Solved Upgraded to Freebsd 13.0 and messed up ZFS root partition

I just upgraded my machine to v13.0 without any major issues. I then decided to upgrade existing ZFS pools. Reading the handbook, I've noticed that for my zroot pool I have to also update the boot code. I'm using EFI based machine, with zroot on ada0. So, I just run
Code:
gpart bootcode -p /boot/boot1.efifat -i 1 ada0
it failed indicating that there is no /boot/boot1.efifat file available. I then re-run it as
Code:
gpart bootcode -p /boot/boot1.efi -i 1 ada0
and rebooted my machine.
Now it cannot boot at all.
After booting into v13 live mode, I was able to list my existing pools showing them all online.

gpart show ada0
Code:
# gpart show ada0
40            234441568     ada0     GPT            <112G> 
40            409600        1        efi            <200M> 
409640        2008                   - free -       <1.0M> 
411648        16777216      2        freebsd-swap   <8.0G> 
17188864      217251840     3        freebsd-zfs    <104G> 
234440704     904                    - free -       <452K>

Is there anything I can do to recover my instance without full on reinstall?
 
Thank you for this link! I was able to restore my machine by recreating EFI partition and copying required file over.
 
Back
Top