Problem change Device in Boot Pool "mirror"

I’ve changed one on my mirrror but device. ZFS was synced, but new device is not bootable. It seems that only zfs part was synced and not MBR part. Important: My system is not EFI. The other device in the mirror is bootable so I can boot only from this one.

How did you test if the new drive was not bootable? Be very specific in what you did, if we guess, it could take a while to help you.

Additionally how did you replace the mirrored boot drive?

Lastly, this is important, backup your TrueNAS configuration file. Store it in a safe place, not on the NAS.

And if you just want to take the easy way out here, after you have your configuration file backed up, just reinstall TrueNAs to your pair of boot drives and once done, restore your configuration file. This is likely the fastest way.

Good luck.

“How did you test if the new drive was not bootable?”
I tried to boot from that USB device and it didn’t boot

“Additionally how did you replace the mirrored boot drive?”
I did Mirror From GUI Interface of TRUENAS SCALE-

“…easy way out here,…just reinstall TrueNAs”
This is not a solution to propose because the problem could happen to many other people so it is a BUG that should be corrected, Thank you.

Many motherboards will not boot from a second drive without intervention in the BIOS.

If you have a boot mirror and one drive fails the system may not boot as it cannot find a bootable drive until you enter the BIOS and select the other drive in the mirror and mark it as bootable and move it to the top of the BIOS list.
This is not a bug in Truenas, rather a function of how BIOS works on some systems.

1 Like

If you ZFS replace a mirrored drive in the boot pool, you need to manually copy the boot partition with dd. Otherwise the new device will be unbootable. Which is pretty much expected without a boot partition (either BIOS or EFI).

I also do not consider it a bug, however there is room for improvement for the system to ask the user to create a bootable drive. There is more to it than that of course.

I didn’t want to tell you to just recreate a mirrored boot drive set but it is the fastest way to solve the problem you had.

It should work when using the GUI, but I think the version of TrueNAS OP is using is 22.12, which is very old and until this issue is confirmed in a newer version, I doubt it’d even be investigated.

Ie, if it was an issue, it’s probably already fixed.

1 Like

With TrueNAS? I’m pretty sure it does all of that under the hood, meaning even though it “appears” as a ZFS action, it is also copying the bootloader, swap, and partition layout.

1 Like

Useful reading:

Since when? I have always dd’ed the boot partitions over. Maybe unnecessarily so.

I’m a bit puzzled by the frequent advice that some systems might not boot from a second (third, …) drive. With UEFI this has never been a problem for me and in 2024 there is really rarely a reason to use legacy boot at all.

Since always :wink:

But seriously, a long time. At least 9.

As long as you use the GUI.

In fact, always as long as I’ve been using FreeNAS as I always used two USBs, and have benefited from it, and never copied boot sectors

1 Like