There's a merged pull request on the void-packages repository efibootmgr: add option to set partition number of EFI partition https://github.com/void-linux/void-packages/pull/12899 Description: This is useful when ESP is not the first partition, for instance if it is added after some existing partitions during switch from BIOS to UEFI boot.