Upgrade to 14.2, can't boot

I just upgrade my server from freebsd 14.0 to 14.2 and reboot.
When boot facing below error

WeChat Screenshot_20250519135120.jpg




I tried to:

* boot with live cd -- no problem
* try to run zpool import -f -R /tmp/zroot zroot, no problem. But when ls /tmp/zroot, only shown 3 folders which are usr var and web.
* then try to run
mkdir -p /tmp/root
mount -t zfs zroot/ROOT/default /tmp/root
all good, can mount / without any issue.

Tried to reinstall bootcode via (system is using BIOS) on all disks (da0 to da11)
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
still the same error

Tried to created zpool.cache, same error.
Looks like zpool is good but for some reason can't boot.


Can anyone help?


Output of gpart show

gpart.jpg
 
You have a zfs mirror with six disks?
Try to reinstall the gptzfsboot bootcode on all the others disks. Maybe you don't boot on da0.
 
You have a zfs mirror with six disks?
Try to reinstall the gptzfsboot bootcode on all the others disks. Maybe you don't boot on da0.
Thanks. I installed the bootcode on all 12 disks. i think it should be able to boot from any disk.
 
Tried to reinstall bootcode via (system is using BIOS)
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
still the same error
Update all the boot partitions, you might not be booting from da0.
 
I was thinking maybe this issue was caused by version not matching.

After I upgrade from 14.0 to 14.2, for some reason I didn't reboot the server.
And then after a few weeks I tried to run freebsd-update fetch & install, and then reboot.

So is it possible that once of kernel orzfs.ko were upgrade to patched version and then can't boot?
 
I was thinking maybe this issue was caused by version not matching.

After I upgrade from 14.0 to 14.2, for some reason I didn't reboot the server.
And then after a few weeks I tried to run freebsd-update fetch & install, and then reboot.

So is it possible that once of kernel orzfs.ko were upgrade to patched version and then can't boot?

boot from an install medium and switch to console; can you see/import the pool?
If yes, import and mount it to an altroot and show output of env ROOT=/<altroot> /<altroot/bin/freebsd-version -kru
 
What version of FreeBSD did you use to write those boot partitions? Make sure you're using a version that's the same (or newer) than the system.
 
if you boot from usb stick and exit to the loader prompt and try "lsdev" does it show the main pool ?
or even lsdev -v ?
if that works you may shrink the da0 swap(or whatever the real boot disk is) and convert it to efi.
 
boot from an install medium and switch to console; can you see/import the pool?
If yes, import and mount it to an altroot and show output of env ROOT=/<altroot> /<altroot/bin/freebsd-version -kru
Yes, I can import the pool with livecd without any problem. And I even can do chroot and start services as well.
(below are the screenshots from iDARC)

a.png
b.png
c.png
d.png


And then I can run command via SSH

root@:~ # uname -a
FreeBSD 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64

root@:~ # freebsd-version -kru (note, system is boot from livecd)
14.2-RELEASE-p1
14.2-RELEASE
14.2-RELEASE-p3


More test results (livecd then chroot)
QQ20250519-221739.png
 
assuming you used a 14.2-RELEASE install medium and given zpool status didn't complain about features not being enabled, it seems you have already done a zpool upgrade to the pool?
If this is the case, then you definitely need a matching 14.2 (or later) bootloader as SirDice already pointed out. Can you reinstall the bootcode to all drives again from that 14.2-RELEASE environment?

Also, consider finally switching to EFI boot - it is far more reliable and flexible since there are no pre-configured boot paths/devices needed.
(And while you're at it: maybe also use separate pools for the OS/zroot and user/server data)
 
if you boot from usb stick and exit to the loader prompt and try "lsdev" does it show the main pool ?
or even lsdev -v ?
if that works you may shrink the da0 swap(or whatever the real boot disk is) and convert it to efi.
Thanks for your reply.

Here is the output. (looks like not shown any zfs devices?)

g.png



And I noticed even boot with live cd, there is an error message complaint zfs (below screen, the error message is before load live cd)

e.png
 
assuming you used a 14.2-RELEASE install medium and given zpool status didn't complain about features not being enabled, it seems you have already done a zpool upgrade to the pool?
If this is the case, then you definitely need a matching 14.2 (or later) bootloader as SirDice already pointed out. Can you reinstall the bootcode to all drives again from that 14.2-RELEASE environment?

Also, consider finally switching to EFI boot - it is far more reliable and flexible since there are no pre-configured boot paths/devices needed.
(And while you're at it: maybe also use separate pools for the OS/zroot and user/server data)
I tried to reinstall bootcode multiple times on all disks. no luck.
 
uhm....
1747658262673.png


What time zone are you in? This looks like you're from the future...

As you are getting zfs errors, I would suggest running a zpool scrub, but please check system time first as this can also screw up a lot of things - invalid timestamps in filesystem metadata being one of those...
 
uhm....
View attachment 22653

What time zone are you in? This looks like you're from the future...

As you are getting zfs errors, I would suggest running a zpool scrub, but please check system time first as this can also screw up a lot of things - invalid timestamps in filesystem metadata being one of those...
This is from livecd so time maybe incorrect? But it should not affect system from loading.

I have already done scrub. that why you see that message.
 
Is freebsd-update finished "all passes"?
Not 100% sure as I tried freebsd-update when it was first introduced but never again (switched to src upgrading) after that, freebsd-update requires multiple passes to finish in some cases.

If it's not 100% finished, possibly /sbin/zfs and/or /sbin/zpool is not updated yet (or libc or something related).

In these cases, maybe you need to determine what is/are not yet upgraded and copy it from installation media.
 
Thanks fo rcovacat comment.
For now when use livecd to boot the server, when run `lsdev`, there is no zpool. I think this could be the root cause.
But I don't understand why. I have already run gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0 multiple times..from da0 to da11
 
i assume installation media is 14.2 already so there is no point rewriting bootcode
FreeBSD-14.2-RELEASE-amd64-memstick.img has an efi partition on it. if you efiboot this can you lsdev ?
 
i assume installation media is 14.2 already so there is no point rewriting bootcode
FreeBSD-14.2-RELEASE-amd64-memstick.img has an efi partition on it. if you efiboot this can you lsdev ?
unfortunately, the server is using bios not uefi.
And from above gpart command output, you can see there is no EFI partition.
 
Tried to boot the service with liveCD kernel but from local system via below command

load /boot/kernel/kernel
load /boot/kernel/zfs.ko
load /boot/kernel/nullfs.ko
set currdev="zfs:zroot/ROOT/default:"

Got error device not configured.

a.png
 
Back
Top