Solved zfs:zrrot/ROOT/default failed with error 6 after fresh install

So, this post serves as a solution for those who might encounter the same situation. First, this is how everything happened.

I have 2 drives installed on the system, I installed FreeBSD 13.2 on the second drive, tested out that everything works fine.

Then, I installed the same system again onto the first drive, that's when zfs:zrrot/ROOT/default failed with error 6 happened.

After some time of digging, I found that it was because although I have used gpart destroy -F /dev/ada1 to destroy the second drive, the zroot label is still on it, which caused the issue.

So, to solve the problem, boot into live CD, enter a shell, run zdb -l /dev/ada1 on the second drive, it will show all zroot label that's still attached to any partition, even though not in use. And a zpool import will show you the ONLINE and UNAVAILABLE labels.

To clear the unavailable labels, just do zpool labelclear -f /dev/ada1, make sure to backup any data there, I don't know what's gonna happen if there's anything you need there up on the disk.

After that, a reboot will take you into the newly installed system.

Hope this helps save some one time.

Peace.
 
.....

Hope this helps save some one time.

Peace.

Thank you oprrr. Today was the day your post helped some one. It pretty much rescued my bum earlier today.

I was moving my FreeBSD 13.2 installation from a sata ssd to a pci ssd and at the same time upgrade to 14.0. This worked quite well.
However I wanted to use the old sata ssd as a backup disk as a second device after the new pci ssd. As you described I also did a
gpart destroy -F /dev/ada0 to destroy the old system disk and in top of it I formated the disk with a ufs file system.
Unfortunately that was not good enough to get rid of the old sata ssd's histoty as a zfs system disk.
After a reboot I ended up with ZFS failed to boot error 6.

zpool labelclear -f /dev/ada0 fixed it.

As said, Thanks Mate!
 
Back
Top