I am trying to get a dual boot Windows 8.1 / Ubuntu Precise installation. My laptop is a Sony SVT1313Z9ES. It seems to have a buggy UEFI implementation that always looks for
EFI/Microsoft/Boot/bootmgfw.efi regardless of the configured UEFI boot manager. I have installed Windows 8.1 and Ubuntu and have both EFI managers in my EFI filesystem.
After extensive reading I have tried replacing
bootmgfw.efi -- and also the bootmanager in
EFI/Boot -- with the GRUB boot manager,
grubx64.efi. This works fine, until I boot Windows from GRUB. Windows boots fine, but then after shutting down for the first time I find the bootmanager has been damaged. It looks like Windows 8.1 has tried to replace the GRUB boot manager with its own, and failed to write it somehow. The FAT32 filesystem that contains the EFI files is damaged.
Free cluster summary wrong, and running
md5sum on the EFI file reports
Input/output error. All other files on the EFI filesystem are undamaged, only the currently active boot manager is affected.
FWIW, my EFI partition is a 512MB GPT partition at the very end of the disk -- but with a lot of free space, around 450MB. Could the partition being so close to the end of the drive cause any problems?
How can I prevent Windows from messing up the boot manager in this way?