Corrupted/broken EFI boot partition

From: Johan Helsingius <julf_at_Julf.com>
Date: Thu, 12 Dec 2024 14:13:30 UTC
Hi,

I have a server with 4 disks with most of the disk as a 4-way ZFS
root partition, and small EFI, freebsd-boot (as an emergency
backup) and swap partition. For some reason the EFI partitions
seem to have gotten corrupted in one of the updates, so the server
simply refuses to boot using UEFI, and when trying to boot using
BIOS booting, it complains about the efi partition being corrupted
(and trying to mount it as a msdos partition results in failure
as the partition is not valid.

What would be the easiest way to recreate the boot partitions
without affecting the ZFS partitions)?

	Julf