Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
add comment

The main EFI-specific issues are:

  • The ESP. I agree with LiveWireBT that you should back it up before you do anything else.
  • The boot loader list in NVRAM. When you install Windows in EFI mode, it will modify this list, and you'll want to modify it back to its starting point with efibootmgr or some equivalent utility.
  • Getting the Windows 7 installer to start in EFI mode. Most Windows 7 installation media boot fine in BIOS/CSM/legacy mode but are reluctant to boot in EFI/UEFI mode. Getting them to do so is covered here, among other places. (Try Googling if you want more references.)
  • Until recently, Ubuntu created GPT partitions for itself that used the same type code that Microsoft uses. This meant that Ubuntu's partitions would show up as "unformatted disks" in Windows, making it too easy to trash Ubuntu from Windows. The solution is to use gdisk to set the type code of the Ubuntu partitions from 0700 to 8300, as described here. Some recent versions of Ubuntu don't have this problem, since they use the correct type code from the start, but I don't recall when the transition occurred, and you haven't said what version of Ubuntu you're using, so I thought I'd mention this.

There are also the usual dual-boot issues. For instance, you should boot with a live CD and resize your partitions to make room for Windows. You may want to have a separate data-transfer partition to reduce the risk of Ubuntu trashing the Windows installation. These issues are the same for UEFI as for BIOS.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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