Although the bug is a bit different, the workaround in the bug below is
quite generic. Maybe you could try it or adapt it to your needs:
I hope this helps, regards,
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
The ubuntu 18.04 installer went through the installation process and
then suddenly halted, said I cannot install the grub bootloader. Looks
like I am cooked. My machine is useless without an operating system. I
did not even keep my older ubuntu 14.04 installation.
To manage notifications about this bug go to:
ubuntu-bugs mailing list