are you sure it actually output void=grub and that wasn’t a typo? the void-installer script assigns grub_args as: “…
--bootloader-id=void_grub…” - it’s hard coded.
You can always less the install script to make sure (from within less, type
/grub_args= and you’ll find the line assigning it)
I haven’t figured out what that error means yet. It shows up a lot on the internet but I’m not finding a cause other than wrong commands (entered manually).
The installer unmounts the target partitions before exit, regardless of whether it succeeded or failed, so we can’t exactly see what the real state of things is when that command fails.
But what we can do is try to do that stage ourselves. Since it’s the very last thing the installer does, then we can hope everything up to that point is good, and we only have to get grub installed ourselves.
Here is what the installer should run in your case:
chroot /mnt/target grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=void=grub --recheck /dev/sda
chroot /mnt/target grub-mkconfig -o /boot/grub/grub.cfg
(In your case, we’re failing on the 1st command, so it’s unknown whether the 2nd will have problems or not.)
In order to run those commands yourself, you need to get things set up again. First start with nothing else mounted other than the live-image (so don’t have any of your HDD partitions mounted.) This is based on your stated layout (with separate boot partition)
mkdir /mnt/target if it doesn’t exist.
mount /dev/sda5 /mnt/target
mount /dev/sda4 /mnt/target/boot
make sure that
/mnt/target/boot/efi exists now. If not, then that would certainly have caused problems (your efi partition would not have been mounted at that location…)
mount /dev/sda1 /mnt/target/boot/efi
mount --rbind /dev /mnt/target/dev
mount --rbind /sys /mnt/target/sys
mount --rbind /proc /mnt/target/proc
Once those commands are all successful, you’re ready to try the chroot commands above. Optionally, you can chroot into /mnt/target first, and run those commands without the “chroot /mnt/target”. This will allow you do possibly do some troubleshooting from within the chroot. Such as “
realpath /boot/efi” or other commands to try and see the state of things.