UFS geom label for rootfs gets deleted upon boot

In freebsd 14.0-RELEASE, I have the root partition labeled with glabel as d0.root.
When I put it in the fstab as
/dev/label/d0.root1 / ufs rw 1 1
It cannot boot and loader fails to mount it.
It drops to the loader prompt when it tries to mount root and says failed with error 19.

I have to mount it as /dev/ada0p3 in order to boot.
Once I reboot, the label for root always disappears and no longer exists in /dev/label/.
I also tried creating /boot/loader.conf with
vfs.root.mountfrom="ufs:/dev/label/d0.root"
But it made no difference.

I do know that if I mount any other partition via /dev/ada0pn, the label for that partition disappears while it's mounted, and then reappears when unmounted.

However, I confirmed the label is permanently deleted by booting from a thumb drive with no ada0 partitions mounted and the label for root is gone.

Any idea what the problem is?

I am mounting root via a label the same way on my FreeBSD 13.1-RELEASE machine with no problems.
 
Did you label the partition with glabel create or glabel label?
The manpage of glabel says that the former is TEMPORAL and should use the latter if you want it to be persistent.
 
Did you label the partition with glabel create or glabel label?
Slaps forehead! You are right. I retested using "glabel label" and it worked! Thank you very much! I have seen that before but forgot all about it. I still don't know what originally happened because my partitioning script is doing "glabel label" commands and the root partition label is the only one that somehow got deleted upon reboot. Then I ended up running "glabel create" in my manual tests trying to figure out the problem.
 
Back
Top