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. fsck.vfat reports 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?


This was solved by moving the backup Windows version of bootmgfw.efi, which is chainloaded by GRUB, to outside of the Microsoft/Boot subdirectory of the EFI partition. I installed it under amoe/stock_windows_bootloader.efi and configured GRUB accordingly. This seems to prevent the corruption, for reasons I don't really understand.

For anyone debugging this, I suggest also disabling Fast Startup feature in Windows, which apparently has the potential to corrupt the EFI partition.

Many thanks to Rod Smith for his numerous helpful UEFI-related answers.

  • When a Windows update modifies the stock Windows bootloader under Microsoft/Boot in the EFI partition, you will need to update your private copy (amoe/stock_windows_bootloader.efi) from this version, and re-overwrite the version in Microsoft/Boot/bootmgfw.efi with the Linux grubx64.efi. – amoe Jul 15 '14 at 20:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.