Is it possible to install Windows 7 alongside Ubuntu and windows 10 dualboot?

I installed windows 10 on my laptop in UEFI mode with HDD GPT disk format, then I installed Ubuntu 16.04LTS on another partition. So I have Ubuntu dualboot with Windows 10 now.

I also installed rEFInd (it's like GUI for you to choose between different OSs) because I don't wanna use Grub2 as the default bootloader. Now I want to have Windows 7 too, but when I boot from the USB stick, an error screen showed up saying something like

the windows boot manager is having problems due to a recent hardware change

My system is still working fine so I don't know if the problem came from my system or if the setup I want is impossible.


Solution 1:

It's possible -- at least in principle. Oldfred's comment is simply stating that you need to boot the Windows 7 installer in EFI/UEFI mode rather than in its default BIOS/CSM/legacy mode. There are a number of Web sites that provide instructions for doing this, such as:

  • This official Microsoft site
  • This SevenForums page
  • This SuperUser question and answers
  • The Rufus tool may be helpful in creating a USB drive that can boot the Windows installer in EFI mode.

A Google search will turn up more information on this, if the preceding aren't adequate. As booting Windows 7 is beyond the scope of this site, you should ask on a Windows forum if you need more help on this subject.

That said, there are some caveats and limitations:

  • Hardware compatibility -- Windows 7 is old. The error you're seeing, if it's from the Windows 7 installation tool, may indicate a lack of drivers necessary for proper use of your hardware. You may also need to tweak firmware settings (particularly the hard disk's operating mode). These issues are best addressed on a Windows forum.
  • Setting the primary boot loader/manager -- When you install Windows, its boot loader/manager will take over as the default. You can restore rEFInd as the default using EasyUEFI or other tools. See this page of the rEFInd documentation for more information.
  • Windows boot loader: One vs. two -- When you install a second Windows OS, it will probably reconfigure the already-installed first Windows' boot loader to give an option of which Windows OS to boot. Thus, rEFInd will show one Windows entry, which you must select to boot either Windows OS, then pick which Windows version from the Windows boot loader. If you prefer to see separate entries for each Windows version in rEFInd, you can jump through some extra hoops to do so. From your setup with Windows 10 already available, you would:
    1. Use your preferred partitioning tool to free space on your hard disk, or even create new partitions, for Windows 7. If you create new partitions, be sure to include a new EFI System Partition (ESP).
    2. Change the type code of your original ESP (the one with the Windows boot loader) so that it's no longer marked as an ESP. In gdisk, you'd change it from type EF00 to something else. (I recommend 8300, which is the Linux type code, so that Windows will ignore it.) Be sure to write down which partition was your ESP.
    3. Change the type code(s) of your Windows 10 partitions. As with the previous step, the goal is to make the Windows 7 installer ignore the Windows 10 installation. Be sure to record the original type code(s) of these partition(s).
    4. Install Windows 7.
    5. Restore the type codes for the original ESP and the Windows 10 partition(s).
    6. Adjust the boot order so that rEFInd is first.

All that said, IMHO it's seldom worthwhile to do more than dual-boot a modern computer, and especially not to boot more than one version of any given OS. If you need features of versions X and Y of an OS, you can usually accomplish that goal by using virtualization (VirtualBox, VMware, etc.). Virtualization has the advantage of not needing such complex hoop-jumping in setting up the boot loaders, and the risks of creating serious problems are lower, too. The drawback is that the virtualized OS doesn't get such direct access to the hardware, so performance is worse -- but if you need direct access for games or other reasons, one version of the OS is usually adequate for that.