Solved Boot issues after 14.2-RELEASE update

Hello, yesterday I upgraded my system from 13.4 via terminal:

# freebsd-update fetch
# freebsd-update install
# freebsd-update upgrade -r 14.2-RELEASE
# freebsd-update install

I did not reboot it - I shut my computer down and decided I’d complete the upgrade today.
I am now stuck at boot, my terminal won’t go past “Loading kernel modules”.
If anyone knows how to troubleshoot it, I would deeply appreciate it
 
At the boot menu, drop to the loader prompt. Only load the kernel (if you use zfs make sure to also load it), then boot to single user mode ( boot -s). Remove any 'external' or other kernel modules from /boot/loader.conf. Basically remove everything you don't strictly need to boot the system.

This is one of the reasons why you should move any non-important kernel modules to kld_list in rc.conf. Those will get loaded later on, and if any of them cause problems you're still able to easily boot to single mode.
 
Only load the kernel (if you use zfs make sure to also load it), then boot to single user mode ( boot -s).
From the top of my head:
Code:
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
boot -s
{wait for the system to boot}
zfs set readonly=off zroot/ROOT/default
zfs mount -a
# Now you should be able to edit /boot/loader.conf, you might also want to (temporarily) disable a bunch of things in rc.conf too
 
From the top of my head:
Code:
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
boot -s
{wait for the system to boot}
zfs set readonly=off zroot/ROOT/default
zfs mount -a
# Now you should be able to edit /boot/loader.conf, you might also want to (temporarily) disable a bunch of things in rc.conf too
Hello, thanks for the reply.
I was able to boot single user mode, and did as you said. I think I commented out more files than necessary, as the terminal image was what showed up when booting regular mode.

When getting to the boot menu now, it also tells me “loader needs to be updated”

If this is caused by an incomplete upgrade, is there any way to complete it via single user mode?
 

Attachments

  • IMG_4972.jpeg
    IMG_4972.jpeg
    111.4 KB · Views: 30
  • IMG_4973.jpeg
    IMG_4973.jpeg
    69.1 KB · Views: 28
I was able to get to single user boot again, but when I’m prompted by mountroot and type

zfs set readonly=off zroot/ROOT/default<br>zfs mount -a

It says “invalid file system specification”

When I typed
zfs:zroot/ROOT/default
It said “cannot find the pool label for “zroot” and fails with error 5
 
When getting to the boot menu now, it also tells me “loader needs to be updated”
We'll get to that once you've completed the upgrade. Do NOT zpool-upgrade(8) before the boot loader has been updated.

If this is caused by an incomplete upgrade, is there any way to complete it via single user mode?
Boot loader isn't updated with freebsd-update(8), you'll need to this by hand later on. And as long as the cached upgrade files (/var/db/freebsd-update) are accessible you can finish the rest of the upgrade in single user mode. Just make sure everything is correctly mounted (and read/write!). It doesn't need network or anything else from the system when doing freebsd-update install.

If you can't get things booting properly now, you could try booting the previous boot environment (option 8), freebsd-update(8) creates one with every freebsd-update install, so you can easily revert the system back to before the upgrade.
 
was able to get to single user boot again, but when I’m prompted by mountroot and type

zfs set readonly=off zroot/ROOT/default<br>zfs mount -a
The zfs(8) commands need to be entered at the shell prompt after the kernel has started. The 'mountroot' prompt is from loader(8). loader(8) has just enough knowledge of ZFS to be able to load a couple of files from it, that's all it can do. Looking at the error it looks like it tries to boot from zfs:zroot/ROOT/default before the drive was ready (the ad0 messages are appearing afterwards).
 
We'll get to that once you've completed the upgrade. Do NOT zpool-upgrade(8) before the boot loader has been updated.


Boot loader isn't updated with freebsd-update(8), you'll need to this by hand later on. And as long as the cached upgrade files (/var/db/freebsd-update) are accessible you can finish the rest of the upgrade in single user mode. Just make sure everything is correctly mounted (and read/write!). It doesn't need network or anything else from the system when doing freebsd-update install.

If you can't get things booting properly now, you could try booting the previous boot environment (option 8), freebsd-update(8) creates one with every freebsd-update install, so you can easily revert the system I edit the faulty single user loader.conf from multi user mode?
Thank you! All solved
 
Back
Top