Installation fails on any storage device, non-zero exit status 6

Attempting to install TrueNAS Scale 24.04.0 via either an external Ventoy SSD, a USB written by Rufus in dd mode, or a different USB written via balena etcher fails with the following error message:
EFI/debian/grubx64.efi returned non-zero exit status 6

The TrueNAS installation on sda has failed.

The system in question is a Supermicro X11SAA on the latest UEFI version (I upgraded to this from an older version after that failed to install).
I have tried to install to a SATA-SSD, to an NVMe SSD in the internal m.2 slot, and to an NVMe SSD in the PCIe slot without success. I then disabled the ASPM and SATA power saving features, but this was without success; the error appears the same way (just references whichever drive I selected).
A test installation of Windows 10 succeeded.

EDIT: The two USB drives I used are USB3, I used them in both USB3 and USB2 ports. The external SSD used a USB2 cable, I tested that in the USB3 and USB2 ports as well.

I managed to make the installation work by first installing 23.10.2 and then upgrading via the web interface. It still seems like something changed in the installer that might break future installations on some hardware.