First off, I am aware that much of this is my own fault -- the machine in question is my personal desktop and I have backups of the important stuff. I would like to use this as a learning opportunity, rather than blowing everything away and reinstalling. I have included a description of the events leading to this and the current state below. I am happy to provide any more detail or followup. I thank you in advance for any help you can provide.
I have an AMD64 desktop machine with ZFS on root. The relevant history of the machine is as follows
Regarding item 10, the following occurred:
At this point, I get the following at boot:
Upon entering the passphrase, I get two
Below is the output of
I have an AMD64 desktop machine with ZFS on root. The relevant history of the machine is as follows
- Install 13.0-RELEASE using the installer with ZFS on root, with a single mirror vdev, consisting of ada2p4 and ada3p4, using GELI encryption
- Add second mirror vdev of ada0p1 and ada1p1, each GELI encrypted
- Begin upgrade to 13.1-RELEASE (up to first
freebsd-update install
) - Be interrupted and forget I started the install process, continue using the machine for some time (days)
- Try upgrade again, and continue with
freebsd-update install
- Left the computer. In the time that I was away, we had a brief power surge in a thunderstorm causing the computer to lose power. I do not know if the update command was interrupted.
- Power up the computer -- errors indicating 'ZFS: i/o error - all block copies unavailable' and unable to boot
- Boot from 13.1 install media and
geli attach ada0p1 ada1p1 ada2p4 ada3p4
and import and scrub the pool (no errors, normal runtime for scrub). I am presuming that the successful import, scrub, and typical performance together mean that there is not hardware damage from the brief power outage, but I do not know how to further check this. - chroot into the zpool root and finish with
freebsd-update install
and upgrade packages - still boot errors
- Following instructions from some forum posts, write gptzfsboot data with gpart (accidentally to the efi partition, because I did not pay enough attention) (commands below)
dd if=/boot/boot1.efi of=/dev/ada2p1; dd if=/boot/boot1.efi of=/dev/ada3p1
geli configure -b ada0p1 ada1p1 ada2p4 ada3p4
Regarding item 10, the following occurred:
Code:
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada2 # note using the efi partition here
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada3
...restart and boot errors...
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada2
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada3
... restart and boot errors...
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada2 # note using the freebsd-boot partition here, not the efi
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 ada2
At this point, I get the following at boot:
Code:
BIOS drive C: is disk0
BIOS drive D: is disk1
...
BIOS drive I: is disk6
GELI Passphrase for disk0p4:
Upon entering the passphrase, I get two
Calculating GELI Decryption Key for disk0p4: ... iterations ...
for two disks. Then I get more than a screenful of zio_read error : 5
. After the zio_reads, I get a single ZFS: i/o error - all block copies unavailable
and the boot prompt:
Code:
Calculating GELI Decryption Key for disk0p4: N iterations...
Calculating GELI Decryption Key for disk3p4: N iterations...
zio_read error : 5
zio_read error : 5
... more than a screen of this...
zio_read error : 5
ZFS: i/o error - all block copies unavailable
FreeBSD/x86 boot
Default: zfs:zroot/ROOT/default:/boot/kernel/kernel
boot: _
Below is the output of
gpart show
. You can ignore nvd0, da0, and da1. The first is not part of the FreeBSD system, the second is from my USB DAC, and the third is the USB drive with the 13.1-RELEASE install media.
Code:
=> 34 1000215149 nvd0 GPT (477G)
34 2014 - free - (1.0M)
2048 2097152 1 efi (1.0G)
2099200 998115983 2 linux-data (476G)
=> 34 1000215149 diskid/DISK-S5JYNG0N105162L GPT (477G)
34 2014 - free - (1.0M)
2048 2097152 1 efi (1.0G)
2099200 998115983 2 linux-data (476G)
=> 40 19532873648 ada0 GPT (9.1T)
40 19327352832 1 freebsd-zfs (9.0T)
19327352872 205520816 - free - (98G)
=> 40 19532873648 ada1 GPT (9.1T)
40 19327352832 1 freebsd-zfs (9.0T)
19327352872 205520816 - free - (98G)
=> 40 19532873648 ada2 GPT (9.1T)
40 409600 1 efi (200M)
409640 1024 2 freebsd-boot (512K)
410664 984 - free - (492K)
411648 4194304 3 freebsd-swap (2.0G)
4605952 19528265728 4 freebsd-zfs (9.1T)
19532871680 2008 - free - (1.0M)
=> 40 19532873648 ada3 GPT (9.1T)
40 409600 1 efi (200M)
409640 1024 2 freebsd-boot (512K)
410664 984 - free - (492K)
411648 4194304 3 freebsd-swap (2.0G)
4605952 19528265728 4 freebsd-zfs (9.1T)
19532871680 2008 - free - (1.0M)
=> 40 19532873648 diskid/DISK-98M0A041FB4G GPT (9.1T)
40 19327352832 1 freebsd-zfs (9.0T)
19327352872 205520816 - free - (98G)
=> 40 19532873648 diskid/DISK-1EHT9M1Z GPT (9.1T)
40 19327352832 1 freebsd-zfs (9.0T)
19327352872 205520816 - free - (98G)
=> 40 19532873648 diskid/DISK-X990A02VFBDG GPT (9.1T)
40 409600 1 efi (200M)
409640 1024 2 freebsd-boot (512K)
410664 984 - free - (492K)
411648 4194304 3 freebsd-swap (2.0G)
4605952 19528265728 4 freebsd-zfs (9.1T)
19532871680 2008 - free - (1.0M)
=> 40 19532873648 diskid/DISK-ZHZ5AVAQ GPT (9.1T)
40 409600 1 efi (200M)
409640 1024 2 freebsd-boot (512K)
410664 984 - free - (492K)
411648 4194304 3 freebsd-swap (2.0G)
4605952 19528265728 4 freebsd-zfs (9.1T)
19532871680 2008 - free - (1.0M)
=> 32 352 da0 MBR (192K)
32 31 - free - (16K)
63 321 1 !14 (161K)
=> 32 352 diskid/DISK-Y7XP1F113BE597 MBR (192K)
32 31 - free - (16K)
63 321 1 !14 (161K)
=> 1 61800447 da1 MBR (29G)
1 66584 1 efi (33M)
66585 2222800 2 freebsd [active] (1.1G)
2289385 59511063 - free - (28G)
=> 0 2222800 da1s2 BSD (1.1G)
0 16 - free - (8.0K)
16 2222784 1 freebsd-ufs (1.1G)
=> 1 61800447 diskid/DISK-070846100BC6A036 MBR (29G)
1 66584 1 efi (33M)
66585 2222800 2 freebsd [active] (1.1G)
2289385 59511063 - free - (28G)
=> 0 2222800 diskid/DISK-070846100BC6A036s2 BSD (1.1G)
0 16 - free - (8.0K)
16 2222784 1 freebsd-ufs (1.1G)