Ubuntu – Install Windows 7 with Ubuntu in GPT UEFI mode

gptuefi

My computer is running Ubuntu on a disk in the markup GPT. Ubuntu runs mode UEFI (created FAT32 partition and boot loader was set there). Now I need to install Windows 7 as an alternative system for games.

Install it need in the UEFI. I know that if I install Windows 7 over Ubuntu, the installer will overwrite the boot Ubuntu.

Again I repeat that you need to get everything working in UEFI. No BIOS. How to implement it? Sorry for Google Translate.

Best Answer

The default UEFI bootloader is \EFI\BOOT\BOOTx64.EFI on your EFI System Partition (ESP).

I have reinstalled Ubuntu last week and it looks like Ubuntu is not creating this file. So Windows cannot overwrite what isn't there. Windows should also not delete entries (registered bootloaders) from the UEFI bootmenu and to my experience it does not.

I would say that UEFI is a major improvement, because bootloaders can coexist on the ESP (if the UEFI firmware, that the manufacturer implemented, isn't functionally broken or crippled).

What you can do to be safe:

  1. Backup the current contents of your ESP. (Zipping should be fine.)
  2. To get Ubuntu's GRUB as the default hotpluggable bootloader on your ESP after the Windows 7 installation has finished: copy and create \EFI\ubuntu\ from your backup as \EFI\BOOT\ and rename grubx64.efi to BOOTx64.EFI.
  3. Have Ubuntu live media ready so you can use efibootmgr to recreate accidentally deleted bootmenu entries.

I never did a UEFI install of Windows 7. With Windows 8 however it's very easy to create the Windows boot data on the ESP, even after installation. It's basically bcdboot c:\Windows /l en-gb /s b: /f ALL, but the Windows 7 version doesn't have the /f option.