I have a problem that I seem to be unable to figure out myself. I would greatly appreciate any help that the people here could offer.
When I do that I have no problem reading data - like the loader.conf file. So, as far as I can tell, the bootpool isn't broken.
I tried to
I can import the -geli encrypted- zroot with the following commands (based on this serverfault answer):
The zroot also shows an "ONLINE"
At this point I'm guessing that the error is not related to the state of the ZFS pool. And, given that everything seems to be working when I'm in the USB environment, I am not suspecting hardware issues. The "UFS found no partitions" message seems important. But I've hit a dead end. Internet searches for the error messages do not return anything relevant to my situation - and very few diagnostic suggestions. The output of
Does anyone have any idea what might be causing this problem? Or any steps that I can take to diagnose or resolve the issue?
Situation
A UPS fault caused a power interruption in my FreeBSD file server. Since this event the system has been unable to boot. It displays the following error:
Code:
>> FreeBSD EFI boot block
Loader path: /boot/loader.efi
Initializing modules: ZFS UFS
Probing 10 block devices ......*...+.. done
ZFS found the following pools: bootpool
UFS found no partitions
ZFS: i/o error - all block copies unavailable
ZFS: can't read object set for dataset 21
ZFS: can't open root filesystem
ZFS: i/o error - all block copies unavailable
ZFS: can't read object set for dataset 21
ZFS: can't open root filesystem
Failed to load '/boot/loader.efi'
panic: No bootable partitions found!
System
The system is configured with bootpool as a mirrored pair of SSDs - ada0 and ada1. The zroot is geli encrypted. The FreeBSD version is some years old, but I do not recall exactly what version I am on. It's a version or two back, but it's not crazy outdated.Findings so far
I have tried to do some troubleshooting with the command environment from the USB installer memstick image. In that environment I can import the pool and confirm that the data is there and it has a zpool status status of "ONLINE" - rather than degraded or something concerning. I can also mount the bootpool and access data with the following commands in the USB environment: mkdir /tmp/bootpool
zpool import -f bootpool
zfs set mountpoint=/tmp/bootpool bootpool
zfs mount -a
vi /tmp/bootpool/boot/loader.conf
When I do that I have no problem reading data - like the loader.conf file. So, as far as I can tell, the bootpool isn't broken.
I tried to
zpool export bootpool after importing it. But that did not have any effect.I can import the -geli encrypted- zroot with the following commands (based on this serverfault answer):
mkdir /tmp/bootpool
zpool import -f bootpool
zfs set mountpoint=/tmp/bootpool bootpool
zfs mount -a
cp /tmp/bootpool/boot/encryption.key /tmp/
zfs umount -a
zpool export bootpool
geli attach -k /tmp/encryption.key /dev/ada0p4
geli attach -k /tmp/encryption.key /dev/ada1p4
zpool import -R /mnt zroot
The zroot also shows an "ONLINE"
zpool status after doing this.At this point I'm guessing that the error is not related to the state of the ZFS pool. And, given that everything seems to be working when I'm in the USB environment, I am not suspecting hardware issues. The "UFS found no partitions" message seems important. But I've hit a dead end. Internet searches for the error messages do not return anything relevant to my situation - and very few diagnostic suggestions. The output of
gpart show ada0 and gpart show ada1 seem normal to me. But I haven't looked at those in years so I wouldn't notice if anything has changed.
Code:
# gpart show ada0
=> 40 1000215136 ada0 GPT (477G)
40 409600 1 efi (200M)
409640 2008 - free - (1.0M)
411648 4194304 2 freebsd-zfs (2.0G)
4605952 4194304 3 freebsd-swap (2.0G)
8800256 991414272 4 freebsd-zfs (473G)
1000214528 648 - free - (324K)
Does anyone have any idea what might be causing this problem? Or any steps that I can take to diagnose or resolve the issue?
