Solved Mounting from zfs:zroot/ROOT/default failed with error 2: unknown file system.

Dear @ll,

After upgrading to the latest 13.2-RELEASE I'm facing the following issue after booting:
Code:
Trying to mount root from zfs:zroot/ROOT/default ...
Mounting from zfs:zroot/ROOT/default failed with error 2: unknown file system.

Loader variables:
  vfs.root.mountfrom=zfs:zroot/ROOT/default

mountroot>

If I use my latest snapshot from the boot environment, I'm able to bring up the system.

Is there any way to fix this or get further details what's actually causing that kind of behaviour ?

Any advice is highly appreciated.

Thanks in advance.
 
I have a system that did this because the bios switched ahci and ata SATA modes after a power failure. Could possibly be something like that in your case as well.
 
From which version of FreeBSD, exactly?

(loader changed significantly in 13.1-RELEASE, and so on.)

It had been a minor upgrade (perhaps the wrong wording on my side) within 13.2-RELEASE. The working snapshot is 13.2-RELEASE-p2 which is the system right now running as I haven't decided how to move forward on this.
 
I have a system that did this because the bios switched ahci and ata SATA modes after a power failure. Could possibly be something like that in your case as well.
Thx, I will look into this.

Edit:
Looked into this as far as I'm aware of there has been no change in the system.

The prequel to the situation had been me attaching two new screens to my docking station ( this system is my primary workstation ) while the system had been running which crashed FreeBSD. After powering down ( pressing the power switch till it went off ) and powering it up again I faced the situation described in the initial post. Selecting the latest snapshot brought the system back to life. So I'm curious if this can be fixed and how ?
 
Code:
BE                                Active Mountpoint Space Created
default                           R      -          33.3G 2022-10-12 17:35
13.1-RELEASE_2022-10-12_174645    -      -          19.1M 2022-10-12 17:46
13.1-p2-nowifi                    -      -          1.76M 2023-01-02 15:09
13.1-RELEASE-p2_2023-01-02_151034 -      -          1.71M 2023-01-02 15:10
13.1-p5-stable                    -      -          122M  2023-01-31 14:34
13.1-RELEASE-p5_2023-04-28_132507 -      -          2.48G 2023-04-28 13:25
13.1-p7-stable                    -      -          51.9M 2023-07-17 15:36
13.1-RELEASE-p7_2023-07-18_191053 -      -          52.5M 2023-07-18 19:10
13.1-RELEASE-p8_2023-08-22_154913 -      -          5.50M 2023-08-22 15:49
13.1-p9-stable                    -      -          508K  2023-08-22 15:53
13.1-RELEASE-p9_2023-08-22_161027 -      -          2.66M 2023-08-22 16:10
13.2-RELEASE-p2_2023-08-22_161237 -      -          3.95M 2023-08-22 16:12
13.2-RELEASE-p2_2023-12-29_125234 N      /          3.77G 2023-12-29 12:52
 
Is there anything which can be achieved from the loader?

I tried lsmod but no kernel modules seem to be loaded at this point.

lszfs zroot prints
Code:
$MOS
$FREE
$ORIGIN
ROOT
tmp
usr
var
vm
OK

Anything else to be tried at this point ?
 
This looks like a problem with loading of zfs.ko.
Maybe the system (the problematic BE) is not configured to load it, maybe there is some problem with the module (e.g., it's out of sync with the kernel).
Check loader.conf.
Check boot messages for anything about zfs.ko.
 
If the situation Amdriy mentioned is the case, possibly stop loading *.ko from loader which are not exactly needed to boot up could help.
Staging area on boot (to load kernel and *.ko specified to be loaded in /boot/loader.conf including their dependencies) is limited.
In this case, MOVING non-essential-to-boot *ko to /etc/rc.conf (by adding to kld_list variable) would help.
Of course, zfs.ko is manatory in /boot/loader.conf.
 
This looks like a problem with loading of zfs.ko.
Maybe the system (the problematic BE) is not configured to load it, maybe there is some problem with the module (e.g., it's out of sync with the kernel).
Check loader.conf.
Check boot messages for anything about zfs.ko.

Thank you very much! That had been exactly the issue at hand here and pointed me in the right direction.

Bash:
Mounting the Boot Environment to /mnt
$ bectl mount default /mnt

Code:
$ vim /mnt/boot/loader.conf
#/boot/loader.conf

# ZFS support
zfs_load="YES"
 
Most likely "problem between table and chair" 😆

I don't know why, but the following had been set in /boot/loader.conf, and as I'm the only user, it must have been me. 😅 Switched that to yes and it worked. O:‑)
Code:
ZFS_load="NO"
 
Back
Top