0

I'm trying to get Windows 11, which requires EFI boot, however, when I checked the system info in Windows, it says I have Legacy boot: Screenshot1

  • When checking the UEFI firmware settings [Gigabyte motherboard], it says I have UEFI boot: Screenshot2

Do I have EFI boot or not, and if I don't, how do I get it?

1
  • What is the exact model of your motherboard and BIOS version?
    – harrymc
    Commented Apr 12, 2022 at 8:29

4 Answers 4

0

The current Windows 10 install was either imaged when it was previously using a BIOS motherboard, or Windows was incorrectly installed with CSM Mode enabled within the UEFI firmware settings:

  • CSM Mode should never be enabled for an OS, as its sole purpose was to support distros [BSD/Linux] that didn't yet support EFI boot circa <2017 (Windows ≥7 supports EFI boot); CSM Mode emulates BIOS' 16bit architecture within a 32bit environment and doing so will cause performance degradation (boot times increase by 400%+, GPT can't be used, etc.)
    • The only reason to enable CSM Mode is when needing to access a legacy OP[tion] ROM, and once done in the OP ROM, CSM Mode should be re-disabled

To resolve:

  1. Windows 10 installation media → install on another PC → Save ISO
  2. Create bootable USB with Rufus → Reboot → Disable CSM Mode in the UEFI firmware
  3. Boot Windows install USB → When GUI loads, open terminal via Shift+F10
  4. Use mbr2gpt to convert OS disk's partition table to GPT:
    1. Ascertain OS disk #: DiskPartlis disexit
    2. mbr2gpt /convert /disk:#
      

  5. Create required UEFI-boot partitions on the OS HDD via DiskPart:
    1. DiskPartlis dissel dis # → Verify it's the OS disk: lis par
    2. Delete old boot partition: sel par # → Verify: det pardel par override
    3. Determine disk layout: lis par (optimal partition layout: ESP, MSR, OS, WinRE)
    4. Add requisite UEFI partitions:
      1. EFI and MSR:
        Select OS partition: sel par 1 → Verify: det par
        Shrink Desired=388 Minimum=388
        Cre Par EFI Size=100
        Format Quick Fs=FAT32 Label=EFI
        Assign Letter=Y
        Cre Par Msr Size=16
        
      2. WinRE:
        Select OS partition: sel par 3 → Verify: det par
        Shrink Desired=768 minimum=750
        Cre Par Pri Size=768 Id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
        Format Quick Fs=NTFS Label=WinRE
        Gpt Attributes=0x8000000000000001
        
        • As of Win10 v2004, WinRE was defaulted to be after the OS partition (previous default: WinRE, ESP, MSR, OS), as the Winre.wim grows when updated with OS version updates and is currently >400MB on Windows 11; due to this, WinRE partition should have ~300MB of free space to absorb future size increases
          • There is a way to natively shrink a partition with the unallocated space placed at the end of the partition, but I'm unsure how Windows Setup does so during a bi-annual versioning update - if wanting to do so, move via a third-party program later
          • <v2004: if Winre.wim outgrew the original WinRE partition, a new one would be auto-created after the OS partition, resulting in two Recovery partitions, with only the latter being active
    5. Get OS partition drive letter: lis volexit
      (C: is usually not the OS drive letter in WinPE/WinRE)

  6. Configure EFI boot:
    ::# Create EFI directories and enter:
        MkDir "Y:\EFI\Microsoft\Boot"
        Cd /d "Y:\EFI\Microsoft\Boot"
    
    ::# Create EFI boot structure:
        BootRec /Fixboot
    
        ::# If Access Denied error occurs (C: is OS partition):
            BcdBoot C:\Windows /s C: /f UEFI
    
    ::# Resolve any other boot issues:
        BootRec /FixMBR && BootRec /RebuildBCD
    
    1. Remove EFI mountpoint: DiskPartSel Vol YRemoveExit

  7. Reboot: wpeutil reboot
  8. Configure WinRE once booted back to Windows:
    1. Open an Admin Terminal: WinKey+ROpen: powershellCTRL+SHIFT+OK
    2. Mount WinRE partition via DiskPart:
      lis volsel vol # → Verify: det parAssign Letter=ZExit
    3. Extract WinRE.wim from the Windows install USB's sources\install.wim||.esd:
      # Get list of images [indexes] within the ESD/WIM:
        Dism /Get-ImageInfo /ImageFile:"E:\sources\install.wim"
      
      # Mount install.wim||.esd (usually index 1: Home | 6: Pro):
        MkDir "C:\Mount" ; Dism /Mount-Image /ImageFile:"E:\sources\install.wim" /Index:1 /MountDir:"C:\Mount" /ReadOnly
      
      # Copy WinRE.wim:
        MkDir "Z:\Recovery\WindowsRE" ; Xcopy "C:\Mount\Windows\System32\Recovery\WindowsRE\WinRE.wim" "Z:\Recovery\WindowsRE"
        # If hidden file: Xcopy /H
      
      # Unmount image, discard changes:
        Dism /Unmount-Image /MountDir:"C:\Mount" /Discard
      
    4. # Disable WinRE:
        ReAgentC /Disable
      
      # Set Custom WinRE Path:
        ReAgentC /SetREimage /Path "Z:\Recovery\WindowsRE"
      
      # Enable WinRE and verify:
        ReAgentC /Enable ; ReAgentC /Info
      
      # Cleanup:
        Del "C:\WinRE.wim" ; RmDir "C:\Mount"
      
    5. Remove WinRE mount point: DiskPartsel vol zremoveexit
1

Your motherboard has UEFI firmware, but the current OS was not installed with UEFI support.

Most PCs with UEFI firmware still support BIOS-style booting. (That's the "CSM Support" feature in your screenshot – the BIOS Compatibility Support Module. When the CSM is active, the firmware will show both UEFI and BIOS boot options.)

This means that the OS can be installed either with UEFI support or with the traditional MBR boot sector (e.g. if you chose the wrong option in the F8 boot menu, or if you forgot to select "UEFI/GPT" in Rufus, or if the whole OS disk was moved from an older, BIOS-only system). Beware that some tools only support making Windows USB sticks for BIOS mode; and some create dual-mode ones – when doing a fresh install make sure the F8 menu specifically lists "UEFI:" in front of the menu item.

And whenever the OS is booted through BIOS/CSM mode, it will have no access to the EFI Runtime Services, only to the old BIOS functions, as if it was truly running on a BIOS-only system, so that's what Windows' "System Information" will show.

Recent Windows versions have a mbr2gpt tool which transforms an existing BIOS-mode installation to an UEFI-capable one; for older versions it's possible to do the same manually.

1
  • It also means MBR was used, since Compatibly Mode, doesn’t support GPT. I would use MBR2GPT to do the conversion
    – Ramhound
    Commented Apr 12, 2022 at 9:46
1

Ref.: CSM Booting

It means that your Windows (Boot Manager) was installed in BIOS/legacy mode. You can shrink your main partition, create an EFI system partition (ESP) with the newly available space, and then install a the UEFI variant of Windows Boot Manager to it with bcdboot.exe.

I'm not sure if that's sufficient to get you through the upgrade though (I assume you are trying to upgrade from Windows 10 to 11). If it still doesn't work, probably you will need to install from scratch. Make sure you boot the installation medium in UEFI mode this time. Disabling CSM support will help you make sure of that (if the installation medium wasn't created in properyly for UEFI booting disabling that will prevent you from booting it, as well as your existing installation, in BIOS/legacy mode).


Certainly mbr2gpt is the quickest / simplest option, if it works. If it somehow doesn't, "installing from scratch" also includes the option of archiving the main partition to an image with dism.exe and extract with it after you have re-partition your drive with GPT.

You can also convert the partition table on Linux after having a working ESP prepared on Windows, albeit it needs more care. Make sure you have some available space at the end of the drive so that the backup GPT will not overwrite any of the partition / filesystem.

7
  • so umm just converting my boot disk to GPT would help? Commented Apr 12, 2022 at 12:15
  • @AnmolPlayzz no, the key to UEFI booting is having an ESP with the UEFI variant of Windows Boot Manager. GPT is on the other hand is optional, but there's a chance that the upgrade will perform check on the partition table type (MBR/DOS partition table + UEFI booting is considered "unorthodox" in Windows). mbr2gpt, AFAIK, is a script / program that convert the partition table and gets the ESP made. (I've never used it myself.)
    – Tom Yan
    Commented Apr 12, 2022 at 14:39
  • @JW0914 It is. Try it yourself (use dism and bcdboot, and of course, diskpart to install Windows, for example). (Well, I don't remember if diskpart support creating ESP on MBR partition table; you have fdisk on Linux anyway).
    – Tom Yan
    Commented Apr 13, 2022 at 3:20
  • @TomYan I was wrong and stand corrected
    – JW0914
    Commented Apr 13, 2022 at 11:54
  • @JW0914 In fact, I was wrong on two things as well. First, in the case of MBR partition table, Windows does not care whether the ESP has the type code 0xef. (AFAIK, it is not the case when the partition table is GPT. It literally breaks booting if you aren't using the correct type GUID.) Second, you can't really get through the whatever-it-is-called-self-configuration-for-new-installation-stage (more than just OOBE I think) with MBR PT + UEFI booting, which will work if you get through the stage with legacy booting first. (bcdboot also takes ALL for /f, which allows a "dual-mode" ESP.)
    – Tom Yan
    Commented Apr 13, 2022 at 15:42
1

try searching for legacy to uefi. Windows has a tool:

mbr2gpt

boot to cmd (shift restart)

type: mbr2gpt /validate if it's clear follow with this

I suggest not running mbr2gpt /convert on it's own but the full mbr2gpt /convert /disk c: /allowfullos

instead of all the above flaffing around

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .