Installation succeeds but not bootloader

I have a machine which previously dual-booted Windows 10 and GhostBSD, using rEFInd (which was installed by the GhostBSD installer). I'm trying to wipe the machine and install a fresh copy of FreeBSD 13.1 as the only OS on the machine. (I used GhostBSD to figure out some hardware stuff and test-run for a while, so I know the hardware should work fine.)

I can run the install without issue, but when I try to reboot into the new installation, it doesn't do anything. There appears to be no bootloader --- telling the BIOS to boot from the hard disk results in nothing happening.

If I boot into the install media again to get a shell, I see the right partitions in the output of "gpart show /dev/nvd0" (a small boot partition, swap, and ZFS, with a bit of space in between).

I've seen two sorts of suggestions, neither of which seems to help:
  • I've seen it suggested to run "gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 /dev/nvd0" (yes, this is the correct device for my disk) to install boot code manually during install, but this doesn't seem to do anything
  • I've also seen lots of suggestions to use efibootmgr, but when I try this from the live install media, it says "efibootmgr: efi variables not supported on this system. root? kldload efirt?" but I'm root in the installation media and kldload insists efirt is already loaded or built-in (I'm guessing built-in since it doesn't show up in kldstat).
Any suggestions for other things to try?
Okay, it appears this was a BIOS misconfiguration. My BIOS was set to allow both UEFI and legacy boot, and to try legacy first. So I'm guessing it was booting the installer in legacy mode, and thereby leaving EFI inaccessible to the installer. Then it would reboot and look for EFI entries. Disabling legacy boot (so UEFI-only) and re-installing yields a booting system.