Dual-Boot Configuration of Windows 10/11 and Windows 7 With Patched Loader

If you have a modern computer where Windows 7 Setup halts at boot time when displaying OS logo, then you need to apply the patch for Windows 7 UEFI loader in FlashBoot Pro. This patch provides emulation of VGA BIOS (INT 10H) over UEFI GOP framebuffer, thus enabling installation and use of Windows 7 on the modern purely UEFI-based computers without CSM.

And if you have a dual-boot configuration of Windows 10/11 and Windows 7, you need to have two UEFI loaders simultaneously: a new one, capable of booting Windows 10/11 (with modern features, frequently updated by Windows Update); and older one, dedicated for booting Windows 7, patched by FlashBoot Pro for VGA BIOS emulation (thus, Windows Update preferrably should leave it alone).

This article explains in detail how to establish such a dual-boot configuration.

Contents

1. Problem statement

When there’s a single EFI System Partition, Windows 7 and Windows 10/11 have a conflict over two file objects in that partition, that must be resolved somehow:

  • UEFI bootloader (\EFI\Microsoft\Boot\bootmfgw.efi with .mui localizations): either patched for Windows 7 VGA emulation or with new features to boot Windows 10/11.
  • Registry hive with Boot Configuration Data (\EFI\Microsoft\Boot\BCD with .LOG1 and .LOG2 integrity logs): is it for Windows 10/11 or for Windows 7, and if for both, then how to make multiple UEFI loaders (if there are multiple UEFI loaders in the single EFI System Partition) not to display boot menu with two options.

2. Simple workaround

If form factor of your device allows multiple internal storage devices (such as SSDs and HDDs), e.g. if this is not a tablet, sealed down by a glue, then install Windows 7 and Windows 10/11 to a different physical storage devices (in any order, but please temporarily disconnect bootable storage with first OS before installing second OS, so Setup of the second OS won’t find EFI System Partition prepared by Setup of the first OS and won’t mess with it).

After the installation, you will have two EFI system partitions and so you can choose OS (storage device) to boot from in the boot menu provided by UEFI firmware of your computer.

3. Solution for hard cases

If you must have single bootable physical storage device and so single EFI system partition (because your tablet does not allow disassembly/teardown, or your laptop does not have a bay for second storage device), then there’s a harder way (but it’s still possible):

  1. Erase all partitions on that storage device, make sure it has GPT layout.
  2. Reserve 500 Mb for EFI system partition (create data partition).
  3. Install Windows 7 and let it create its own EFI System Partition (100 Mb) ahead of Windows Partition, and leave some unpartitioned space for Windows 10/11.
  4. Format empty FAT32 filesystem in 500 Mb reserved data partition.
  5. Install rEFInd bootloader to 500 Mb reserved data partition.
  6. Change Type GUID for 100 Mb EFI system partition from C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition) to EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (basic data partition).
  7. Change Type GUID for 500 Mb reserved data partition from EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (basic data partition) to C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition).
  8. Reboot, make sure that rEFInd works, Windows 7 UEFI Loader is detected by rEFInd, and Windows 7 still boots OK.
  9. Install Windows 10/11 from USB thumbdrive as usually. It will hijack 500 Mb EFI System Partition for itself, and insert its own UEFI loader ahead of rEFInd in the UEFI boot order, but otherwise it will work OK.
  10. Restore previous boot order: rEFInd ahead of Windows 10/11 UEFI loader. Now rEFInd should detect both Windows 10/11 and Windows 7 and offer a choice between these operating systems. Windows 10/11 and its UEFI loader has full control over 500 Mb EFI System Partition, and Windows 7 UEFI loader is located in separate 100 Mb data partition (former EFI System Partition) but still works OK.

Then Windows 7 will have its own kinda-sorta EFI System Partition (actually, it’s just bootable data partition), with its own separate UEFI loader and BCD hive, and Windows 10/11 and its Setup and its Windows Update will leave this partition and patched Windows 7 UEFI loader alone.

4. Other dual-boot considerations

Please be aware that in dual-boot configurations of Windows 10/11 and Windows 7, CheckDisk may kick in on every reboot of Windows 7. This is totally unrelated to the aforementioned UEFI boot shenanigans, and happens on CSM/Legacy systems too. Why it happens and what can be done about it, please read in the separate article (in short: a small registry tweak in Windows 10/11 is necessary to make it use old format of NTFS log compatible with Windows 7 and its CheckDisk).

5. Questions and answers

Q: How to change Type GUIDs for partitions?

A: Most convenient way is to use Emergency Boot Kit, see User Guide for Partition Manager: pages 36, 37, 39 and 40 demonstate this process step-by-step. If you do not have a paid version of Emergency Boot Kit, you can do this for free in a live Linux distribution like SLAX: run lsblk command to list all block devices, then run fdisk -l /dev/sda, fdisk -l /dev/sdb, fdisk -l /dev/mmcblk1 etc (substitute your block device name after /dev as necessary) to determine which Linux block device is your main internal bootable storage device, then run fdisk -l /dev/(chosen_device_name) to start editing partition table, then p subcommand to print partition table, thent subcommand to change partitition type, then 1 for "EFI system" type or 11 for "basic data" type, then w subcommand to write altered partition table to the disk. Alternatively, q subcommand exits fdisk program without saving altered partition table to the disk.


Q: How to change UEFI boot order?

A: Most convenient way is via the UEFI firmware setup utility, but that depends on UEFI firmware vendor (consult user manual for your motherboard or laptop). Also there is a vendor-neutral method of changing UEFI boot order: using efibootmgr tool in live Linux distribution like SLAX. When run without parameters, efibootmgr displays current boot order (list of comma-separated numbers) and a table below (which explains a meaning of each number: for example, an OS name, or PXE network boot device name, or rEFInd boot loader name or whatever). Then you can run efibootmgr --bootorder XXXX,YYYY,ZZZZ,... with reordered list of the same comma-separated numbers. In such way boot order will be changed by efibootmgr and written into the UEFI configuration variables in the NVRAM.