Things in general die when you suddenly turn them off and on again. Especially machines that have been running for quite some time 24/7. Are your disks still being detected? Is it possible your disk or your controller died due to the power spikes?
Ok, that's hopeful. As you mention ZFS, is this a full root-on-ZFS system? No encryption or anything like that?
set currdev=zfs:zroot/ROOT/default
boot /boot/kernel/kernel
It's a bit tricky as I don't exactly know what's wrong but try these on that loader prompt:
Code:set currdev=zfs:zroot/ROOT/default boot /boot/kernel/kernel
The zroot/ROOT/default assumes you've used the default settings during installation and still have the 'default' boot environment.
Doesls shows /boot exists
ls /boot/
or ls /boot/kernel/
show anything? Does ls /boot/
perhaps show a kernel.old? You could try that as a fallback. Anything to get it booting, we can fix any resulting kernel issues more easily later on. The loader(8) is a bit spartan.Doesls /boot/
orls /boot/kernel/
show anything? Doesls /boot/
perhaps show a kernel.old? You could try that as a fallback. Anything to get it booting, we can fix any resulting kernel issues more easily later on. The loader(8) is a bit spartan.
boot /boot/kernel.old/kernel
still gives can't load 'kernel'
zpool upgrade
shows a reminder message for a reason!I'm going to guess that this system was upgraded at some point in the past, and the zpool was upgraded, but the new bootloader was never installed. Runningzpool upgrade
shows a reminder message for a reason!
The only way I know of fixing this is to boot to external media (e.g. USB, network, etc.) that's running the same version of FreeBSD as your kernel/world, install the boot loader from that, and then reboot back to your normal system.
If I boot using the boot image, the ZFS file system doesn't seem to be visible.
gpart show
does show a freebsd-zfs
partition, but zpool list
results in no pools available
. OK, zpool import shows it is there but in use by "other system", so clearly it was not shut down properly. Could that be why it doesn't boot?It has nothing to do with being cleanly shutdown or not. Normally ZFS pools need to be exported on one system before you can import them on another. In this case however you simply need to force the import.so clearly it was not shut down properly.
It has nothing to do with being cleanly shutdown or not. Normally ZFS pools need to be exported on one system before you can import them on another. In this case however you simply need to force the import.
It's relatively safe to do, and there's no other way to get to the data to fix the booting issue.Is forcing it safe?
It's relatively safe to do, and there's no other way to get to the data to fix the booting issue.
internal error: failed to initialize ZFS library
, so I guess the imported zroot masks the zroot of the install image. Importing it resulted ininternal error: failed to initialize ZFS library
, so I guess the imported zroot masks the zroot of the install image.
It also seems to have somehow corrupted the installer image, so I am now rewriting the USB stick (to try ZFS import under another name).
zpool import -f zroot jroot
results in internal error: failed to initialize ZFS library
for every ZFS command after the import - so it still replaces the install image root filesystem. There does seem to be a /boot/kernel directory, but no /boot/kernel/kernel.None of the installer images use ZFS.
Oh, yeah. That's definitely possible. Make use of theI guess the zfs import still mounts the hard disk root over the installer root?
-R
option to mount it on /tmp/temproot or some other place: -R root
Sets the "cachefile" property to "none" and the "altroot"
property to "root"
Oh, yeah. That's definitely possible. Make use of the-R
option to mount it on /tmp/temproot or some other place:
Code:-R root Sets the "cachefile" property to "none" and the "altroot" property to "root"