I have now managed to get rid of this error. I had to manually delete the directory "/EFI/ubuntu". However, I had to delete the folder both from windows and ubuntu (booted using live usb). I find that weird since both OSs refer to the same EFI partition and hence the ubuntu folder once deleted from windows should not have been visisble from ubuntu.
Unfortunately, I am still unable to boot ubuntu after I restart once the installation completes successfully. I tried running boot-repair, tried mounting the linux partition and the EFI partition in a live usb session and reinstalled grub in a chroot environment, I even booted into windows and set the bootmgr path to /EFI/ubuntu/gubx64.efi. Nothing worked. Something weird that I noticed is: after I install linux, if I run a terminal and mount the EFI partition, I can see the /EFI/ubuntu folder with all the files (mmx, grubx, shimx). But as soon as I restart and go to the boot options, I don't see any entry for ubuntu. When I select "Boot from EFI file", I am unable to see any ubuntu directory in the EFI dir which is weird since just moments ago I saw its existence from the live USB. Naturally, I am unable to boot into Ubuntu and can only boot into Windows. I tried every possible solution here (https://ubuntuforums.org/showthread.php?t=2147295) and nothing seems to be working. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1839894 Title: Installing Ubuntu 18.04.3 LTS alongside Windows 10 (Dual Boot) causes grub install to fail with fatal error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1839894/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs